LCOV - code coverage report
Current view: directory - swig/python/extensions - gdal_wrap.cpp (source / functions) Found Hit Coverage
Test: gdal_filtered.info Lines: 10907 6331 58.0 %
Date: 2012-12-26 Functions: 433 316 73.0 %

       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            3249 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
     427            3249 :   if (ty) {
     428            3249 :     swig_cast_info *iter = ty->cast;
     429            6808 :     while (iter) {
     430            3559 :       if (strcmp(iter->type->name, c) == 0) {
     431            3249 :         if (iter == ty->cast)
     432            2998 :           return iter;
     433                 :         /* Move iter to the top of the linked list */
     434             251 :         iter->prev->next = iter->next;
     435             251 :         if (iter->next)
     436             251 :           iter->next->prev = iter->prev;
     437             251 :         iter->next = ty->cast;
     438             251 :         iter->prev = 0;
     439             251 :         if (ty->cast) ty->cast->prev = iter;
     440             251 :         ty->cast = iter;
     441             251 :         return iter;
     442                 :       }
     443             310 :       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            3249 :   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            2458 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
    1180                 : #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
    1181            2458 :   if (!result) {
    1182              67 :     result = obj;
    1183            2391 :   } else if (result == Py_None) {
    1184            2135 :     Py_DECREF(result);
    1185            2135 :     result = obj;
    1186                 :   } else {
    1187             256 :     if (!PyList_Check(result)) {
    1188             119 :       PyObject *o2 = result;
    1189             119 :       result = PyList_New(1);
    1190             119 :       PyList_SetItem(result, 0, o2);
    1191                 :     }
    1192             256 :     PyList_Append(result,obj);
    1193             256 :     Py_DECREF(obj);
    1194                 :   }
    1195            2458 :   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           32070 :   PyObject *none = Py_None;
    1330           32070 :   Py_INCREF(none);
    1331           32070 :   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         2671656 : SwigPyObject_type(void) {
    1556         2671656 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
    1557         2671656 :   return type;
    1558                 : }
    1559                 : 
    1560                 : SWIGRUNTIMEINLINE int
    1561         2216556 : SwigPyObject_Check(PyObject *op) {
    1562                 :   return (Py_TYPE(op) == SwigPyObject_type())
    1563         2216556 :     || (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          227550 : SwigPyObject_dealloc(PyObject *v)
    1571                 : {
    1572          227550 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1573          227550 :   PyObject *next = sobj->next;
    1574          227550 :   if (sobj->own == SWIG_POINTER_OWN) {
    1575           23920 :     swig_type_info *ty = sobj->ty;
    1576           23920 :     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    1577           23920 :     PyObject *destroy = data ? data->destroy : 0;
    1578           23920 :     if (destroy) {
    1579                 :       /* destroy is always a VARARGS method */
    1580                 :       PyObject *res;
    1581           23920 :       if (data->delargs) {
    1582                 :   /* we need to create a temporary object to carry the destroy operation */
    1583           23920 :   PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
    1584           23920 :   res = SWIG_Python_CallFunctor(destroy, tmp);
    1585           23920 :   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           23920 :       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          227550 :   Py_XDECREF(next);
    1601          227550 :   PyObject_DEL(v);
    1602          227550 : }
    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          227550 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    1863                 : {
    1864          227550 :   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    1865          227550 :   if (sobj) {
    1866          227550 :     sobj->ptr  = ptr;
    1867          227550 :     sobj->ty   = ty;
    1868          227550 :     sobj->own  = own;
    1869          227550 :     sobj->next = 0;
    1870                 :   }
    1871          227550 :   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         1299565 : SWIG_This(void)
    2080                 : {
    2081         1299571 :   static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
    2082         1299565 :   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         1120576 : SWIG_Python_GetSwigThis(PyObject *pyobj) 
    2094                 : {
    2095         1120576 :   if (SwigPyObject_Check(pyobj)) {
    2096           24160 :     return (SwigPyObject *) pyobj;
    2097                 :   } else {
    2098         1096416 :     PyObject *obj = 0;
    2099                 : #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
    2100         1096416 :     if (PyInstance_Check(pyobj)) {
    2101               0 :       obj = _PyInstance_Lookup(pyobj, SWIG_This());      
    2102                 :     } else {
    2103         1096416 :       PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    2104         1096416 :       if (dictptr != NULL) {
    2105         1096347 :   PyObject *dict = *dictptr;
    2106         1096347 :   obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
    2107                 :       } else {
    2108                 : #ifdef PyWeakref_CheckProxy
    2109              69 :   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              69 :   obj = PyObject_GetAttr(pyobj,SWIG_This());
    2115              69 :   if (obj) {
    2116               0 :     Py_DECREF(obj);
    2117                 :   } else {
    2118              69 :     if (PyErr_Occurred()) PyErr_Clear();
    2119              69 :     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         1096347 :     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         1096347 :     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         1120847 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
    2160         1120847 :   if (!obj) return SWIG_ERROR;
    2161         1120847 :   if (obj == Py_None) {
    2162             275 :     if (ptr) *ptr = 0;
    2163             275 :     return SWIG_OK;
    2164                 :   } else {
    2165         1120572 :     SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    2166         1120572 :     if (own)
    2167               0 :       *own = 0;
    2168         1120572 :     while (sobj) {
    2169         1120136 :       void *vptr = sobj->ptr;
    2170         1120136 :       if (ty) {
    2171         1119906 :   swig_type_info *to = sobj->ty;
    2172         1119906 :   if (to == ty) {
    2173                 :     /* no type cast needed */
    2174         1116657 :     if (ptr) *ptr = vptr;
    2175                 :     break;
    2176                 :   } else {
    2177            3249 :     swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    2178            3249 :     if (!tc) {
    2179               0 :       sobj = (SwigPyObject *)sobj->next;
    2180                 :     } else {
    2181            3249 :       if (ptr) {
    2182            3249 :               int newmemory = 0;
    2183            3249 :               *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
    2184            3249 :               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             230 :   if (ptr) *ptr = vptr;
    2195                 :   break;
    2196                 :       }
    2197                 :     }
    2198         1120572 :     if (sobj) {
    2199         1120136 :       if (own)
    2200               0 :         *own = *own | sobj->own;
    2201         1120136 :       if (flags & SWIG_POINTER_DISOWN) {
    2202           23920 :   sobj->own = 0;
    2203                 :       }
    2204         1120136 :       return SWIG_OK;
    2205                 :     } else {
    2206             436 :       int res = SWIG_ERROR;
    2207             436 :       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             436 :       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          203500 : SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
    2306                 : {
    2307                 : #if (PY_VERSION_HEX >= 0x02020000)
    2308          203500 :   PyObject *inst = 0;
    2309          203500 :   PyObject *newraw = data->newraw;
    2310          203500 :   if (newraw) {
    2311          203500 :     inst = PyObject_Call(newraw, data->newargs, NULL);
    2312          203500 :     if (inst) {
    2313                 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
    2314          203500 :       PyObject **dictptr = _PyObject_GetDictPtr(inst);
    2315          203500 :       if (dictptr != NULL) {
    2316          203500 :   PyObject *dict = *dictptr;
    2317          203500 :   if (dict == NULL) {
    2318          203500 :     dict = PyDict_New();
    2319          203500 :     *dictptr = dict;
    2320          203500 :     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          203500 :   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          205969 : SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
    2415          205969 :   if (!ptr) {
    2416            2339 :     return SWIG_Py_Void();
    2417                 :   } else {
    2418          203630 :     int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2419          203630 :     PyObject *robj = SwigPyObject_New(ptr, type, own);
    2420          203630 :     SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    2421          203630 :     if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    2422          203500 :       PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    2423          203500 :       if (inst) {
    2424          203500 :   Py_DECREF(robj);
    2425          203500 :   robj = inst;
    2426                 :       }
    2427                 :     }
    2428          203630 :     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          869170 :   return SWIG_From_long  (value);
    2929                 : }
    2930                 : 
    2931                 : 
    2932                 : 
    2933                 : /* Return a PyObject* from a NULL terminated C String */
    2934           33575 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
    2935                 : {
    2936           33575 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    2937         2608967 :   while(*pszIter != 0)
    2938                 :   {
    2939         2541841 :     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         2541817 :     pszIter ++;
    2951                 :   }
    2952                 : #if PY_VERSION_HEX >= 0x03000000
    2953                 :   return PyUnicode_FromString(pszStr); 
    2954                 : #else
    2955           33551 :   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           24270 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
    2962                 : {
    2963           24270 :   *pbToFree = 0;
    2964           24270 :   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           24267 :       return PyString_AsString(pyObject);
    2987                 : #endif
    2988                 :   }
    2989                 : }
    2990                 : 
    2991           24270 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
    2992                 : {
    2993           24270 :    if (bToFree)
    2994               3 :        free(ptr);
    2995           24270 : }
    2996                 : 
    2997                 : 
    2998                 : 
    2999              35 : int wrapper_VSIFReadL( void **buf, int nMembSize, int nMembCount, VSILFILE *fp)
    3000                 : {
    3001              35 :     GIntBig buf_size = nMembSize * nMembCount;
    3002                 : 
    3003              35 :     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              35 :     *buf = (void *)PyString_FromStringAndSize( NULL, buf_size ); 
    3027              35 :     if (*buf == NULL)
    3028                 :     {
    3029               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    3030               0 :         return 0;
    3031                 :     }
    3032              35 :     PyObject* o = (PyObject*) *buf;
    3033              35 :     char *data = PyString_AsString(o); 
    3034              35 :     GIntBig nRet = (GIntBig)VSIFReadL( data, nMembSize, nMembCount, fp );
    3035              35 :     if (nRet * nMembSize < buf_size)
    3036                 :     {
    3037              13 :         _PyString_Resize(&o, nRet * nMembSize);
    3038              13 :         *buf = o;
    3039                 :     }
    3040              35 :     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          168689 : SWIG_AsVal_double (PyObject *obj, double *val)
    3057                 : {
    3058          168689 :   int res = SWIG_TypeError;
    3059          168689 :   if (PyFloat_Check(obj)) {
    3060             759 :     if (val) *val = PyFloat_AsDouble(obj);
    3061             759 :     return SWIG_OK;
    3062          167930 :   } else if (PyInt_Check(obj)) {
    3063          167930 :     if (val) *val = PyInt_AsLong(obj);
    3064          167930 :     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         1562897 : SWIG_AsVal_long (PyObject *obj, long* val)
    3137                 : {
    3138         1562897 :   if (PyInt_Check(obj)) {
    3139         1562897 :     if (val) *val = PyInt_AsLong(obj);
    3140         1562897 :     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         1562897 : SWIG_AsVal_int (PyObject * obj, int *val)
    3176                 : {
    3177                 :   long v;
    3178         1562897 :   int res = SWIG_AsVal_long (obj, &v);
    3179         1562897 :   if (SWIG_IsOK(res)) {
    3180         1562897 :     if ((v < INT_MIN || v > INT_MAX)) {
    3181               0 :       return SWIG_OverflowError;
    3182                 :     } else {
    3183         1562897 :       if (val) *val = static_cast< int >(v);
    3184                 :     }
    3185                 :   }  
    3186         1562897 :   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             525 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
    3203                 : 
    3204                 : {
    3205             525 :     PyProgressData *psInfo = (PyProgressData *) pData;
    3206                 :     PyObject *psArgs, *psResult;
    3207             525 :     int      bContinue = TRUE;
    3208                 : 
    3209             525 :     if( psInfo->nLastReported == (int) (100.0 * dfComplete) )
    3210             100 :         return TRUE;
    3211                 : 
    3212             425 :     if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
    3213               0 :         return TRUE;
    3214                 : 
    3215             425 :     psInfo->nLastReported = (int) (100.0 * dfComplete);
    3216                 :     
    3217             425 :     if( pszMessage == NULL )
    3218             396 :         pszMessage = "";
    3219                 : 
    3220             425 :     if( psInfo->psPyCallbackData == NULL )
    3221             396 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    3222                 :     else
    3223                 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, 
    3224              29 :                          psInfo->psPyCallbackData );
    3225                 : 
    3226             425 :     psResult = PyEval_CallObject( psInfo->psPyCallback, psArgs);
    3227             425 :     Py_XDECREF(psArgs);
    3228                 : 
    3229             425 :     if( psResult == NULL )
    3230                 :     {
    3231               0 :         return TRUE;
    3232                 :     }
    3233                 : 
    3234             425 :     if( psResult == Py_None )
    3235                 :     {
    3236               0 :   Py_XDECREF(Py_None);
    3237               0 :         return TRUE;
    3238                 :     }
    3239                 : 
    3240             425 :     if( !PyArg_Parse( psResult, "i", &bContinue ) )
    3241                 :     {
    3242               0 :         PyErr_SetString(PyExc_ValueError, "bad progress return value");
    3243               0 :   return FALSE;
    3244                 :     }
    3245                 : 
    3246             425 :     Py_XDECREF(psResult);
    3247                 : 
    3248             425 :     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            1190 :   CPLErr PushErrorHandler( char const * pszCallbackName = NULL ) {
    3260            1190 :     CPLErrorHandler pfnHandler = NULL;
    3261            2378 :     if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
    3262            1188 :       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            1190 :     if ( pfnHandler == NULL )
    3269               2 :       return CE_Fatal;
    3270                 : 
    3271            1188 :     CPLPushErrorHandler( pfnHandler );
    3272                 : 
    3273            1188 :     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             322 :   if (!init) {
    3284               2 :     info = SWIG_TypeQuery("_p_char");
    3285               2 :     init = 1;
    3286                 :   }
    3287             322 :   return info;
    3288                 : }
    3289                 : 
    3290                 : 
    3291                 : SWIGINTERN int
    3292           14074 : 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           14074 :   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           13752 :     PyString_AsStringAndSize(obj, &cstr, &len);
    3314                 : #endif
    3315           13752 :     if (cptr) {
    3316           12540 :       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           12540 :   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           12540 :     *cptr = cstr;
    3337           12540 :     *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           13752 :     if (psize) *psize = len + 1;
    3347                 : #if PY_VERSION_HEX>=0x03000000
    3348                 :     Py_XDECREF(obj);
    3349                 : #endif
    3350           13752 :     return SWIG_OK;
    3351                 :   } else {
    3352             322 :     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3353             322 :     if (pchar_descriptor) {
    3354             322 :       void* vptr = 0;
    3355             322 :       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
    3356             253 :   if (cptr) *cptr = (char *) vptr;
    3357             253 :   if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
    3358             253 :   if (alloc) *alloc = SWIG_OLDOBJ;
    3359             253 :   return SWIG_OK;
    3360                 :       }
    3361                 :     }
    3362                 :   }
    3363              69 :   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           31557 :   if (carray) {
    3384           31445 :     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           31445 :       return PyString_FromStringAndSize(carray, static_cast< int >(size));
    3393                 : #endif
    3394                 :     }
    3395                 :   } else {
    3396             112 :     return SWIG_Py_Void();
    3397                 :   }
    3398                 : }
    3399                 : 
    3400                 : 
    3401                 : SWIGINTERNINLINE PyObject * 
    3402           31557 : SWIG_FromCharPtr(const char *cptr)
    3403                 : { 
    3404           63114 :   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
    3405                 : }
    3406                 : 
    3407                 : 
    3408             591 : const char *wrapper_CPLGetConfigOption( const char * pszKey, const char * pszDefault = NULL )
    3409                 : {
    3410             591 :     return CPLGetConfigOption( pszKey, pszDefault );
    3411                 : }
    3412                 : 
    3413                 : 
    3414              19 : void wrapper_VSIFileFromMemBuffer( const char* utf8_path, int nBytes, const GByte *pabyData)
    3415                 : {
    3416              19 :     GByte* pabyDataDup = (GByte*)VSIMalloc(nBytes);
    3417              19 :     if (pabyDataDup == NULL)
    3418                 :             return;
    3419              19 :     memcpy(pabyDataDup, pabyData, nBytes);
    3420              19 :     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            2056 :     StatBuf *self = (StatBuf*) CPLMalloc( sizeof( StatBuf ) );
    3440            2056 :     self->mode = psStatBuf->mode;
    3441            2056 :     self->size = psStatBuf->size;
    3442            2056 :     self->mtime = psStatBuf->mtime;
    3443            2056 :     return self;
    3444                 :   }
    3445                 : SWIGINTERN void delete_StatBuf(StatBuf *self){
    3446            2056 :     CPLFree(self);
    3447                 :   }
    3448                 : SWIGINTERN int StatBuf_IsDirectory(StatBuf *self){
    3449            2334 :      return (self->mode & S_IFDIR) != 0;
    3450                 :   }
    3451                 : 
    3452            2058 : 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            2058 :     int nRet = VSIStatExL(utf8_path, &sStat, nFlags);
    3458            2058 :     psStatBufOut->mode = sStat.st_mode;
    3459            2058 :     psStatBufOut->size = (GIntBig)sStat.st_size;
    3460            2058 :     psStatBufOut->mtime = (GIntBig)sStat.st_mtime;
    3461            2058 :     return nRet;
    3462                 : }
    3463                 : 
    3464                 : 
    3465              58 : int wrapper_VSIFWriteL( int nLen, char *pBuf, int size, int memb, VSILFILE * f)
    3466                 : {
    3467              58 :     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              58 :     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            2658 :     return GDALGetMetadata( self, pszDomain );
    3483                 :   }
    3484                 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    3485             161 :     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               5 :     tmpList[0] = pszMetadataString;
    3493               5 :     tmpList[1] = 0;
    3494               5 :     return GDALSetMetadata( self, tmpList, pszDomain );
    3495                 :   }
    3496                 : SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
    3497             153 :     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            6997 :                                                                 options );
    3511            6997 :     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            2041 :                                                                     callback_data );
    3522            2041 :     return ds;
    3523                 :   }
    3524                 : SWIGINTERN int GDALDriverShadow_Delete(GDALDriverShadow *self,char const *utf8_path){
    3525            1317 :     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           22983 : char const *GDALDriverShadow_ShortName_get( GDALDriverShadow *h ) {
    3541           22983 :   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            5555 : 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            5555 :     GDAL_GCP *self = (GDAL_GCP*) CPLMalloc( sizeof( GDAL_GCP ) );
    3579            5555 :     self->dfGCPX = x;
    3580            5555 :     self->dfGCPY = y;
    3581            5555 :     self->dfGCPZ = z;
    3582            5555 :     self->dfGCPPixel = pixel;
    3583            5555 :     self->dfGCPLine = line;
    3584            5555 :     self->pszInfo =  CPLStrdup( (info == 0) ? "" : info );
    3585            5555 :     self->pszId = CPLStrdup( (id==0)? "" : id );
    3586            5555 :     return self;
    3587                 :   }
    3588                 : SWIGINTERN void delete_GDAL_GCP(GDAL_GCP *self){
    3589            5555 :     if ( self->pszInfo )
    3590            5555 :       CPLFree( self->pszInfo );
    3591            5555 :     if ( self->pszId )
    3592            5555 :       CPLFree( self->pszId );
    3593            5555 :     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            1855 : CreateTupleFromDoubleArray( double *first, unsigned int size ) {
    3703            1855 :   PyObject *out = PyTuple_New( size );
    3704            9893 :   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            1855 :   return out;
    3710                 : }
    3711                 : 
    3712                 : 
    3713                 : /* Returned size is in bytes or 0 if an error occured */
    3714                 : static
    3715          336718 : 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          336718 :     const GIntBig MAX_INT = (((GIntBig)0x7fffffff) << 32) | 0xffffffff;
    3722                 : #else
    3723                 :     const GIntBig MAX_INT = 0x7fffffff;
    3724                 : #endif
    3725          336718 :     const GIntBig MAX_INT32 = 0x7fffffff;
    3726          336718 :     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          336716 :     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          336716 :     if (nPixelSize == 0)
    3739                 :     {
    3740               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    3741               0 :         return 0;
    3742                 :     }
    3743                 : 
    3744          336716 :     if( nPixelSpace == 0 )
    3745          336716 :         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          336716 :     if( nLineSpace == 0 )
    3753                 :     {
    3754          336716 :         if (nPixelSpace > MAX_INT32 / buf_xsize)
    3755                 :         {
    3756               0 :             CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow for nLineSpace");
    3757               0 :             return 0;
    3758                 :         }
    3759          336716 :         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          336716 :     if( nBandSpace == 0 )
    3768                 :     {
    3769          336716 :         if (nLineSpace > MAX_INT32 / buf_ysize)
    3770                 :         {
    3771               0 :             CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow for nBandSpace");
    3772               0 :             return 0;
    3773                 :         }
    3774          336716 :         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          336716 :     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          336716 :     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          336716 :     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           16274 :     if ( GDALDereferenceDataset( self ) <= 0 ) {
    3901           11267 :       GDALClose(self);
    3902                 :     }
    3903                 :   }
    3904                 : SWIGINTERN GDALDriverShadow *GDALDatasetShadow_GetDriver(GDALDatasetShadow *self){
    3905             554 :     return (GDALDriverShadow*) GDALGetDatasetDriver( self );
    3906                 :   }
    3907                 : SWIGINTERN GDALRasterBandShadow *GDALDatasetShadow_GetRasterBand(GDALDatasetShadow *self,int nBand){
    3908          174178 :     return (GDALRasterBandShadow*) GDALGetRasterBand( self, nBand );
    3909                 :   }
    3910                 : SWIGINTERN char const *GDALDatasetShadow_GetProjection(GDALDatasetShadow *self){
    3911             385 :     return GDALGetProjectionRef( self );
    3912                 :   }
    3913                 : SWIGINTERN char const *GDALDatasetShadow_GetProjectionRef(GDALDatasetShadow *self){
    3914             185 :     return GDALGetProjectionRef( self );
    3915                 :   }
    3916                 : SWIGINTERN CPLErr GDALDatasetShadow_SetProjection(GDALDatasetShadow *self,char const *prj){
    3917             917 :     return GDALSetProjection( self, prj );
    3918                 :   }
    3919                 : SWIGINTERN void GDALDatasetShadow_GetGeoTransform(GDALDatasetShadow *self,double argout[6],int *isvalid,int *can_return_null=0){
    3920            1101 :     if (can_return_null && *can_return_null)
    3921                 :     {
    3922             102 :         *isvalid = (GDALGetGeoTransform( self, argout ) == CE_None );
    3923                 :     }
    3924                 :     else
    3925                 :     {
    3926             999 :         *isvalid = TRUE;
    3927             999 :         if ( GDALGetGeoTransform( self, argout ) != CE_None ) {
    3928              19 :             argout[0] = 0.0;
    3929              19 :             argout[1] = 1.0;
    3930              19 :             argout[2] = 0.0;
    3931              19 :             argout[3] = 0.0;
    3932              19 :             argout[4] = 0.0;
    3933              19 :             argout[5] = 1.0;
    3934                 :         }
    3935                 :     }
    3936                 :   }
    3937                 : SWIGINTERN CPLErr GDALDatasetShadow_SetGeoTransform(GDALDatasetShadow *self,double argin[6]){
    3938             901 :     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             177 :                                 callback_data);
    3950                 :   }
    3951                 : SWIGINTERN int GDALDatasetShadow_GetGCPCount(GDALDatasetShadow *self){
    3952              28 :     return GDALGetGCPCount( self );
    3953                 :   }
    3954                 : SWIGINTERN char const *GDALDatasetShadow_GetGCPProjection(GDALDatasetShadow *self){
    3955              22 :     return GDALGetGCPProjection( self );
    3956                 :   }
    3957                 : SWIGINTERN void GDALDatasetShadow_GetGCPs(GDALDatasetShadow *self,int *nGCPs,GDAL_GCP const **pGCPs){
    3958              43 :     *nGCPs = GDALGetGCPCount( self );
    3959              43 :     *pGCPs = GDALGetGCPs( self );
    3960                 :   }
    3961                 : SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,char const *pszGCPProjection){
    3962              11 :     return GDALSetGCPs( self, nGCPs, pGCPs, pszGCPProjection );
    3963                 :   }
    3964                 : SWIGINTERN void GDALDatasetShadow_FlushCache(GDALDatasetShadow *self){
    3965              17 :     GDALFlushCache( self );
    3966                 :   }
    3967                 : SWIGINTERN CPLErr GDALDatasetShadow_AddBand(GDALDatasetShadow *self,GDALDataType datatype=GDT_Byte,char **options=0){
    3968               7 :     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          169077 : 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          169077 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    3979          169077 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    3980                 :     GDALDataType ntype;
    3981          169077 :     if ( buf_type != 0 ) {
    3982          169077 :       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          169077 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    3991          169077 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    3992          169077 :     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          169077 :                                   pixel_space, line_space, band_space, FALSE);
    3998          169077 :     if (min_buffer_size == 0)
    3999               1 :         return CE_Failure;
    4000                 : 
    4001          169076 :     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          169075 :                                 band_list, pband_list, pixel_space, line_space, band_space );
    4010                 : 
    4011          169075 :     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          167641 : 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          167641 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    4092          167641 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    4093                 :     GDALDataType ntype;
    4094          167641 :     if ( buf_type != 0 ) {
    4095          167641 :       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          167641 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    4107          167641 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    4108          167641 :     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          167641 :                                                pixel_space, line_space, band_space, FALSE);
    4113          167641 :     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          167640 :     *buf = (void *)PyString_FromStringAndSize( NULL, buf_size ); 
    4129          167640 :     if (*buf == NULL)
    4130                 :     {
    4131               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4132               0 :         return CE_Failure;
    4133                 :     }
    4134          167640 :     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          167640 :                                band_list, pband_list, pixel_space, line_space, band_space );
    4140          167640 :     if (eErr == CE_Failure)
    4141                 :     {
    4142               2 :         Py_DECREF((PyObject*)*buf);
    4143               2 :         *buf = NULL;
    4144                 :     }
    4145          167640 :     return eErr;
    4146                 : }
    4147                 : 
    4148            2158 : int GDALDatasetShadow_RasterXSize_get( GDALDatasetShadow *h ) {
    4149            2158 :   return GDALGetRasterXSize( h );
    4150                 : }
    4151           10535 : int GDALDatasetShadow_RasterYSize_get( GDALDatasetShadow *h ) {
    4152           10535 :   return GDALGetRasterYSize( h );
    4153                 : }
    4154          335629 : int GDALDatasetShadow_RasterCount_get( GDALDatasetShadow *h ) {
    4155          335629 :   return GDALGetRasterCount( h );
    4156                 : }
    4157                 : 
    4158                 : 
    4159                 : /* Returned size is in bytes or 0 if an error occured */
    4160                 : static
    4161            1744 : 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            1744 :     const GIntBig MAX_INT = (((GIntBig)0x7fffffff) << 32) | 0xffffffff;
    4167                 : #else
    4168                 :     const GIntBig MAX_INT = 0x7fffffff;
    4169                 : #endif
    4170            1744 :     const GIntBig MAX_INT32 = 0x7fffffff;
    4171            1744 :     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            1742 :     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            1742 :     if (nPixelSize == 0)
    4184                 :     {
    4185               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    4186               0 :         return 0;
    4187                 :     }
    4188                 : 
    4189            1742 :     if( nPixelSpace == 0 )
    4190            1742 :         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            1742 :     if( nLineSpace == 0 )
    4198                 :     {
    4199            1742 :         if (nPixelSpace > MAX_INT32 / buf_xsize)
    4200                 :         {
    4201               0 :             CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow for nLineSpace");
    4202               0 :             return 0;
    4203                 :         }
    4204            1742 :         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            1742 :     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            1742 :     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            1377 :                                                    pixel_space, line_space, FALSE );
    4233            1377 :     if ( min_buffer_size == 0 )
    4234               1 :       return CE_Failure;
    4235                 :       
    4236            1376 :     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            1375 :             (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              33 :       GDALGetBlockSize(self, pnBlockXSize, pnBlockYSize);
    4250                 :   }
    4251                 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetColorInterpretation(GDALRasterBandShadow *self){
    4252              24 :     return GDALGetRasterColorInterpretation( self );
    4253                 :   }
    4254                 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetRasterColorInterpretation(GDALRasterBandShadow *self){
    4255             170 :     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             116 :     *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               7 :   int r = PyObject_IsTrue(obj);
    4312               7 :   if (r == -1)
    4313               0 :     return SWIG_ERROR;
    4314               7 :   if (val) *val = r ? true : false;
    4315               7 :   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               7 :     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              91 :     return GDALGetOverviewCount( self );
    4326                 :   }
    4327                 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetOverview(GDALRasterBandShadow *self,int i){
    4328             280 :     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            2411 :     int nxsize = (xsize!=0) ? *xsize : GDALGetRasterBandXSize( self );
    4332            2411 :     int nysize = (ysize!=0) ? *ysize : GDALGetRasterBandYSize( self );
    4333            2411 :     return GDALChecksumImage( self, xoff, yoff, nxsize, nysize );
    4334                 :   }
    4335                 : SWIGINTERN void GDALRasterBandShadow_ComputeRasterMinMax(GDALRasterBandShadow *self,double argout[2],int approx_ok=0){
    4336             749 :     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          168026 :     return GDALFillRaster( self, real_fill, imag_fill );
    4344                 :   }
    4345            1377 : 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            1377 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    4347            1377 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    4348                 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    4349            1377 :                                         : (GDALDataType)*buf_type;
    4350            1377 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    4351            1377 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    4352                 :     return WriteRaster_internal( self, xoff, yoff, xsize, ysize,
    4353            1377 :                                  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              13 :     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               6 :     CPLErrorReset(); 
    4387                 :     CPLErr err = GDALGetRasterHistogram( self, min, max, buckets, panHistogram,
    4388                 :                                          include_out_of_range, approx_ok,
    4389               6 :                                          callback, callback_data );
    4390               6 :     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               4 :                                     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               3 :                   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             367 : 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             367 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    4419             367 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    4420                 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    4421             367 :                                         : (GDALDataType)*buf_type;
    4422             367 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    4423             367 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    4424                 : 
    4425                 :     GIntBig buf_size = ComputeBandRasterIOSize( nxsize, nysize, GDALGetDataTypeSize( ntype ) / 8,
    4426             367 :                                             pixel_space, line_space, FALSE ); 
    4427             367 :     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             366 :     *buf = (void *)PyString_FromStringAndSize( NULL, buf_size ); 
    4443             366 :     if (*buf == NULL)
    4444                 :     {
    4445               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4446               0 :         return CE_Failure;
    4447                 :     }
    4448             366 :     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             366 :                          pixel_space, line_space ); 
    4453             366 :     if (eErr == CE_Failure)
    4454                 :     {
    4455               1 :         Py_DECREF((PyObject*)*buf);
    4456               1 :         *buf = NULL;
    4457                 :     }
    4458             366 :     return eErr;
    4459                 :   }
    4460               1 : SWIGINTERN CPLErr GDALRasterBandShadow_ReadBlock(GDALRasterBandShadow *self,int xoff,int yoff,void **buf){
    4461                 : 
    4462                 :     int nBlockXSize, nBlockYSize;
    4463               1 :     GDALGetBlockSize(self, &nBlockXSize, &nBlockYSize);
    4464               1 :     int nDataTypeSize = (GDALGetDataTypeSize(GDALGetRasterDataType(self)) / 8);
    4465               1 :     GIntBig buf_size = (GIntBig)nBlockXSize * nBlockYSize * nDataTypeSize;
    4466                 : 
    4467                 : #if PY_VERSION_HEX >= 0x03000000 
    4468                 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size ); 
    4469                 :     if (*buf == NULL)
    4470                 :     {
    4471                 :         *buf = Py_None;
    4472                 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4473                 :         return CE_Failure;
    4474                 :     }
    4475                 :     char *data = PyBytes_AsString( (PyObject *)*buf ); 
    4476                 : #else 
    4477               1 :     *buf = (void *)PyString_FromStringAndSize( NULL, buf_size ); 
    4478               1 :     if (*buf == NULL)
    4479                 :     {
    4480               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4481               0 :         return CE_Failure;
    4482                 :     }
    4483               1 :     char *data = PyString_AsString( (PyObject *)*buf ); 
    4484                 : #endif
    4485               1 :     CPLErr eErr = GDALReadBlock( self, xoff, yoff, (void *) data); 
    4486               1 :     if (eErr == CE_Failure)
    4487                 :     {
    4488               0 :         Py_DECREF((PyObject*)*buf);
    4489               0 :         *buf = NULL;
    4490                 :     }
    4491               1 :     return eErr;
    4492                 :   }
    4493                 : 
    4494             598 : GDALDataType GDALRasterBandShadow_DataType_get( GDALRasterBandShadow *h ) {
    4495             598 :   return GDALGetRasterDataType( h );
    4496                 : }
    4497             306 : int GDALRasterBandShadow_XSize_get( GDALRasterBandShadow *h ) {
    4498             306 :   return GDALGetRasterBandXSize( h );
    4499                 : }
    4500             267 : int GDALRasterBandShadow_YSize_get( GDALRasterBandShadow *h ) {
    4501             267 :   return GDALGetRasterBandYSize( h );
    4502                 : }
    4503                 : 
    4504                 : SWIGINTERN GDALColorTableShadow *new_GDALColorTableShadow(GDALPaletteInterp palette=GPI_RGB){
    4505              21 :         return (GDALColorTableShadow*) GDALCreateColorTable(palette);
    4506                 :     }
    4507                 : SWIGINTERN void delete_GDALColorTableShadow(GDALColorTableShadow *self){
    4508              22 :         GDALDestroyColorTable(self);
    4509                 :     }
    4510                 : SWIGINTERN GDALColorTableShadow *GDALColorTableShadow_Clone(GDALColorTableShadow *self){
    4511               1 :         return (GDALColorTableShadow*) GDALCloneColorTable (self);
    4512                 :     }
    4513                 : SWIGINTERN GDALPaletteInterp GDALColorTableShadow_GetPaletteInterpretation(GDALColorTableShadow *self){
    4514               2 :         return GDALGetPaletteInterpretation(self);
    4515                 :     }
    4516                 : SWIGINTERN int GDALColorTableShadow_GetColorEntryCount(GDALColorTableShadow *self){
    4517              22 :         return GDALGetColorEntryCount(self);
    4518                 :     }
    4519                 : SWIGINTERN GDALColorEntry *GDALColorTableShadow_GetColorEntry(GDALColorTableShadow *self,int entry){
    4520             818 :         return (GDALColorEntry*) GDALGetColorEntry(self, entry);
    4521                 :     }
    4522                 : SWIGINTERN int GDALColorTableShadow_GetColorEntryAsRGB(GDALColorTableShadow *self,int entry,GDALColorEntry *centry){
    4523               0 :         return GDALGetColorEntryAsRGB(self, entry, centry);
    4524                 :     }
    4525                 : SWIGINTERN void GDALColorTableShadow_SetColorEntry(GDALColorTableShadow *self,int entry,GDALColorEntry const *centry){
    4526              53 :         GDALSetColorEntry(self, entry, centry);
    4527                 :     }
    4528                 : SWIGINTERN void GDALColorTableShadow_CreateColorRamp(GDALColorTableShadow *self,int nStartIndex,GDALColorEntry const *startcolor,int nEndIndex,GDALColorEntry const *endcolor){
    4529               1 :         GDALCreateColorRamp(self, nStartIndex, startcolor, nEndIndex, endcolor);
    4530                 :     }
    4531                 : SWIGINTERN GDALRasterAttributeTableShadow *new_GDALRasterAttributeTableShadow(){
    4532                 :         return (GDALRasterAttributeTableShadow*) 
    4533               2 :     GDALCreateRasterAttributeTable();
    4534                 :     }
    4535                 : SWIGINTERN void delete_GDALRasterAttributeTableShadow(GDALRasterAttributeTableShadow *self){
    4536               3 :         GDALDestroyRasterAttributeTable(self);
    4537                 :     }
    4538                 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterAttributeTableShadow_Clone(GDALRasterAttributeTableShadow *self){
    4539               1 :         return (GDALRasterAttributeTableShadow*) GDALRATClone(self);
    4540                 :     }
    4541                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColumnCount(GDALRasterAttributeTableShadow *self){ 
    4542               5 :         return GDALRATGetColumnCount( self );
    4543                 :     }
    4544                 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetNameOfCol(GDALRasterAttributeTableShadow *self,int iCol){ 
    4545               4 :         return GDALRATGetNameOfCol( self, iCol );
    4546                 :     }
    4547                 : SWIGINTERN GDALRATFieldUsage GDALRasterAttributeTableShadow_GetUsageOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    4548               6 :         return GDALRATGetUsageOfCol( self, iCol );
    4549                 :     }
    4550                 : SWIGINTERN GDALRATFieldType GDALRasterAttributeTableShadow_GetTypeOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    4551               6 :         return GDALRATGetTypeOfCol( self, iCol );
    4552                 :     }
    4553                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColOfUsage(GDALRasterAttributeTableShadow *self,GDALRATFieldUsage eUsage){
    4554               0 :         return GDALRATGetColOfUsage( self, eUsage );
    4555                 :     }
    4556                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowCount(GDALRasterAttributeTableShadow *self){ 
    4557               3 :         return GDALRATGetRowCount( self );
    4558                 :     }
    4559                 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol){ 
    4560               0 :         return GDALRATGetValueAsString( self, iRow, iCol );
    4561                 :     }
    4562                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol){ 
    4563               6 :         return GDALRATGetValueAsInt( self, iRow, iCol );
    4564                 :     }
    4565                 : SWIGINTERN double GDALRasterAttributeTableShadow_GetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol){ 
    4566               0 :         return GDALRATGetValueAsDouble( self, iRow, iCol );
    4567                 :     }
    4568                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol,char const *pszValue){ 
    4569               0 :         GDALRATSetValueAsString( self, iRow, iCol, pszValue );
    4570                 :     }
    4571                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol,int nValue){ 
    4572               6 :         GDALRATSetValueAsInt( self, iRow, iCol, nValue );
    4573                 :     }
    4574                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol,double dfValue){ 
    4575               0 :         GDALRATSetValueAsDouble( self, iRow, iCol, dfValue );
    4576                 :     }
    4577                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetRowCount(GDALRasterAttributeTableShadow *self,int nCount){
    4578               1 :         GDALRATSetRowCount( self, nCount );
    4579                 :     }
    4580                 : SWIGINTERN int GDALRasterAttributeTableShadow_CreateColumn(GDALRasterAttributeTableShadow *self,char const *pszName,GDALRATFieldType eType,GDALRATFieldUsage eUsage){
    4581               2 :         return GDALRATCreateColumn( self, pszName, eType, eUsage );
    4582                 :     }
    4583                 : SWIGINTERN bool GDALRasterAttributeTableShadow_GetLinearBinning(GDALRasterAttributeTableShadow *self,double *pdfRow0Min,double *pdfBinSize){
    4584               0 :         return (GDALRATGetLinearBinning(self, pdfRow0Min, pdfBinSize) != 0) ? true : false;
    4585                 :     }
    4586                 : SWIGINTERN int GDALRasterAttributeTableShadow_SetLinearBinning(GDALRasterAttributeTableShadow *self,double dfRow0Min,double dfBinSize){
    4587               0 :         return GDALRATSetLinearBinning(self, dfRow0Min, dfBinSize);
    4588                 :     }
    4589                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowOfValue(GDALRasterAttributeTableShadow *self,double dfValue){
    4590               2 :         return GDALRATGetRowOfValue( self, dfValue );
    4591                 :     }
    4592                 : 
    4593                 : #include "gdalgrid.h"
    4594                 : 
    4595                 : #ifdef DEBUG 
    4596                 : typedef struct OGRLayerHS OGRLayerShadow;
    4597                 : typedef struct OGRGeometryHS OGRGeometryShadow;
    4598                 : #else
    4599                 : typedef void OGRLayerShadow;
    4600                 : typedef void OGRGeometryShadow;
    4601                 : #endif
    4602                 : 
    4603                 : 
    4604              61 : int GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
    4605              61 :   return GDALTermProgress( dfProgress, pszMessage, pData);
    4606                 : }
    4607                 : 
    4608                 : 
    4609               3 : int  ComputeMedianCutPCT ( GDALRasterBandShadow *red,
    4610                 :                               GDALRasterBandShadow *green,
    4611                 :                               GDALRasterBandShadow *blue,
    4612                 :                               int num_colors,
    4613                 :                               GDALColorTableShadow* colors,
    4614                 :                               GDALProgressFunc callback = NULL,
    4615                 :                               void* callback_data=NULL) {
    4616                 : 
    4617               3 :     CPLErrorReset();
    4618                 : 
    4619                 :     int err = GDALComputeMedianCutPCT( red,
    4620                 :                                           green,
    4621                 :                                           blue,
    4622                 :                                           NULL,
    4623                 :                                           num_colors,
    4624                 :                                           colors,
    4625                 :                                           callback,
    4626               3 :                                           callback_data);
    4627                 :     
    4628               3 :     return err;
    4629                 : }
    4630                 : 
    4631                 : 
    4632               4 : int  DitherRGB2PCT ( GDALRasterBandShadow *red,
    4633                 :                      GDALRasterBandShadow *green,
    4634                 :                      GDALRasterBandShadow *blue,
    4635                 :                      GDALRasterBandShadow *target,
    4636                 :                      GDALColorTableShadow *colors,
    4637                 :                      GDALProgressFunc callback = NULL,
    4638                 :                      void* callback_data=NULL) {
    4639                 : 
    4640               4 :     CPLErrorReset();
    4641                 :     int err;
    4642                 :     err = GDALDitherRGB2PCT(  red,
    4643                 :                                   green,
    4644                 :                                   blue,
    4645                 :                                   target,
    4646                 :                                   colors,
    4647                 :                                   callback,
    4648               4 :                                   callback_data);
    4649                 :     
    4650               4 :     return err;
    4651                 : }
    4652                 : 
    4653                 : 
    4654               9 : CPLErr  ReprojectImage ( GDALDatasetShadow *src_ds,
    4655                 :                          GDALDatasetShadow *dst_ds,
    4656                 :                          const char *src_wkt=NULL,
    4657                 :                          const char *dst_wkt=NULL,
    4658                 :                          GDALResampleAlg eResampleAlg=GRA_NearestNeighbour,
    4659                 :                          double WarpMemoryLimit=0.0,
    4660                 :                          double maxerror = 0.0,
    4661                 :        GDALProgressFunc callback = NULL,
    4662                 :                        void* callback_data=NULL) {
    4663                 : 
    4664               9 :     CPLErrorReset();
    4665                 : 
    4666                 :     CPLErr err = GDALReprojectImage( src_ds,
    4667                 :                                      src_wkt,
    4668                 :                                      dst_ds,
    4669                 :                                      dst_wkt,
    4670                 :                                      eResampleAlg,
    4671                 :                                      WarpMemoryLimit,
    4672                 :                                      maxerror,
    4673                 :                                      callback,
    4674                 :                                      callback_data,
    4675               9 :                                      NULL);
    4676                 :     
    4677               9 :     return err;
    4678                 : }
    4679                 : 
    4680                 : 
    4681               4 : int  ComputeProximity( GDALRasterBandShadow *srcBand,
    4682                 :                        GDALRasterBandShadow *proximityBand,
    4683                 :                        char **options = NULL,
    4684                 :                        GDALProgressFunc callback=NULL,
    4685                 :                        void* callback_data=NULL) {
    4686                 : 
    4687               4 :     CPLErrorReset();
    4688                 : 
    4689                 :     return GDALComputeProximity( srcBand, proximityBand, options,
    4690               4 :                                  callback, callback_data );
    4691                 : }
    4692                 : 
    4693                 : 
    4694               4 : int  RasterizeLayer( GDALDatasetShadow *dataset,
    4695                 :                  int bands, int *band_list,
    4696                 :                  OGRLayerShadow *layer,
    4697                 :                  void *pfnTransformer = NULL,
    4698                 :                  void *pTransformArg = NULL, 
    4699                 :      int burn_values = 0, double *burn_values_list = NULL, 
    4700                 :                  char **options = NULL,
    4701                 :                  GDALProgressFunc callback=NULL,
    4702                 :                  void* callback_data=NULL) {
    4703                 : 
    4704                 :     CPLErr eErr;
    4705                 : 
    4706               4 :     CPLErrorReset();
    4707                 : 
    4708               4 :     if( burn_values == 0 )
    4709                 :     {
    4710               1 :         burn_values_list = (double *) CPLMalloc(sizeof(double)*bands);
    4711               4 :         for( int i = 0; i < bands; i++ )
    4712               3 :             burn_values_list[i] = 255.0;
    4713                 :     }
    4714               3 :     else if( burn_values != bands )
    4715                 :     {
    4716                 :         CPLError( CE_Failure, CPLE_AppDefined, 
    4717               0 :                   "Did not get the expected number of burn values in RasterizeLayer()" );
    4718               0 :         return CE_Failure;
    4719                 :     }
    4720                 : 
    4721                 :     eErr = GDALRasterizeLayers( dataset, bands, band_list,
    4722                 :                                 1, &layer, 
    4723                 :                                 (GDALTransformerFunc) pfnTransformer, 
    4724                 :                                 pTransformArg,
    4725                 :                                 burn_values_list, options, 
    4726               4 :                                 callback, callback_data );
    4727                 : 
    4728               4 :     if( burn_values == 0 )
    4729               1 :         CPLFree( burn_values_list );
    4730                 : 
    4731               4 :     return eErr;
    4732                 : }
    4733                 : 
    4734                 : 
    4735               6 : int  Polygonize( GDALRasterBandShadow *srcBand,
    4736                 :          GDALRasterBandShadow *maskBand,
    4737                 :              OGRLayerShadow *outLayer, 
    4738                 :                  int iPixValField,
    4739                 :                  char **options = NULL,
    4740                 :                  GDALProgressFunc callback=NULL,
    4741                 :                  void* callback_data=NULL) {
    4742                 : 
    4743               6 :     CPLErrorReset();
    4744                 : 
    4745                 :     return GDALPolygonize( srcBand, maskBand, outLayer, iPixValField,
    4746               6 :                            options, callback, callback_data );
    4747                 : }
    4748                 : 
    4749                 : 
    4750               1 : int  FillNodata( GDALRasterBandShadow *targetBand,
    4751                 :          GDALRasterBandShadow *maskBand,
    4752                 :                  double maxSearchDist,
    4753                 :                  int smoothingIterations,
    4754                 :                  char **options = NULL,
    4755                 :                  GDALProgressFunc callback=NULL,
    4756                 :                  void* callback_data=NULL) {
    4757                 : 
    4758               1 :     CPLErrorReset();
    4759                 : 
    4760                 :     return GDALFillNodata( targetBand, maskBand, maxSearchDist, 
    4761                 :                0, smoothingIterations, options, 
    4762               1 :          callback, callback_data );
    4763                 : }
    4764                 : 
    4765                 : 
    4766               6 : int  SieveFilter( GDALRasterBandShadow *srcBand,
    4767                 :           GDALRasterBandShadow *maskBand,
    4768                 :               GDALRasterBandShadow *dstBand,
    4769                 :                   int threshold, int connectedness=4,
    4770                 :                   char **options = NULL,
    4771                 :                   GDALProgressFunc callback=NULL,
    4772                 :                   void* callback_data=NULL) {
    4773                 : 
    4774               6 :     CPLErrorReset();
    4775                 : 
    4776                 :     return GDALSieveFilter( srcBand, maskBand, dstBand, 
    4777                 :                             threshold, connectedness,
    4778               6 :                             options, callback, callback_data );
    4779                 : }
    4780                 : 
    4781                 : 
    4782               2 : int  RegenerateOverviews( GDALRasterBandShadow *srcBand,
    4783                 :             int overviewBandCount,
    4784                 :                           GDALRasterBandShadow **overviewBands,
    4785                 :                           const char *resampling = "average",
    4786                 :                           GDALProgressFunc callback=NULL,
    4787                 :                           void* callback_data=NULL) {
    4788                 : 
    4789               2 :     CPLErrorReset();
    4790                 : 
    4791                 :     return GDALRegenerateOverviews( srcBand, overviewBandCount, overviewBands,
    4792               2 :                   resampling ? resampling : "average", callback, callback_data );
    4793                 : }
    4794                 : 
    4795                 : 
    4796               2 : int  RegenerateOverview( GDALRasterBandShadow *srcBand,
    4797                 :                           GDALRasterBandShadow *overviewBand,
    4798                 :                           const char *resampling = "average",
    4799                 :                           GDALProgressFunc callback=NULL,
    4800                 :                           void* callback_data=NULL) {
    4801                 : 
    4802               2 :     CPLErrorReset();
    4803                 : 
    4804                 :     return GDALRegenerateOverviews( srcBand, 1, &overviewBand,
    4805               2 :                   resampling ? resampling : "average", callback, callback_data );
    4806                 : }
    4807                 : 
    4808                 : 
    4809               2 : int ContourGenerate( GDALRasterBandShadow *srcBand,
    4810                 :                      double contourInterval,
    4811                 :                      double contourBase,
    4812                 :                      int fixedLevelCount,
    4813                 :                      double *fixedLevels,
    4814                 :                      int useNoData,
    4815                 :                      double noDataValue,
    4816                 :                      OGRLayerShadow* dstLayer, 
    4817                 :                      int idField,
    4818                 :                      int elevField,
    4819                 :                      GDALProgressFunc callback = NULL,
    4820                 :                      void* callback_data = NULL)
    4821                 : {
    4822                 :     CPLErr eErr;
    4823                 : 
    4824               2 :     CPLErrorReset();
    4825                 : 
    4826                 :     eErr =  GDALContourGenerate( srcBand,
    4827                 :                                  contourInterval,
    4828                 :                                  contourBase,
    4829                 :                                  fixedLevelCount,
    4830                 :                                  fixedLevels,
    4831                 :                                  useNoData,
    4832                 :                                  noDataValue,
    4833                 :                                  dstLayer,
    4834                 :                                  idField,
    4835                 :                                  elevField,
    4836                 :                                  callback,
    4837               2 :                                  callback_data);
    4838                 : 
    4839               2 :     return eErr;
    4840                 : }
    4841                 : 
    4842                 : 
    4843              14 : GDALDatasetShadow *AutoCreateWarpedVRT( GDALDatasetShadow *src_ds,
    4844                 :                                         const char *src_wkt = 0,
    4845                 :                                         const char *dst_wkt = 0,
    4846                 :                                         GDALResampleAlg eResampleAlg = GRA_NearestNeighbour,
    4847                 :                                         double maxerror = 0.0 ) {
    4848                 :   GDALDatasetShadow *ds = GDALAutoCreateWarpedVRT( src_ds, src_wkt,
    4849                 :                                                    dst_wkt,
    4850                 :                                                    eResampleAlg,
    4851                 :                                                    maxerror,
    4852              14 :                                                    0 );
    4853                 :   if (ds == 0) {
    4854                 :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    4855                 :   }
    4856              14 :   return ds;
    4857                 :   
    4858                 : }
    4859                 : 
    4860                 : SWIGINTERN GDALTransformerInfoShadow *new_GDALTransformerInfoShadow(GDALDatasetShadow *src,GDALDatasetShadow *dst,char **options){
    4861                 :     GDALTransformerInfoShadow *obj = (GDALTransformerInfoShadow*) 
    4862                 :        GDALCreateGenImgProjTransformer2( (GDALDatasetH)src, (GDALDatasetH)dst, 
    4863               9 :                                          options );
    4864               9 :     return obj;
    4865                 :   }
    4866                 : SWIGINTERN void delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow *self){
    4867               9 :     GDALDestroyTransformer( self );
    4868                 :   }
    4869                 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_0(GDALTransformerInfoShadow *self,int bDstToSrc,double inout[3]){
    4870               0 :     int nRet, nSuccess = TRUE;
    4871                 : 
    4872                 :     nRet = GDALUseTransformer( self, bDstToSrc, 
    4873                 :                                1, &inout[0], &inout[1], &inout[2], 
    4874               0 :                                &nSuccess );
    4875                 : 
    4876               0 :     return nRet && nSuccess;
    4877                 :   }
    4878                 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_1(GDALTransformerInfoShadow *self,double argout[3],int bDstToSrc,double x,double y,double z=0.0){
    4879              16 :     int nRet, nSuccess = TRUE;
    4880                 :     
    4881              16 :     argout[0] = x;
    4882              16 :     argout[1] = y;
    4883              16 :     argout[2] = z;
    4884                 :     nRet = GDALUseTransformer( self, bDstToSrc, 
    4885                 :                                1, &argout[0], &argout[1], &argout[2], 
    4886              16 :                                &nSuccess );
    4887                 : 
    4888              16 :     return nRet && nSuccess;
    4889                 :   }
    4890                 : 
    4891                 : static int
    4892               1 : DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z )
    4893                 : {
    4894               2 :   for( int i = 0; i<nCount; ++i )
    4895                 :   {
    4896                 : 
    4897               1 :     PyObject *o = PySequence_GetItem(seq, i);
    4898               1 :     if ( !PySequence_Check(o) )
    4899                 :     {
    4900               0 :         Py_DECREF(o);
    4901               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
    4902                 : 
    4903               0 :         return FALSE;
    4904                 :     }
    4905                 : 
    4906               1 :     Py_ssize_t len = PySequence_Size(o);
    4907                 : 
    4908               1 :     if (len == 2 || len == 3)
    4909                 :     {
    4910               1 :         PyObject *o1 = PySequence_GetItem(o, 0);
    4911               1 :         if (!PyNumber_Check(o1))
    4912                 :         {
    4913               0 :             Py_DECREF(o); Py_DECREF(o1);
    4914               0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    4915                 : 
    4916               0 :             return FALSE;
    4917                 :         }
    4918               1 :         x[i] = PyFloat_AsDouble(o1);
    4919               1 :         Py_DECREF(o1);
    4920                 : 
    4921               1 :         o1 = PySequence_GetItem(o, 1);
    4922               1 :         if (!PyNumber_Check(o1))
    4923                 :         {
    4924               0 :             Py_DECREF(o); Py_DECREF(o1);
    4925               0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    4926                 : 
    4927               0 :             return FALSE;
    4928                 :         }
    4929               1 :         y[i] = PyFloat_AsDouble(o1);
    4930               1 :         Py_DECREF(o1);
    4931                 : 
    4932                 :         /* The 3rd coordinate is optional, default 0.0 */
    4933               1 :         if (len == 3)
    4934                 :         {
    4935               0 :             o1 = PySequence_GetItem(o, 2);
    4936               0 :             if (!PyNumber_Check(o1))
    4937                 :             {
    4938               0 :                 Py_DECREF(o); Py_DECREF(o1);
    4939               0 :                 PyErr_SetString(PyExc_TypeError, "not a number");
    4940                 : 
    4941               0 :                 return FALSE;
    4942                 :             }
    4943               0 :             z[i] = PyFloat_AsDouble(o1);
    4944               0 :             Py_DECREF(o1);
    4945                 :         }
    4946                 :         else
    4947                 :         {
    4948               1 :             z[i] = 0.0;
    4949                 :         }
    4950                 :     }
    4951                 :     else
    4952                 :     {
    4953               0 :         Py_DECREF(o);
    4954               0 :         PyErr_SetString(PyExc_TypeError, "invalid coordinate");
    4955                 : 
    4956               0 :         return FALSE;
    4957                 :     }
    4958                 : 
    4959               1 :     Py_DECREF(o);
    4960                 :   }
    4961                 : 
    4962               1 :   return TRUE;
    4963                 : }
    4964                 : 
    4965                 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow *self,int bDstToSrc,int nCount,double *x,double *y,double *z,int *panSuccess){
    4966                 :     int nRet;
    4967                 : 
    4968               1 :     nRet = GDALUseTransformer( self, bDstToSrc, nCount, x, y, z, panSuccess );
    4969                 : 
    4970               1 :     return nRet;
    4971                 :   }
    4972                 : SWIGINTERN int GDALTransformerInfoShadow_TransformGeolocations(GDALTransformerInfoShadow *self,GDALRasterBandShadow *xBand,GDALRasterBandShadow *yBand,GDALRasterBandShadow *zBand,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=NULL){
    4973                 : 
    4974               1 :     CPLErrorReset();
    4975                 : 
    4976                 :     return GDALTransformGeolocations( xBand, yBand, zBand, 
    4977                 :                                       GDALUseTransformer, self,
    4978               1 :                                     callback, callback_data, options );
    4979                 :   }
    4980                 : 
    4981              10 : GIntBig wrapper_GDALGetCacheMax()
    4982                 : {
    4983              10 :     return GDALGetCacheMax64();
    4984                 : }
    4985                 : 
    4986                 : 
    4987               2 : GIntBig wrapper_GDALGetCacheUsed()
    4988                 : {
    4989               2 :     return GDALGetCacheUsed64();
    4990                 : }
    4991                 : 
    4992                 : 
    4993              12 : void wrapper_GDALSetCacheMax(GIntBig nBytes)
    4994                 : {
    4995              12 :     return GDALSetCacheMax64(nBytes);
    4996                 : }
    4997                 : 
    4998                 : 
    4999                 : /************************************************************************/
    5000                 : /*                          XMLTreeToPyList()                           */
    5001                 : /************************************************************************/
    5002             127 : static PyObject *XMLTreeToPyList( CPLXMLNode *psTree )
    5003                 : {
    5004                 :     PyObject *pyList;
    5005             127 :     int      nChildCount = 0, iChild;
    5006                 :     CPLXMLNode *psChild;
    5007                 : 
    5008             248 :     for( psChild = psTree->psChild; 
    5009                 :          psChild != NULL; 
    5010                 :          psChild = psChild->psNext )
    5011             121 :         nChildCount++;
    5012                 : 
    5013             127 :     pyList = PyList_New(nChildCount+2);
    5014                 : 
    5015             127 :     PyList_SetItem( pyList, 0, Py_BuildValue( "i", (int) psTree->eType ) );
    5016             127 :     PyList_SetItem( pyList, 1, Py_BuildValue( "s", psTree->pszValue ) );
    5017                 : 
    5018             248 :     for( psChild = psTree->psChild, iChild = 2; 
    5019                 :          psChild != NULL; 
    5020                 :          psChild = psChild->psNext, iChild++ )
    5021                 :     {
    5022             121 :         PyList_SetItem( pyList, iChild, XMLTreeToPyList( psChild ) );
    5023                 :     }
    5024                 : 
    5025             127 :     return pyList; 
    5026                 : }
    5027                 : 
    5028                 : 
    5029                 : /************************************************************************/
    5030                 : /*                          PyListToXMLTree()                           */
    5031                 : /************************************************************************/
    5032              11 : static CPLXMLNode *PyListToXMLTree( PyObject *pyList )
    5033                 : 
    5034                 : {
    5035              11 :     int      nChildCount = 0, iChild, nType;
    5036                 :     CPLXMLNode *psThisNode;
    5037                 :     CPLXMLNode *psChild;
    5038              11 :     char       *pszText = NULL;
    5039                 : 
    5040              11 :     nChildCount = PyList_Size(pyList) - 2;
    5041              11 :     if( nChildCount < 0 )
    5042                 :     {
    5043               0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    5044               0 :         return NULL;
    5045                 :     }
    5046                 : 
    5047              11 :     PyArg_Parse( PyList_GET_ITEM(pyList,0), "i", &nType );
    5048              11 :     PyArg_Parse( PyList_GET_ITEM(pyList,1), "s", &pszText );
    5049                 : 
    5050                 :     /* Detect "pseudo" root */
    5051              11 :     if (nType == CXT_Element && pszText != NULL && strlen(pszText) == 0 && nChildCount == 2)
    5052                 :     {
    5053               1 :         PyObject *pyFirst = PyList_GET_ITEM(pyList, 2);
    5054               1 :         if (PyList_Size(pyFirst) < 2)
    5055                 :         {
    5056               0 :             PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    5057               0 :             return NULL;
    5058                 :         }
    5059               1 :         int nTypeFirst = 0;
    5060               1 :         char* pszTextFirst = NULL;
    5061               1 :         PyArg_Parse( PyList_GET_ITEM(pyFirst,0), "i", &nTypeFirst );
    5062               1 :         PyArg_Parse( PyList_GET_ITEM(pyFirst,1), "s", &pszTextFirst );
    5063               1 :         if (nTypeFirst == CXT_Element && pszTextFirst != NULL && pszTextFirst[0] == '?')
    5064                 :         {
    5065               1 :             psThisNode = PyListToXMLTree( PyList_GET_ITEM(pyList,2) );
    5066               1 :             psThisNode->psNext = PyListToXMLTree( PyList_GET_ITEM(pyList,3) );
    5067               1 :             return psThisNode;
    5068                 :         }
    5069                 :     }
    5070                 : 
    5071              10 :     psThisNode = CPLCreateXMLNode( NULL, (CPLXMLNodeType) nType, pszText );
    5072                 : 
    5073              17 :     for( iChild = 0; iChild < nChildCount; iChild++ )
    5074                 :     {
    5075               7 :         psChild = PyListToXMLTree( PyList_GET_ITEM(pyList,iChild+2) );
    5076               7 :         CPLAddXMLChild( psThisNode, psChild );
    5077                 :     }
    5078                 : 
    5079              10 :     return psThisNode;
    5080                 : }
    5081                 : 
    5082                 : 
    5083              18 : int GetDriverCount() {
    5084              18 :   return GDALGetDriverCount();
    5085                 : }
    5086                 : 
    5087                 : 
    5088            2156 : GDALDriverShadow* GetDriverByName( char const *name ) {
    5089            2156 :   return (GDALDriverShadow*) GDALGetDriverByName( name );
    5090                 : }
    5091                 : 
    5092                 : 
    5093            2322 : GDALDriverShadow* GetDriver( int i ) {
    5094            2322 :   return (GDALDriverShadow*) GDALGetDriver( i );
    5095                 : }
    5096                 : 
    5097                 : 
    5098            4452 : GDALDatasetShadow* Open( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    5099            4452 :   CPLErrorReset();
    5100            4452 :   GDALDatasetShadow *ds = GDALOpen( utf8_path, eAccess );
    5101            4452 :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    5102                 :   {
    5103               4 :       if ( GDALDereferenceDataset( ds ) <= 0 )
    5104               4 :           GDALClose(ds);
    5105               4 :       ds = NULL;
    5106                 :   }
    5107            4452 :   return (GDALDatasetShadow*) ds;
    5108                 : }
    5109                 : 
    5110                 : 
    5111            5004 : GDALDatasetShadow* OpenShared( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    5112            5004 :   CPLErrorReset();
    5113            5004 :   GDALDatasetShadow *ds = GDALOpenShared( utf8_path, eAccess );
    5114            5004 :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    5115                 :   {
    5116               0 :       if ( GDALDereferenceDataset( ds ) <= 0 )
    5117               0 :           GDALClose(ds);
    5118               0 :       ds = NULL;
    5119                 :   }
    5120            5004 :   return (GDALDatasetShadow*) ds;
    5121                 : }
    5122                 : 
    5123                 : 
    5124               6 : GDALDriverShadow *IdentifyDriver( const char *utf8_path, 
    5125                 :                                   char **papszSiblings = NULL ) {
    5126                 :     return (GDALDriverShadow *) GDALIdentifyDriver( utf8_path, 
    5127               6 :                                               papszSiblings );
    5128                 : }
    5129                 : 
    5130                 : 
    5131              44 :   char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    5132                 :     int nResArgCount;
    5133                 : 
    5134                 :     nResArgCount = 
    5135              44 :       GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions ); 
    5136                 : 
    5137              44 :     if( nResArgCount <= 0 )
    5138               0 :         return NULL;
    5139                 :     else
    5140              44 :         return papszArgv;
    5141                 :   }
    5142                 : 
    5143                 : #ifdef __cplusplus
    5144                 : extern "C" {
    5145                 : #endif
    5146               1 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5147               1 :   PyObject *resultobj = 0;
    5148                 :   int result;
    5149                 :   
    5150               1 :   if (!PyArg_ParseTuple(args,(char *)":GetUseExceptions")) SWIG_fail;
    5151               1 :   result = (int)GetUseExceptions();
    5152               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5153               1 :   return resultobj;
    5154                 : fail:
    5155               0 :   return NULL;
    5156                 : }
    5157                 : 
    5158                 : 
    5159               1 : SWIGINTERN PyObject *_wrap_UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5160               1 :   PyObject *resultobj = 0;
    5161                 :   
    5162               1 :   if (!PyArg_ParseTuple(args,(char *)":UseExceptions")) SWIG_fail;
    5163               1 :   UseExceptions();
    5164               1 :   resultobj = SWIG_Py_Void();
    5165               1 :   return resultobj;
    5166                 : fail:
    5167               0 :   return NULL;
    5168                 : }
    5169                 : 
    5170                 : 
    5171               1 : SWIGINTERN PyObject *_wrap_DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5172               1 :   PyObject *resultobj = 0;
    5173                 :   
    5174               1 :   if (!PyArg_ParseTuple(args,(char *)":DontUseExceptions")) SWIG_fail;
    5175               1 :   DontUseExceptions();
    5176               1 :   resultobj = SWIG_Py_Void();
    5177               1 :   return resultobj;
    5178                 : fail:
    5179               0 :   return NULL;
    5180                 : }
    5181                 : 
    5182                 : 
    5183              35 : SWIGINTERN PyObject *_wrap_VSIFReadL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5184              35 :   PyObject *resultobj = 0;
    5185              35 :   void **arg1 = (void **) 0 ;
    5186                 :   int arg2 ;
    5187                 :   int arg3 ;
    5188              35 :   VSILFILE *arg4 = (VSILFILE *) 0 ;
    5189              35 :   void *pyObject1 = NULL ;
    5190                 :   int val2 ;
    5191              35 :   int ecode2 = 0 ;
    5192                 :   int val3 ;
    5193              35 :   int ecode3 = 0 ;
    5194                 :   int res4 ;
    5195              35 :   PyObject * obj0 = 0 ;
    5196              35 :   PyObject * obj1 = 0 ;
    5197              35 :   PyObject * obj2 = 0 ;
    5198                 :   int result;
    5199                 :   
    5200                 :   {
    5201                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject1 = NULL ) */
    5202              35 :     arg1 = &pyObject1;
    5203                 :   }
    5204              35 :   if (!PyArg_ParseTuple(args,(char *)"OOO:VSIFReadL",&obj0,&obj1,&obj2)) SWIG_fail;
    5205              35 :   ecode2 = SWIG_AsVal_int(obj0, &val2);
    5206              35 :   if (!SWIG_IsOK(ecode2)) {
    5207               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VSIFReadL" "', argument " "2"" of type '" "int""'");
    5208                 :   } 
    5209              35 :   arg2 = static_cast< int >(val2);
    5210              35 :   ecode3 = SWIG_AsVal_int(obj1, &val3);
    5211              35 :   if (!SWIG_IsOK(ecode3)) {
    5212               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFReadL" "', argument " "3"" of type '" "int""'");
    5213                 :   } 
    5214              35 :   arg3 = static_cast< int >(val3);
    5215              35 :   res4 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg4), 0, 0);
    5216              35 :   if (!SWIG_IsOK(res4)) {
    5217               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VSIFReadL" "', argument " "4"" of type '" "VSILFILE *""'"); 
    5218                 :   }
    5219                 :   {
    5220              35 :     if ( bUseExceptions ) {
    5221               0 :       CPLErrorReset();
    5222                 :     }
    5223              35 :     result = (int)wrapper_VSIFReadL(arg1,arg2,arg3,arg4);
    5224              35 :     if ( bUseExceptions ) {
    5225               0 :       CPLErr eclass = CPLGetLastErrorType();
    5226               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5227               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5228                 :       }
    5229                 :     }
    5230                 :   }
    5231              35 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5232                 :   {
    5233                 :     /* %typemap(argout) ( void **outPythonObject ) */
    5234              35 :     Py_XDECREF(resultobj);
    5235              35 :     if (*arg1)
    5236                 :     {
    5237              35 :       resultobj = (PyObject*)*arg1;
    5238                 :     }
    5239                 :     else
    5240                 :     {
    5241               0 :       resultobj = Py_None;
    5242               0 :       Py_INCREF(resultobj);
    5243                 :     }
    5244                 :   }
    5245              35 :   return resultobj;
    5246                 : fail:
    5247               0 :   return NULL;
    5248                 : }
    5249                 : 
    5250                 : 
    5251             291 : SWIGINTERN PyObject *_wrap_Debug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5252             291 :   PyObject *resultobj = 0;
    5253             291 :   char *arg1 = (char *) 0 ;
    5254             291 :   char *arg2 = (char *) 0 ;
    5255                 :   int res1 ;
    5256             291 :   char *buf1 = 0 ;
    5257             291 :   int alloc1 = 0 ;
    5258                 :   int res2 ;
    5259             291 :   char *buf2 = 0 ;
    5260             291 :   int alloc2 = 0 ;
    5261             291 :   PyObject * obj0 = 0 ;
    5262             291 :   PyObject * obj1 = 0 ;
    5263                 :   
    5264             291 :   if (!PyArg_ParseTuple(args,(char *)"OO:Debug",&obj0,&obj1)) SWIG_fail;
    5265             291 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5266             291 :   if (!SWIG_IsOK(res1)) {
    5267               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Debug" "', argument " "1"" of type '" "char const *""'");
    5268                 :   }
    5269             291 :   arg1 = reinterpret_cast< char * >(buf1);
    5270             291 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5271             291 :   if (!SWIG_IsOK(res2)) {
    5272               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Debug" "', argument " "2"" of type '" "char const *""'");
    5273                 :   }
    5274             291 :   arg2 = reinterpret_cast< char * >(buf2);
    5275                 :   {
    5276             291 :     if ( bUseExceptions ) {
    5277               0 :       CPLErrorReset();
    5278                 :     }
    5279             291 :     Debug((char const *)arg1,(char const *)arg2);
    5280             291 :     if ( bUseExceptions ) {
    5281               0 :       CPLErr eclass = CPLGetLastErrorType();
    5282               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5283               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5284                 :       }
    5285                 :     }
    5286                 :   }
    5287             291 :   resultobj = SWIG_Py_Void();
    5288             291 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5289             291 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5290             291 :   return resultobj;
    5291                 : fail:
    5292               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5293               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5294               0 :   return NULL;
    5295                 : }
    5296                 : 
    5297                 : 
    5298            1190 : SWIGINTERN PyObject *_wrap_PushErrorHandler__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5299            1190 :   PyObject *resultobj = 0;
    5300            1190 :   char *arg1 = (char *) NULL ;
    5301                 :   int res1 ;
    5302            1190 :   char *buf1 = 0 ;
    5303            1190 :   int alloc1 = 0 ;
    5304            1190 :   PyObject * obj0 = 0 ;
    5305                 :   CPLErr result;
    5306                 :   
    5307            1190 :   if (!PyArg_ParseTuple(args,(char *)"|O:PushErrorHandler",&obj0)) SWIG_fail;
    5308            1190 :   if (obj0) {
    5309            1190 :     res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5310            1190 :     if (!SWIG_IsOK(res1)) {
    5311               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PushErrorHandler" "', argument " "1"" of type '" "char const *""'");
    5312                 :     }
    5313            1190 :     arg1 = reinterpret_cast< char * >(buf1);
    5314                 :   }
    5315                 :   {
    5316            1190 :     if ( bUseExceptions ) {
    5317               0 :       CPLErrorReset();
    5318                 :     }
    5319            1190 :     result = (CPLErr)PushErrorHandler((char const *)arg1);
    5320            1190 :     if ( bUseExceptions ) {
    5321               0 :       CPLErr eclass = CPLGetLastErrorType();
    5322               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5323               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5324                 :       }
    5325                 :     }
    5326                 :   }
    5327            2380 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5328            1190 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5329                 :   {
    5330                 :     /* %typemap(ret) CPLErr */
    5331            1190 :     if ( bUseExceptions == 0 ) {
    5332                 :       /* We're not using exceptions.  And no error has occurred */
    5333            1190 :       if ( resultobj == 0 ) {
    5334                 :         /* No other return values set so return ErrorCode */
    5335               0 :         resultobj = PyInt_FromLong(result);
    5336                 :       }
    5337                 :     }
    5338                 :   }
    5339            1190 :   return resultobj;
    5340                 : fail:
    5341               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5342               0 :   return NULL;
    5343                 : }
    5344                 : 
    5345                 : 
    5346               0 : SWIGINTERN PyObject *_wrap_Error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5347               0 :   PyObject *resultobj = 0;
    5348               0 :   CPLErr arg1 = (CPLErr) CE_Failure ;
    5349               0 :   int arg2 = (int) 0 ;
    5350               0 :   char *arg3 = (char *) "error" ;
    5351                 :   int val1 ;
    5352               0 :   int ecode1 = 0 ;
    5353                 :   int val2 ;
    5354               0 :   int ecode2 = 0 ;
    5355                 :   int res3 ;
    5356               0 :   char *buf3 = 0 ;
    5357               0 :   int alloc3 = 0 ;
    5358               0 :   PyObject * obj0 = 0 ;
    5359               0 :   PyObject * obj1 = 0 ;
    5360               0 :   PyObject * obj2 = 0 ;
    5361                 :   
    5362               0 :   if (!PyArg_ParseTuple(args,(char *)"|OOO:Error",&obj0,&obj1,&obj2)) SWIG_fail;
    5363               0 :   if (obj0) {
    5364               0 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
    5365               0 :     if (!SWIG_IsOK(ecode1)) {
    5366               0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Error" "', argument " "1"" of type '" "CPLErr""'");
    5367                 :     } 
    5368               0 :     arg1 = static_cast< CPLErr >(val1);
    5369                 :   }
    5370               0 :   if (obj1) {
    5371               0 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
    5372               0 :     if (!SWIG_IsOK(ecode2)) {
    5373               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Error" "', argument " "2"" of type '" "int""'");
    5374                 :     } 
    5375               0 :     arg2 = static_cast< int >(val2);
    5376                 :   }
    5377               0 :   if (obj2) {
    5378               0 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    5379               0 :     if (!SWIG_IsOK(res3)) {
    5380               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Error" "', argument " "3"" of type '" "char const *""'");
    5381                 :     }
    5382               0 :     arg3 = reinterpret_cast< char * >(buf3);
    5383                 :   }
    5384                 :   {
    5385               0 :     if ( bUseExceptions ) {
    5386               0 :       CPLErrorReset();
    5387                 :     }
    5388               0 :     Error(arg1,arg2,(char const *)arg3);
    5389               0 :     if ( bUseExceptions ) {
    5390               0 :       CPLErr eclass = CPLGetLastErrorType();
    5391               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5392               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5393                 :       }
    5394                 :     }
    5395                 :   }
    5396               0 :   resultobj = SWIG_Py_Void();
    5397               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    5398               0 :   return resultobj;
    5399                 : fail:
    5400               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    5401               0 :   return NULL;
    5402                 : }
    5403                 : 
    5404                 : 
    5405               0 : SWIGINTERN PyObject *_wrap_PushErrorHandler__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5406               0 :   PyObject *resultobj = 0;
    5407                 :   CPLErrorHandler arg1 ;
    5408                 :   void *argp1 ;
    5409               0 :   int res1 = 0 ;
    5410               0 :   PyObject * obj0 = 0 ;
    5411                 :   
    5412               0 :   if (!PyArg_ParseTuple(args,(char *)"O:PushErrorHandler",&obj0)) SWIG_fail;
    5413                 :   {
    5414               0 :     res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CPLErrorHandler,  0  | 0);
    5415               0 :     if (!SWIG_IsOK(res1)) {
    5416               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PushErrorHandler" "', argument " "1"" of type '" "CPLErrorHandler""'"); 
    5417                 :     }  
    5418               0 :     if (!argp1) {
    5419               0 :       SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PushErrorHandler" "', argument " "1"" of type '" "CPLErrorHandler""'");
    5420                 :     } else {
    5421               0 :       CPLErrorHandler * temp = reinterpret_cast< CPLErrorHandler * >(argp1);
    5422               0 :       arg1 = *temp;
    5423               0 :       if (SWIG_IsNewObj(res1)) delete temp;
    5424                 :     }
    5425                 :   }
    5426                 :   {
    5427               0 :     if ( bUseExceptions ) {
    5428               0 :       CPLErrorReset();
    5429                 :     }
    5430               0 :     CPLPushErrorHandler(arg1);
    5431               0 :     if ( bUseExceptions ) {
    5432               0 :       CPLErr eclass = CPLGetLastErrorType();
    5433               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5434               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5435                 :       }
    5436                 :     }
    5437                 :   }
    5438               0 :   resultobj = SWIG_Py_Void();
    5439               0 :   return resultobj;
    5440                 : fail:
    5441               0 :   return NULL;
    5442                 : }
    5443                 : 
    5444                 : 
    5445            1190 : SWIGINTERN PyObject *_wrap_PushErrorHandler(PyObject *self, PyObject *args) {
    5446                 :   int argc;
    5447                 :   PyObject *argv[2];
    5448                 :   int ii;
    5449                 :   
    5450            1190 :   if (!PyTuple_Check(args)) SWIG_fail;
    5451            1190 :   argc = (int)PyObject_Length(args);
    5452            2380 :   for (ii = 0; (ii < argc) && (ii < 1); ii++) {
    5453            1190 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    5454                 :   }
    5455            1190 :   if ((argc >= 0) && (argc <= 1)) {
    5456                 :     int _v;
    5457            1190 :     if (argc <= 0) {
    5458               0 :       return _wrap_PushErrorHandler__SWIG_0(self, args);
    5459                 :     }
    5460            1190 :     int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    5461            1190 :     _v = SWIG_CheckState(res);
    5462            1190 :     if (_v) {
    5463            1190 :       return _wrap_PushErrorHandler__SWIG_0(self, args);
    5464                 :     }
    5465                 :   }
    5466               0 :   if (argc == 1) {
    5467                 :     int _v;
    5468               0 :     int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_CPLErrorHandler, 0);
    5469               0 :     _v = SWIG_CheckState(res);
    5470               0 :     if (_v) {
    5471               0 :       return _wrap_PushErrorHandler__SWIG_1(self, args);
    5472                 :     }
    5473                 :   }
    5474                 :   
    5475                 : fail:
    5476                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PushErrorHandler'.\n"
    5477                 :     "  Possible C/C++ prototypes are:\n"
    5478                 :     "    PushErrorHandler(char const *)\n"
    5479               0 :     "    CPLPushErrorHandler(CPLErrorHandler)\n");
    5480               0 :   return NULL;
    5481                 : }
    5482                 : 
    5483                 : 
    5484            1190 : SWIGINTERN PyObject *_wrap_PopErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5485            1190 :   PyObject *resultobj = 0;
    5486                 :   
    5487            1190 :   if (!PyArg_ParseTuple(args,(char *)":PopErrorHandler")) SWIG_fail;
    5488                 :   {
    5489            1190 :     if ( bUseExceptions ) {
    5490               0 :       CPLErrorReset();
    5491                 :     }
    5492            1190 :     CPLPopErrorHandler();
    5493            1190 :     if ( bUseExceptions ) {
    5494               0 :       CPLErr eclass = CPLGetLastErrorType();
    5495               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5496               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5497                 :       }
    5498                 :     }
    5499                 :   }
    5500            1190 :   resultobj = SWIG_Py_Void();
    5501            1190 :   return resultobj;
    5502                 : fail:
    5503               0 :   return NULL;
    5504                 : }
    5505                 : 
    5506                 : 
    5507            1058 : SWIGINTERN PyObject *_wrap_ErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5508            1058 :   PyObject *resultobj = 0;
    5509                 :   
    5510            1058 :   if (!PyArg_ParseTuple(args,(char *)":ErrorReset")) SWIG_fail;
    5511                 :   {
    5512            1058 :     if ( bUseExceptions ) {
    5513               0 :       CPLErrorReset();
    5514                 :     }
    5515            1058 :     CPLErrorReset();
    5516            1058 :     if ( bUseExceptions ) {
    5517               0 :       CPLErr eclass = CPLGetLastErrorType();
    5518               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5519               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5520                 :       }
    5521                 :     }
    5522                 :   }
    5523            1058 :   resultobj = SWIG_Py_Void();
    5524            1058 :   return resultobj;
    5525                 : fail:
    5526               0 :   return NULL;
    5527                 : }
    5528                 : 
    5529                 : 
    5530               0 : SWIGINTERN PyObject *_wrap_EscapeString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    5531               0 :   PyObject *resultobj = 0;
    5532                 :   int arg1 ;
    5533               0 :   char *arg2 = (char *) 0 ;
    5534               0 :   int arg3 = (int) CPLES_SQL ;
    5535               0 :   int alloc1 = 0 ;
    5536                 :   int val3 ;
    5537               0 :   int ecode3 = 0 ;
    5538               0 :   PyObject * obj0 = 0 ;
    5539               0 :   PyObject * obj1 = 0 ;
    5540                 :   char *  kwnames[] = {
    5541                 :     (char *) "len",(char *) "scheme", NULL 
    5542               0 :   };
    5543               0 :   retStringAndCPLFree *result = 0 ;
    5544                 :   
    5545               0 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:EscapeString",kwnames,&obj0,&obj1)) SWIG_fail;
    5546                 :   {
    5547                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    5548                 : #if PY_VERSION_HEX>=0x03000000
    5549                 :     if (PyUnicode_Check(obj0))
    5550                 :     {
    5551                 :       size_t safeLen = 0;
    5552                 :       int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
    5553                 :       if (!SWIG_IsOK(ret)) {
    5554                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    5555                 :       }
    5556                 :       
    5557                 :       if (safeLen) safeLen--;
    5558                 :       arg1 = (int) safeLen;
    5559                 :     }
    5560                 :     else if (PyBytes_Check(obj0))
    5561                 :     {
    5562                 :       Py_ssize_t safeLen = 0;
    5563                 :       PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    5564                 :       arg1 = (int) safeLen;
    5565                 :     }
    5566                 :     else
    5567                 :     {
    5568                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    5569                 :       SWIG_fail;
    5570                 :     }
    5571                 : #else
    5572               0 :     if (PyString_Check(obj0))
    5573                 :     {
    5574               0 :       Py_ssize_t safeLen = 0;
    5575               0 :       PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    5576               0 :       arg1 = (int) safeLen;
    5577                 :     }
    5578                 :     else
    5579                 :     {
    5580               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    5581               0 :       SWIG_fail;
    5582                 :     }
    5583                 : #endif
    5584                 :   }
    5585               0 :   if (obj1) {
    5586               0 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
    5587               0 :     if (!SWIG_IsOK(ecode3)) {
    5588               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "EscapeString" "', argument " "3"" of type '" "int""'");
    5589                 :     } 
    5590               0 :     arg3 = static_cast< int >(val3);
    5591                 :   }
    5592                 :   {
    5593               0 :     if ( bUseExceptions ) {
    5594               0 :       CPLErrorReset();
    5595                 :     }
    5596               0 :     result = (retStringAndCPLFree *)EscapeString(arg1,arg2,arg3);
    5597               0 :     if ( bUseExceptions ) {
    5598               0 :       CPLErr eclass = CPLGetLastErrorType();
    5599               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5600               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5601                 :       }
    5602                 :     }
    5603                 :   }
    5604                 :   {
    5605                 :     /* %typemap(out) (retStringAndCPLFree*) */
    5606               0 :     if(result)
    5607                 :     {
    5608               0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    5609               0 :       CPLFree(result);
    5610                 :     }
    5611                 :   }
    5612                 :   {
    5613                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    5614               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    5615               0 :       delete[] arg2;
    5616                 :     }
    5617                 :   }
    5618               0 :   return resultobj;
    5619                 : fail:
    5620                 :   {
    5621                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    5622               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    5623               0 :       delete[] arg2;
    5624                 :     }
    5625                 :   }
    5626               0 :   return NULL;
    5627                 : }
    5628                 : 
    5629                 : 
    5630               2 : SWIGINTERN PyObject *_wrap_GetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5631               2 :   PyObject *resultobj = 0;
    5632                 :   int result;
    5633                 :   
    5634               2 :   if (!PyArg_ParseTuple(args,(char *)":GetLastErrorNo")) SWIG_fail;
    5635                 :   {
    5636               2 :     result = CPLGetLastErrorNo();
    5637                 :   }
    5638               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5639               2 :   return resultobj;
    5640                 : fail:
    5641               0 :   return NULL;
    5642                 : }
    5643                 : 
    5644                 : 
    5645             137 : SWIGINTERN PyObject *_wrap_GetLastErrorType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5646             137 :   PyObject *resultobj = 0;
    5647                 :   int result;
    5648                 :   
    5649             137 :   if (!PyArg_ParseTuple(args,(char *)":GetLastErrorType")) SWIG_fail;
    5650                 :   {
    5651             137 :     result = CPLGetLastErrorType();
    5652                 :   }
    5653             137 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5654             137 :   return resultobj;
    5655                 : fail:
    5656               0 :   return NULL;
    5657                 : }
    5658                 : 
    5659                 : 
    5660             189 : SWIGINTERN PyObject *_wrap_GetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5661             189 :   PyObject *resultobj = 0;
    5662             189 :   char *result = 0 ;
    5663                 :   
    5664             189 :   if (!PyArg_ParseTuple(args,(char *)":GetLastErrorMsg")) SWIG_fail;
    5665                 :   {
    5666             189 :     result = (char*)CPLGetLastErrorMsg();
    5667                 :   }
    5668             189 :   resultobj = SWIG_FromCharPtr((const char *)result);
    5669             189 :   return resultobj;
    5670                 : fail:
    5671               0 :   return NULL;
    5672                 : }
    5673                 : 
    5674                 : 
    5675               0 : SWIGINTERN PyObject *_wrap_PushFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5676               0 :   PyObject *resultobj = 0;
    5677               0 :   char *arg1 = (char *) 0 ;
    5678               0 :   int bToFree1 = 0 ;
    5679               0 :   PyObject * obj0 = 0 ;
    5680                 :   
    5681               0 :   if (!PyArg_ParseTuple(args,(char *)"O:PushFinderLocation",&obj0)) SWIG_fail;
    5682                 :   {
    5683                 :     /* %typemap(in) (const char *utf8_path) */
    5684               0 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    5685               0 :     if (arg1 == NULL)
    5686                 :     {
    5687               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    5688               0 :       SWIG_fail;
    5689                 :     }
    5690                 :   }
    5691                 :   {
    5692               0 :     if ( bUseExceptions ) {
    5693               0 :       CPLErrorReset();
    5694                 :     }
    5695               0 :     CPLPushFinderLocation((char const *)arg1);
    5696               0 :     if ( bUseExceptions ) {
    5697               0 :       CPLErr eclass = CPLGetLastErrorType();
    5698               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5699               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5700                 :       }
    5701                 :     }
    5702                 :   }
    5703               0 :   resultobj = SWIG_Py_Void();
    5704                 :   {
    5705                 :     /* %typemap(freearg) (const char *utf8_path) */
    5706               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    5707                 :   }
    5708               0 :   return resultobj;
    5709                 : fail:
    5710                 :   {
    5711                 :     /* %typemap(freearg) (const char *utf8_path) */
    5712               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    5713                 :   }
    5714               0 :   return NULL;
    5715                 : }
    5716                 : 
    5717                 : 
    5718               0 : SWIGINTERN PyObject *_wrap_PopFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5719               0 :   PyObject *resultobj = 0;
    5720                 :   
    5721               0 :   if (!PyArg_ParseTuple(args,(char *)":PopFinderLocation")) SWIG_fail;
    5722                 :   {
    5723               0 :     if ( bUseExceptions ) {
    5724               0 :       CPLErrorReset();
    5725                 :     }
    5726               0 :     CPLPopFinderLocation();
    5727               0 :     if ( bUseExceptions ) {
    5728               0 :       CPLErr eclass = CPLGetLastErrorType();
    5729               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5730               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5731                 :       }
    5732                 :     }
    5733                 :   }
    5734               0 :   resultobj = SWIG_Py_Void();
    5735               0 :   return resultobj;
    5736                 : fail:
    5737               0 :   return NULL;
    5738                 : }
    5739                 : 
    5740                 : 
    5741               0 : SWIGINTERN PyObject *_wrap_FinderClean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5742               0 :   PyObject *resultobj = 0;
    5743                 :   
    5744               0 :   if (!PyArg_ParseTuple(args,(char *)":FinderClean")) SWIG_fail;
    5745                 :   {
    5746               0 :     if ( bUseExceptions ) {
    5747               0 :       CPLErrorReset();
    5748                 :     }
    5749               0 :     CPLFinderClean();
    5750               0 :     if ( bUseExceptions ) {
    5751               0 :       CPLErr eclass = CPLGetLastErrorType();
    5752               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5753               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5754                 :       }
    5755                 :     }
    5756                 :   }
    5757               0 :   resultobj = SWIG_Py_Void();
    5758               0 :   return resultobj;
    5759                 : fail:
    5760               0 :   return NULL;
    5761                 : }
    5762                 : 
    5763                 : 
    5764               8 : SWIGINTERN PyObject *_wrap_FindFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5765               8 :   PyObject *resultobj = 0;
    5766               8 :   char *arg1 = (char *) 0 ;
    5767               8 :   char *arg2 = (char *) 0 ;
    5768                 :   int res1 ;
    5769               8 :   char *buf1 = 0 ;
    5770               8 :   int alloc1 = 0 ;
    5771               8 :   int bToFree2 = 0 ;
    5772               8 :   PyObject * obj0 = 0 ;
    5773               8 :   PyObject * obj1 = 0 ;
    5774               8 :   char *result = 0 ;
    5775                 :   
    5776               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:FindFile",&obj0,&obj1)) SWIG_fail;
    5777               8 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5778               8 :   if (!SWIG_IsOK(res1)) {
    5779               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindFile" "', argument " "1"" of type '" "char const *""'");
    5780                 :   }
    5781               8 :   arg1 = reinterpret_cast< char * >(buf1);
    5782                 :   {
    5783                 :     /* %typemap(in) (const char *utf8_path) */
    5784               8 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    5785               8 :     if (arg2 == NULL)
    5786                 :     {
    5787               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    5788               0 :       SWIG_fail;
    5789                 :     }
    5790                 :   }
    5791                 :   {
    5792               8 :     if ( bUseExceptions ) {
    5793               0 :       CPLErrorReset();
    5794                 :     }
    5795               8 :     result = (char *)CPLFindFile((char const *)arg1,(char const *)arg2);
    5796               8 :     if ( bUseExceptions ) {
    5797               0 :       CPLErr eclass = CPLGetLastErrorType();
    5798               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5799               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5800                 :       }
    5801                 :     }
    5802                 :   }
    5803               8 :   resultobj = SWIG_FromCharPtr((const char *)result);
    5804               8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5805                 :   {
    5806                 :     /* %typemap(freearg) (const char *utf8_path) */
    5807               8 :     GDALPythonFreeCStr(arg2, bToFree2);
    5808                 :   }
    5809               8 :   return resultobj;
    5810                 : fail:
    5811               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5812                 :   {
    5813                 :     /* %typemap(freearg) (const char *utf8_path) */
    5814               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    5815                 :   }
    5816               0 :   return NULL;
    5817                 : }
    5818                 : 
    5819                 : 
    5820            1794 : SWIGINTERN PyObject *_wrap_ReadDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5821            1794 :   PyObject *resultobj = 0;
    5822            1794 :   char *arg1 = (char *) 0 ;
    5823            1794 :   int bToFree1 = 0 ;
    5824            1794 :   PyObject * obj0 = 0 ;
    5825            1794 :   char **result = 0 ;
    5826                 :   
    5827            1794 :   if (!PyArg_ParseTuple(args,(char *)"O:ReadDir",&obj0)) SWIG_fail;
    5828                 :   {
    5829                 :     /* %typemap(in) (const char *utf8_path) */
    5830            1794 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    5831            1794 :     if (arg1 == NULL)
    5832                 :     {
    5833               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    5834               0 :       SWIG_fail;
    5835                 :     }
    5836                 :   }
    5837                 :   {
    5838            1794 :     if ( bUseExceptions ) {
    5839               0 :       CPLErrorReset();
    5840                 :     }
    5841            1794 :     result = (char **)VSIReadDir((char const *)arg1);
    5842            1794 :     if ( bUseExceptions ) {
    5843               0 :       CPLErr eclass = CPLGetLastErrorType();
    5844               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5845               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5846                 :       }
    5847                 :     }
    5848                 :   }
    5849                 :   {
    5850                 :     /* %typemap(out) char **CSL -> ( string ) */
    5851            1794 :     char **stringarray = result;
    5852            1794 :     if ( stringarray == NULL ) {
    5853            1643 :       resultobj = Py_None;
    5854            1643 :       Py_INCREF( resultobj );
    5855                 :     }
    5856                 :     else {
    5857             151 :       int len = CSLCount( stringarray );
    5858             151 :       resultobj = PyList_New( len );
    5859            3141 :       for ( int i = 0; i < len; ++i ) {
    5860            2990 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    5861            2990 :         PyList_SetItem(resultobj, i, o );
    5862                 :       }
    5863                 :     }
    5864            1794 :     CSLDestroy(result);
    5865                 :   }
    5866                 :   {
    5867                 :     /* %typemap(freearg) (const char *utf8_path) */
    5868            1794 :     GDALPythonFreeCStr(arg1, bToFree1);
    5869                 :   }
    5870            1794 :   return resultobj;
    5871                 : fail:
    5872                 :   {
    5873                 :     /* %typemap(freearg) (const char *utf8_path) */
    5874               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    5875                 :   }
    5876               0 :   return NULL;
    5877                 : }
    5878                 : 
    5879                 : 
    5880               2 : SWIGINTERN PyObject *_wrap_ReadDirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5881               2 :   PyObject *resultobj = 0;
    5882               2 :   char *arg1 = (char *) 0 ;
    5883               2 :   int bToFree1 = 0 ;
    5884               2 :   PyObject * obj0 = 0 ;
    5885               2 :   char **result = 0 ;
    5886                 :   
    5887               2 :   if (!PyArg_ParseTuple(args,(char *)"O:ReadDirRecursive",&obj0)) SWIG_fail;
    5888                 :   {
    5889                 :     /* %typemap(in) (const char *utf8_path) */
    5890               2 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    5891               2 :     if (arg1 == NULL)
    5892                 :     {
    5893               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    5894               0 :       SWIG_fail;
    5895                 :     }
    5896                 :   }
    5897                 :   {
    5898               2 :     if ( bUseExceptions ) {
    5899               0 :       CPLErrorReset();
    5900                 :     }
    5901               2 :     result = (char **)VSIReadDirRecursive((char const *)arg1);
    5902               2 :     if ( bUseExceptions ) {
    5903               0 :       CPLErr eclass = CPLGetLastErrorType();
    5904               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5905               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5906                 :       }
    5907                 :     }
    5908                 :   }
    5909                 :   {
    5910                 :     /* %typemap(out) char **CSL -> ( string ) */
    5911               2 :     char **stringarray = result;
    5912               2 :     if ( stringarray == NULL ) {
    5913               0 :       resultobj = Py_None;
    5914               0 :       Py_INCREF( resultobj );
    5915                 :     }
    5916                 :     else {
    5917               2 :       int len = CSLCount( stringarray );
    5918               2 :       resultobj = PyList_New( len );
    5919            1010 :       for ( int i = 0; i < len; ++i ) {
    5920            1008 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    5921            1008 :         PyList_SetItem(resultobj, i, o );
    5922                 :       }
    5923                 :     }
    5924               2 :     CSLDestroy(result);
    5925                 :   }
    5926                 :   {
    5927                 :     /* %typemap(freearg) (const char *utf8_path) */
    5928               2 :     GDALPythonFreeCStr(arg1, bToFree1);
    5929                 :   }
    5930               2 :   return resultobj;
    5931                 : fail:
    5932                 :   {
    5933                 :     /* %typemap(freearg) (const char *utf8_path) */
    5934               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    5935                 :   }
    5936               0 :   return NULL;
    5937                 : }
    5938                 : 
    5939                 : 
    5940             550 : SWIGINTERN PyObject *_wrap_SetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5941             550 :   PyObject *resultobj = 0;
    5942             550 :   char *arg1 = (char *) 0 ;
    5943             550 :   char *arg2 = (char *) 0 ;
    5944                 :   int res1 ;
    5945             550 :   char *buf1 = 0 ;
    5946             550 :   int alloc1 = 0 ;
    5947                 :   int res2 ;
    5948             550 :   char *buf2 = 0 ;
    5949             550 :   int alloc2 = 0 ;
    5950             550 :   PyObject * obj0 = 0 ;
    5951             550 :   PyObject * obj1 = 0 ;
    5952                 :   
    5953             550 :   if (!PyArg_ParseTuple(args,(char *)"OO:SetConfigOption",&obj0,&obj1)) SWIG_fail;
    5954             550 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5955             550 :   if (!SWIG_IsOK(res1)) {
    5956               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetConfigOption" "', argument " "1"" of type '" "char const *""'");
    5957                 :   }
    5958             550 :   arg1 = reinterpret_cast< char * >(buf1);
    5959             550 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5960             550 :   if (!SWIG_IsOK(res2)) {
    5961               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetConfigOption" "', argument " "2"" of type '" "char const *""'");
    5962                 :   }
    5963             550 :   arg2 = reinterpret_cast< char * >(buf2);
    5964                 :   {
    5965             550 :     if (!arg1) {
    5966               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    5967                 :     }
    5968                 :   }
    5969                 :   {
    5970             550 :     if ( bUseExceptions ) {
    5971               0 :       CPLErrorReset();
    5972                 :     }
    5973             550 :     CPLSetConfigOption((char const *)arg1,(char const *)arg2);
    5974             550 :     if ( bUseExceptions ) {
    5975               0 :       CPLErr eclass = CPLGetLastErrorType();
    5976               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5977               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5978                 :       }
    5979                 :     }
    5980                 :   }
    5981             550 :   resultobj = SWIG_Py_Void();
    5982             550 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5983             550 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5984             550 :   return resultobj;
    5985                 : fail:
    5986               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5987               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5988               0 :   return NULL;
    5989                 : }
    5990                 : 
    5991                 : 
    5992             591 : SWIGINTERN PyObject *_wrap_GetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5993             591 :   PyObject *resultobj = 0;
    5994             591 :   char *arg1 = (char *) 0 ;
    5995             591 :   char *arg2 = (char *) NULL ;
    5996                 :   int res1 ;
    5997             591 :   char *buf1 = 0 ;
    5998             591 :   int alloc1 = 0 ;
    5999                 :   int res2 ;
    6000             591 :   char *buf2 = 0 ;
    6001             591 :   int alloc2 = 0 ;
    6002             591 :   PyObject * obj0 = 0 ;
    6003             591 :   PyObject * obj1 = 0 ;
    6004             591 :   char *result = 0 ;
    6005                 :   
    6006             591 :   if (!PyArg_ParseTuple(args,(char *)"O|O:GetConfigOption",&obj0,&obj1)) SWIG_fail;
    6007             591 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    6008             591 :   if (!SWIG_IsOK(res1)) {
    6009               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetConfigOption" "', argument " "1"" of type '" "char const *""'");
    6010                 :   }
    6011             591 :   arg1 = reinterpret_cast< char * >(buf1);
    6012             591 :   if (obj1) {
    6013             571 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6014             571 :     if (!SWIG_IsOK(res2)) {
    6015               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetConfigOption" "', argument " "2"" of type '" "char const *""'");
    6016                 :     }
    6017             571 :     arg2 = reinterpret_cast< char * >(buf2);
    6018                 :   }
    6019                 :   {
    6020             591 :     if (!arg1) {
    6021               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    6022                 :     }
    6023                 :   }
    6024                 :   {
    6025             591 :     if ( bUseExceptions ) {
    6026               0 :       CPLErrorReset();
    6027                 :     }
    6028             591 :     result = (char *)wrapper_CPLGetConfigOption((char const *)arg1,(char const *)arg2);
    6029             591 :     if ( bUseExceptions ) {
    6030               0 :       CPLErr eclass = CPLGetLastErrorType();
    6031               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6032               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6033                 :       }
    6034                 :     }
    6035                 :   }
    6036             591 :   resultobj = SWIG_FromCharPtr((const char *)result);
    6037             591 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6038             591 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6039             591 :   return resultobj;
    6040                 : fail:
    6041               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6042               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6043               0 :   return NULL;
    6044                 : }
    6045                 : 
    6046                 : 
    6047               0 : SWIGINTERN PyObject *_wrap_CPLBinaryToHex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6048               0 :   PyObject *resultobj = 0;
    6049                 :   int arg1 ;
    6050               0 :   GByte *arg2 = (GByte *) 0 ;
    6051               0 :   int alloc1 = 0 ;
    6052               0 :   PyObject * obj0 = 0 ;
    6053               0 :   retStringAndCPLFree *result = 0 ;
    6054                 :   
    6055               0 :   if (!PyArg_ParseTuple(args,(char *)"O:CPLBinaryToHex",&obj0)) SWIG_fail;
    6056                 :   {
    6057                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    6058                 : #if PY_VERSION_HEX>=0x03000000
    6059                 :     if (PyUnicode_Check(obj0))
    6060                 :     {
    6061                 :       size_t safeLen = 0;
    6062                 :       int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
    6063                 :       if (!SWIG_IsOK(ret)) {
    6064                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    6065                 :       }
    6066                 :       
    6067                 :       if (safeLen) safeLen--;
    6068                 :       arg1 = (int) safeLen;
    6069                 :     }
    6070                 :     else if (PyBytes_Check(obj0))
    6071                 :     {
    6072                 :       Py_ssize_t safeLen = 0;
    6073                 :       PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    6074                 :       arg1 = (int) safeLen;
    6075                 :     }
    6076                 :     else
    6077                 :     {
    6078                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    6079                 :       SWIG_fail;
    6080                 :     }
    6081                 : #else
    6082               0 :     if (PyString_Check(obj0))
    6083                 :     {
    6084               0 :       Py_ssize_t safeLen = 0;
    6085               0 :       PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    6086               0 :       arg1 = (int) safeLen;
    6087                 :     }
    6088                 :     else
    6089                 :     {
    6090               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    6091               0 :       SWIG_fail;
    6092                 :     }
    6093                 : #endif
    6094                 :   }
    6095                 :   {
    6096               0 :     if ( bUseExceptions ) {
    6097               0 :       CPLErrorReset();
    6098                 :     }
    6099               0 :     result = (retStringAndCPLFree *)CPLBinaryToHex(arg1,(GByte const *)arg2);
    6100               0 :     if ( bUseExceptions ) {
    6101               0 :       CPLErr eclass = CPLGetLastErrorType();
    6102               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6103               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6104                 :       }
    6105                 :     }
    6106                 :   }
    6107                 :   {
    6108                 :     /* %typemap(out) (retStringAndCPLFree*) */
    6109               0 :     if(result)
    6110                 :     {
    6111               0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    6112               0 :       CPLFree(result);
    6113                 :     }
    6114                 :   }
    6115                 :   {
    6116                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6117               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    6118               0 :       delete[] arg2;
    6119                 :     }
    6120                 :   }
    6121               0 :   return resultobj;
    6122                 : fail:
    6123                 :   {
    6124                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6125               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    6126               0 :       delete[] arg2;
    6127                 :     }
    6128                 :   }
    6129               0 :   return NULL;
    6130                 : }
    6131                 : 
    6132                 : 
    6133               0 : SWIGINTERN PyObject *_wrap_CPLHexToBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6134               0 :   PyObject *resultobj = 0;
    6135               0 :   char *arg1 = (char *) 0 ;
    6136               0 :   int *arg2 = (int *) 0 ;
    6137                 :   int res1 ;
    6138               0 :   char *buf1 = 0 ;
    6139               0 :   int alloc1 = 0 ;
    6140               0 :   void *argp2 = 0 ;
    6141               0 :   int res2 = 0 ;
    6142               0 :   PyObject * obj0 = 0 ;
    6143               0 :   PyObject * obj1 = 0 ;
    6144               0 :   GByte *result = 0 ;
    6145                 :   
    6146               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:CPLHexToBinary",&obj0,&obj1)) SWIG_fail;
    6147               0 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    6148               0 :   if (!SWIG_IsOK(res1)) {
    6149               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLHexToBinary" "', argument " "1"" of type '" "char const *""'");
    6150                 :   }
    6151               0 :   arg1 = reinterpret_cast< char * >(buf1);
    6152               0 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
    6153               0 :   if (!SWIG_IsOK(res2)) {
    6154               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CPLHexToBinary" "', argument " "2"" of type '" "int *""'"); 
    6155                 :   }
    6156               0 :   arg2 = reinterpret_cast< int * >(argp2);
    6157                 :   {
    6158               0 :     if ( bUseExceptions ) {
    6159               0 :       CPLErrorReset();
    6160                 :     }
    6161               0 :     result = (GByte *)CPLHexToBinary((char const *)arg1,arg2);
    6162               0 :     if ( bUseExceptions ) {
    6163               0 :       CPLErr eclass = CPLGetLastErrorType();
    6164               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6165               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6166                 :       }
    6167                 :     }
    6168                 :   }
    6169               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GByte, 0 |  0 );
    6170               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6171               0 :   return resultobj;
    6172                 : fail:
    6173               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6174               0 :   return NULL;
    6175                 : }
    6176                 : 
    6177                 : 
    6178              19 : SWIGINTERN PyObject *_wrap_FileFromMemBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6179              19 :   PyObject *resultobj = 0;
    6180              19 :   char *arg1 = (char *) 0 ;
    6181                 :   int arg2 ;
    6182              19 :   GByte *arg3 = (GByte *) 0 ;
    6183              19 :   int bToFree1 = 0 ;
    6184              19 :   int alloc2 = 0 ;
    6185              19 :   PyObject * obj0 = 0 ;
    6186              19 :   PyObject * obj1 = 0 ;
    6187                 :   
    6188              19 :   if (!PyArg_ParseTuple(args,(char *)"OO:FileFromMemBuffer",&obj0,&obj1)) SWIG_fail;
    6189                 :   {
    6190                 :     /* %typemap(in) (const char *utf8_path) */
    6191              19 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6192              19 :     if (arg1 == NULL)
    6193                 :     {
    6194               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6195               0 :       SWIG_fail;
    6196                 :     }
    6197                 :   }
    6198                 :   {
    6199                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    6200                 : #if PY_VERSION_HEX>=0x03000000
    6201                 :     if (PyUnicode_Check(obj1))
    6202                 :     {
    6203                 :       size_t safeLen = 0;
    6204                 :       int ret = SWIG_AsCharPtrAndSize(obj1, (char**) &arg3, &safeLen, &alloc2);
    6205                 :       if (!SWIG_IsOK(ret)) {
    6206                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    6207                 :       }
    6208                 :       
    6209                 :       if (safeLen) safeLen--;
    6210                 :       arg2 = (int) safeLen;
    6211                 :     }
    6212                 :     else if (PyBytes_Check(obj1))
    6213                 :     {
    6214                 :       Py_ssize_t safeLen = 0;
    6215                 :       PyBytes_AsStringAndSize(obj1, (char**) &arg3, &safeLen);
    6216                 :       arg2 = (int) safeLen;
    6217                 :     }
    6218                 :     else
    6219                 :     {
    6220                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    6221                 :       SWIG_fail;
    6222                 :     }
    6223                 : #else
    6224              19 :     if (PyString_Check(obj1))
    6225                 :     {
    6226              19 :       Py_ssize_t safeLen = 0;
    6227              19 :       PyString_AsStringAndSize(obj1, (char**) &arg3, &safeLen);
    6228              19 :       arg2 = (int) safeLen;
    6229                 :     }
    6230                 :     else
    6231                 :     {
    6232               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    6233               0 :       SWIG_fail;
    6234                 :     }
    6235                 : #endif
    6236                 :   }
    6237                 :   {
    6238              19 :     if ( bUseExceptions ) {
    6239               0 :       CPLErrorReset();
    6240                 :     }
    6241              19 :     wrapper_VSIFileFromMemBuffer((char const *)arg1,arg2,(GByte const *)arg3);
    6242              19 :     if ( bUseExceptions ) {
    6243               0 :       CPLErr eclass = CPLGetLastErrorType();
    6244               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6245               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6246                 :       }
    6247                 :     }
    6248                 :   }
    6249              19 :   resultobj = SWIG_Py_Void();
    6250                 :   {
    6251                 :     /* %typemap(freearg) (const char *utf8_path) */
    6252              19 :     GDALPythonFreeCStr(arg1, bToFree1);
    6253                 :   }
    6254                 :   {
    6255                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6256              19 :     if( alloc2 == SWIG_NEWOBJ ) {
    6257               0 :       delete[] arg3;
    6258                 :     }
    6259                 :   }
    6260              19 :   return resultobj;
    6261                 : fail:
    6262                 :   {
    6263                 :     /* %typemap(freearg) (const char *utf8_path) */
    6264               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6265                 :   }
    6266                 :   {
    6267                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6268               0 :     if( alloc2 == SWIG_NEWOBJ ) {
    6269               0 :       delete[] arg3;
    6270                 :     }
    6271                 :   }
    6272               0 :   return NULL;
    6273                 : }
    6274                 : 
    6275                 : 
    6276             479 : SWIGINTERN PyObject *_wrap_Unlink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6277             479 :   PyObject *resultobj = 0;
    6278             479 :   char *arg1 = (char *) 0 ;
    6279             479 :   int bToFree1 = 0 ;
    6280             479 :   PyObject * obj0 = 0 ;
    6281                 :   int result;
    6282                 :   
    6283             479 :   if (!PyArg_ParseTuple(args,(char *)"O:Unlink",&obj0)) SWIG_fail;
    6284                 :   {
    6285                 :     /* %typemap(in) (const char *utf8_path) */
    6286             479 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6287             479 :     if (arg1 == NULL)
    6288                 :     {
    6289               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6290               0 :       SWIG_fail;
    6291                 :     }
    6292                 :   }
    6293                 :   {
    6294             479 :     if ( bUseExceptions ) {
    6295               0 :       CPLErrorReset();
    6296                 :     }
    6297             479 :     result = (int)VSIUnlink((char const *)arg1);
    6298             479 :     if ( bUseExceptions ) {
    6299               0 :       CPLErr eclass = CPLGetLastErrorType();
    6300               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6301               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6302                 :       }
    6303                 :     }
    6304                 :   }
    6305             479 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6306                 :   {
    6307                 :     /* %typemap(freearg) (const char *utf8_path) */
    6308             479 :     GDALPythonFreeCStr(arg1, bToFree1);
    6309                 :   }
    6310             479 :   return resultobj;
    6311                 : fail:
    6312                 :   {
    6313                 :     /* %typemap(freearg) (const char *utf8_path) */
    6314               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6315                 :   }
    6316               0 :   return NULL;
    6317                 : }
    6318                 : 
    6319                 : 
    6320               0 : SWIGINTERN PyObject *_wrap_HasThreadSupport(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6321               0 :   PyObject *resultobj = 0;
    6322                 :   int result;
    6323                 :   
    6324               0 :   if (!PyArg_ParseTuple(args,(char *)":HasThreadSupport")) SWIG_fail;
    6325                 :   {
    6326               0 :     if ( bUseExceptions ) {
    6327               0 :       CPLErrorReset();
    6328                 :     }
    6329               0 :     result = (int)wrapper_HasThreadSupport();
    6330               0 :     if ( bUseExceptions ) {
    6331               0 :       CPLErr eclass = CPLGetLastErrorType();
    6332               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6333               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6334                 :       }
    6335                 :     }
    6336                 :   }
    6337               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6338               0 :   return resultobj;
    6339                 : fail:
    6340               0 :   return NULL;
    6341                 : }
    6342                 : 
    6343                 : 
    6344               1 : SWIGINTERN PyObject *_wrap_Mkdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6345               1 :   PyObject *resultobj = 0;
    6346               1 :   char *arg1 = (char *) 0 ;
    6347                 :   int arg2 ;
    6348               1 :   int bToFree1 = 0 ;
    6349                 :   int val2 ;
    6350               1 :   int ecode2 = 0 ;
    6351               1 :   PyObject * obj0 = 0 ;
    6352               1 :   PyObject * obj1 = 0 ;
    6353                 :   int result;
    6354                 :   
    6355               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Mkdir",&obj0,&obj1)) SWIG_fail;
    6356                 :   {
    6357                 :     /* %typemap(in) (const char *utf8_path) */
    6358               1 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6359               1 :     if (arg1 == NULL)
    6360                 :     {
    6361               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6362               0 :       SWIG_fail;
    6363                 :     }
    6364                 :   }
    6365               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    6366               1 :   if (!SWIG_IsOK(ecode2)) {
    6367               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Mkdir" "', argument " "2"" of type '" "int""'");
    6368                 :   } 
    6369               1 :   arg2 = static_cast< int >(val2);
    6370                 :   {
    6371               1 :     if ( bUseExceptions ) {
    6372               0 :       CPLErrorReset();
    6373                 :     }
    6374               1 :     result = (int)VSIMkdir((char const *)arg1,arg2);
    6375               1 :     if ( bUseExceptions ) {
    6376               0 :       CPLErr eclass = CPLGetLastErrorType();
    6377               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6378               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6379                 :       }
    6380                 :     }
    6381                 :   }
    6382               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6383                 :   {
    6384                 :     /* %typemap(freearg) (const char *utf8_path) */
    6385               1 :     GDALPythonFreeCStr(arg1, bToFree1);
    6386                 :   }
    6387               1 :   return resultobj;
    6388                 : fail:
    6389                 :   {
    6390                 :     /* %typemap(freearg) (const char *utf8_path) */
    6391               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6392                 :   }
    6393               0 :   return NULL;
    6394                 : }
    6395                 : 
    6396                 : 
    6397               1 : SWIGINTERN PyObject *_wrap_Rmdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6398               1 :   PyObject *resultobj = 0;
    6399               1 :   char *arg1 = (char *) 0 ;
    6400               1 :   int bToFree1 = 0 ;
    6401               1 :   PyObject * obj0 = 0 ;
    6402                 :   int result;
    6403                 :   
    6404               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Rmdir",&obj0)) SWIG_fail;
    6405                 :   {
    6406                 :     /* %typemap(in) (const char *utf8_path) */
    6407               1 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6408               1 :     if (arg1 == NULL)
    6409                 :     {
    6410               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6411               0 :       SWIG_fail;
    6412                 :     }
    6413                 :   }
    6414                 :   {
    6415               1 :     if ( bUseExceptions ) {
    6416               0 :       CPLErrorReset();
    6417                 :     }
    6418               1 :     result = (int)VSIRmdir((char const *)arg1);
    6419               1 :     if ( bUseExceptions ) {
    6420               0 :       CPLErr eclass = CPLGetLastErrorType();
    6421               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6422               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6423                 :       }
    6424                 :     }
    6425                 :   }
    6426               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6427                 :   {
    6428                 :     /* %typemap(freearg) (const char *utf8_path) */
    6429               1 :     GDALPythonFreeCStr(arg1, bToFree1);
    6430                 :   }
    6431               1 :   return resultobj;
    6432                 : fail:
    6433                 :   {
    6434                 :     /* %typemap(freearg) (const char *utf8_path) */
    6435               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6436                 :   }
    6437               0 :   return NULL;
    6438                 : }
    6439                 : 
    6440                 : 
    6441               1 : SWIGINTERN PyObject *_wrap_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6442               1 :   PyObject *resultobj = 0;
    6443               1 :   char *arg1 = (char *) 0 ;
    6444               1 :   char *arg2 = (char *) 0 ;
    6445                 :   int res1 ;
    6446               1 :   char *buf1 = 0 ;
    6447               1 :   int alloc1 = 0 ;
    6448                 :   int res2 ;
    6449               1 :   char *buf2 = 0 ;
    6450               1 :   int alloc2 = 0 ;
    6451               1 :   PyObject * obj0 = 0 ;
    6452               1 :   PyObject * obj1 = 0 ;
    6453                 :   int result;
    6454                 :   
    6455               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Rename",&obj0,&obj1)) SWIG_fail;
    6456               1 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    6457               1 :   if (!SWIG_IsOK(res1)) {
    6458               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rename" "', argument " "1"" of type '" "char const *""'");
    6459                 :   }
    6460               1 :   arg1 = reinterpret_cast< char * >(buf1);
    6461               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6462               1 :   if (!SWIG_IsOK(res2)) {
    6463               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Rename" "', argument " "2"" of type '" "char const *""'");
    6464                 :   }
    6465               1 :   arg2 = reinterpret_cast< char * >(buf2);
    6466                 :   {
    6467               1 :     if ( bUseExceptions ) {
    6468               0 :       CPLErrorReset();
    6469                 :     }
    6470               1 :     result = (int)VSIRename((char const *)arg1,(char const *)arg2);
    6471               1 :     if ( bUseExceptions ) {
    6472               0 :       CPLErr eclass = CPLGetLastErrorType();
    6473               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6474               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6475                 :       }
    6476                 :     }
    6477                 :   }
    6478               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6479               1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6480               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6481               1 :   return resultobj;
    6482                 : fail:
    6483               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6484               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6485               0 :   return NULL;
    6486                 : }
    6487                 : 
    6488                 : 
    6489               0 : SWIGINTERN PyObject *_wrap_StatBuf_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6490               0 :   PyObject *resultobj = 0;
    6491               0 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6492               0 :   void *argp1 = 0 ;
    6493               0 :   int res1 = 0 ;
    6494               0 :   PyObject * obj0 = 0 ;
    6495                 :   int result;
    6496                 :   
    6497               0 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_mode_get",&obj0)) SWIG_fail;
    6498               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6499               0 :   if (!SWIG_IsOK(res1)) {
    6500               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mode_get" "', argument " "1"" of type '" "StatBuf *""'"); 
    6501                 :   }
    6502               0 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6503               0 :   result = (int) ((arg1)->mode);
    6504               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6505               0 :   return resultobj;
    6506                 : fail:
    6507               0 :   return NULL;
    6508                 : }
    6509                 : 
    6510                 : 
    6511             284 : SWIGINTERN PyObject *_wrap_StatBuf_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6512             284 :   PyObject *resultobj = 0;
    6513             284 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6514             284 :   void *argp1 = 0 ;
    6515             284 :   int res1 = 0 ;
    6516             284 :   PyObject * obj0 = 0 ;
    6517                 :   GIntBig result;
    6518                 :   
    6519             284 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_size_get",&obj0)) SWIG_fail;
    6520             284 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6521             284 :   if (!SWIG_IsOK(res1)) {
    6522               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_size_get" "', argument " "1"" of type '" "StatBuf *""'"); 
    6523                 :   }
    6524             284 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6525             284 :   result =  ((arg1)->size);
    6526                 :   {
    6527                 :     char szTmp[32];
    6528                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
    6529                 : #if PY_VERSION_HEX>=0x03000000
    6530                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
    6531                 : #else
    6532             284 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
    6533                 : #endif
    6534                 :   }
    6535             284 :   return resultobj;
    6536                 : fail:
    6537               0 :   return NULL;
    6538                 : }
    6539                 : 
    6540                 : 
    6541             281 : SWIGINTERN PyObject *_wrap_StatBuf_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6542             281 :   PyObject *resultobj = 0;
    6543             281 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6544             281 :   void *argp1 = 0 ;
    6545             281 :   int res1 = 0 ;
    6546             281 :   PyObject * obj0 = 0 ;
    6547                 :   GIntBig result;
    6548                 :   
    6549             281 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_mtime_get",&obj0)) SWIG_fail;
    6550             281 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6551             281 :   if (!SWIG_IsOK(res1)) {
    6552               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mtime_get" "', argument " "1"" of type '" "StatBuf *""'"); 
    6553                 :   }
    6554             281 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6555             281 :   result =  ((arg1)->mtime);
    6556                 :   {
    6557                 :     char szTmp[32];
    6558                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
    6559                 : #if PY_VERSION_HEX>=0x03000000
    6560                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
    6561                 : #else
    6562             281 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
    6563                 : #endif
    6564                 :   }
    6565             281 :   return resultobj;
    6566                 : fail:
    6567               0 :   return NULL;
    6568                 : }
    6569                 : 
    6570                 : 
    6571               0 : SWIGINTERN PyObject *_wrap_new_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6572               0 :   PyObject *resultobj = 0;
    6573               0 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6574               0 :   void *argp1 = 0 ;
    6575               0 :   int res1 = 0 ;
    6576               0 :   PyObject * obj0 = 0 ;
    6577               0 :   StatBuf *result = 0 ;
    6578                 :   
    6579               0 :   if (!PyArg_ParseTuple(args,(char *)"O:new_StatBuf",&obj0)) SWIG_fail;
    6580               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6581               0 :   if (!SWIG_IsOK(res1)) {
    6582               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
    6583                 :   }
    6584               0 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6585                 :   {
    6586               0 :     if ( bUseExceptions ) {
    6587               0 :       CPLErrorReset();
    6588                 :     }
    6589               0 :     result = (StatBuf *)new_StatBuf(arg1);
    6590               0 :     if ( bUseExceptions ) {
    6591               0 :       CPLErr eclass = CPLGetLastErrorType();
    6592               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6593               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6594                 :       }
    6595                 :     }
    6596                 :   }
    6597               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StatBuf, SWIG_POINTER_NEW |  0 );
    6598               0 :   return resultobj;
    6599                 : fail:
    6600               0 :   return NULL;
    6601                 : }
    6602                 : 
    6603                 : 
    6604            2056 : SWIGINTERN PyObject *_wrap_delete_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6605            2056 :   PyObject *resultobj = 0;
    6606            2056 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6607            2056 :   void *argp1 = 0 ;
    6608            2056 :   int res1 = 0 ;
    6609            2056 :   PyObject * obj0 = 0 ;
    6610                 :   
    6611            2056 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_StatBuf",&obj0)) SWIG_fail;
    6612            2056 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, SWIG_POINTER_DISOWN |  0 );
    6613            2056 :   if (!SWIG_IsOK(res1)) {
    6614               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
    6615                 :   }
    6616            2056 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6617                 :   {
    6618            2056 :     if ( bUseExceptions ) {
    6619               0 :       CPLErrorReset();
    6620                 :     }
    6621                 :     delete_StatBuf(arg1);
    6622            2056 :     if ( bUseExceptions ) {
    6623               0 :       CPLErr eclass = CPLGetLastErrorType();
    6624               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6625               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6626                 :       }
    6627                 :     }
    6628                 :   }
    6629            2056 :   resultobj = SWIG_Py_Void();
    6630            2056 :   return resultobj;
    6631                 : fail:
    6632               0 :   return NULL;
    6633                 : }
    6634                 : 
    6635                 : 
    6636            2334 : SWIGINTERN PyObject *_wrap_StatBuf_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6637            2334 :   PyObject *resultobj = 0;
    6638            2334 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6639            2334 :   void *argp1 = 0 ;
    6640            2334 :   int res1 = 0 ;
    6641            2334 :   PyObject * obj0 = 0 ;
    6642                 :   int result;
    6643                 :   
    6644            2334 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_IsDirectory",&obj0)) SWIG_fail;
    6645            2334 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6646            2334 :   if (!SWIG_IsOK(res1)) {
    6647               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_IsDirectory" "', argument " "1"" of type '" "StatBuf *""'"); 
    6648                 :   }
    6649            2334 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6650                 :   {
    6651            2334 :     if ( bUseExceptions ) {
    6652               0 :       CPLErrorReset();
    6653                 :     }
    6654            2334 :     result = (int)StatBuf_IsDirectory(arg1);
    6655            2334 :     if ( bUseExceptions ) {
    6656               0 :       CPLErr eclass = CPLGetLastErrorType();
    6657               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6658               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6659                 :       }
    6660                 :     }
    6661                 :   }
    6662            2334 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6663            2334 :   return resultobj;
    6664                 : fail:
    6665               0 :   return NULL;
    6666                 : }
    6667                 : 
    6668                 : 
    6669               6 : SWIGINTERN PyObject *StatBuf_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6670                 :   PyObject *obj;
    6671               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    6672               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_StatBuf, SWIG_NewClientData(obj));
    6673               6 :   return SWIG_Py_Void();
    6674                 : }
    6675                 : 
    6676            2058 : SWIGINTERN PyObject *_wrap_VSIStatL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6677            2058 :   PyObject *resultobj = 0;
    6678            2058 :   char *arg1 = (char *) 0 ;
    6679            2058 :   StatBuf *arg2 = (StatBuf *) 0 ;
    6680            2058 :   int arg3 = (int) 0 ;
    6681            2058 :   int bToFree1 = 0 ;
    6682                 :   StatBuf sStatBuf2 ;
    6683                 :   int val3 ;
    6684            2058 :   int ecode3 = 0 ;
    6685            2058 :   PyObject * obj0 = 0 ;
    6686            2058 :   PyObject * obj1 = 0 ;
    6687                 :   int result;
    6688                 :   
    6689                 :   {
    6690                 :     /* %typemap(in,numinputs=0) (StatBuf *psStatBufOut) (StatBuf sStatBuf2 ) */
    6691            2058 :     arg2 = &sStatBuf2;
    6692                 :   }
    6693            2058 :   if (!PyArg_ParseTuple(args,(char *)"O|O:VSIStatL",&obj0,&obj1)) SWIG_fail;
    6694                 :   {
    6695                 :     /* %typemap(in) (const char *utf8_path) */
    6696            2058 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6697            2058 :     if (arg1 == NULL)
    6698                 :     {
    6699               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6700               0 :       SWIG_fail;
    6701                 :     }
    6702                 :   }
    6703            2058 :   if (obj1) {
    6704            2058 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
    6705            2058 :     if (!SWIG_IsOK(ecode3)) {
    6706               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIStatL" "', argument " "3"" of type '" "int""'");
    6707                 :     } 
    6708            2058 :     arg3 = static_cast< int >(val3);
    6709                 :   }
    6710                 :   {
    6711            2058 :     if ( bUseExceptions ) {
    6712               0 :       CPLErrorReset();
    6713                 :     }
    6714            2058 :     result = (int)wrapper_VSIStatL((char const *)arg1,arg2,arg3);
    6715            2058 :     if ( bUseExceptions ) {
    6716               0 :       CPLErr eclass = CPLGetLastErrorType();
    6717               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6718               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6719                 :       }
    6720                 :     }
    6721                 :   }
    6722            2058 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6723                 :   {
    6724                 :     /* %typemap(argout) (StatBuf *psStatBufOut)*/
    6725            2058 :     Py_DECREF(resultobj);
    6726            2058 :     if (result == 0)
    6727            4112 :     resultobj = SWIG_NewPointerObj((void*)new_StatBuf( arg2 ),SWIGTYPE_p_StatBuf,1);
    6728                 :     else
    6729               2 :     resultobj = Py_None;
    6730                 :   }
    6731                 :   {
    6732                 :     /* %typemap(freearg) (const char *utf8_path) */
    6733            2058 :     GDALPythonFreeCStr(arg1, bToFree1);
    6734                 :   }
    6735            2058 :   return resultobj;
    6736                 : fail:
    6737                 :   {
    6738                 :     /* %typemap(freearg) (const char *utf8_path) */
    6739               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6740                 :   }
    6741               0 :   return NULL;
    6742                 : }
    6743                 : 
    6744                 : 
    6745              91 : SWIGINTERN PyObject *_wrap_VSIFOpenL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6746              91 :   PyObject *resultobj = 0;
    6747              91 :   char *arg1 = (char *) 0 ;
    6748              91 :   char *arg2 = (char *) 0 ;
    6749              91 :   int bToFree1 = 0 ;
    6750                 :   int res2 ;
    6751              91 :   char *buf2 = 0 ;
    6752              91 :   int alloc2 = 0 ;
    6753              91 :   PyObject * obj0 = 0 ;
    6754              91 :   PyObject * obj1 = 0 ;
    6755              91 :   VSILFILE *result = 0 ;
    6756                 :   
    6757              91 :   if (!PyArg_ParseTuple(args,(char *)"OO:VSIFOpenL",&obj0,&obj1)) SWIG_fail;
    6758                 :   {
    6759                 :     /* %typemap(in) (const char *utf8_path) */
    6760              91 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6761              91 :     if (arg1 == NULL)
    6762                 :     {
    6763               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6764               0 :       SWIG_fail;
    6765                 :     }
    6766                 :   }
    6767              91 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6768              91 :   if (!SWIG_IsOK(res2)) {
    6769               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenL" "', argument " "2"" of type '" "char const *""'");
    6770                 :   }
    6771              91 :   arg2 = reinterpret_cast< char * >(buf2);
    6772                 :   {
    6773              91 :     if ( bUseExceptions ) {
    6774               0 :       CPLErrorReset();
    6775                 :     }
    6776              91 :     result = (VSILFILE *)VSIFOpenL((char const *)arg1,(char const *)arg2);
    6777              91 :     if ( bUseExceptions ) {
    6778               0 :       CPLErr eclass = CPLGetLastErrorType();
    6779               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6780               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6781                 :       }
    6782                 :     }
    6783                 :   }
    6784              91 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
    6785                 :   {
    6786                 :     /* %typemap(freearg) (const char *utf8_path) */
    6787              91 :     GDALPythonFreeCStr(arg1, bToFree1);
    6788                 :   }
    6789              91 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6790              91 :   return resultobj;
    6791                 : fail:
    6792                 :   {
    6793                 :     /* %typemap(freearg) (const char *utf8_path) */
    6794               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6795                 :   }
    6796               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6797               0 :   return NULL;
    6798                 : }
    6799                 : 
    6800                 : 
    6801              82 : SWIGINTERN PyObject *_wrap_VSIFCloseL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6802              82 :   PyObject *resultobj = 0;
    6803              82 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    6804                 :   int res1 ;
    6805              82 :   PyObject * obj0 = 0 ;
    6806                 :   
    6807              82 :   if (!PyArg_ParseTuple(args,(char *)"O:VSIFCloseL",&obj0)) SWIG_fail;
    6808              82 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    6809              82 :   if (!SWIG_IsOK(res1)) {
    6810               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFCloseL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    6811                 :   }
    6812                 :   {
    6813              82 :     if ( bUseExceptions ) {
    6814               0 :       CPLErrorReset();
    6815                 :     }
    6816              82 :     VSIFCloseL(arg1);
    6817              82 :     if ( bUseExceptions ) {
    6818               0 :       CPLErr eclass = CPLGetLastErrorType();
    6819               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6820               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6821                 :       }
    6822                 :     }
    6823                 :   }
    6824              82 :   resultobj = SWIG_Py_Void();
    6825              82 :   return resultobj;
    6826                 : fail:
    6827               0 :   return NULL;
    6828                 : }
    6829                 : 
    6830                 : 
    6831              29 : SWIGINTERN PyObject *_wrap_VSIFSeekL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6832              29 :   PyObject *resultobj = 0;
    6833              29 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    6834                 :   GIntBig arg2 ;
    6835                 :   int arg3 ;
    6836                 :   int res1 ;
    6837                 :   int val3 ;
    6838              29 :   int ecode3 = 0 ;
    6839              29 :   PyObject * obj0 = 0 ;
    6840              29 :   PyObject * obj1 = 0 ;
    6841              29 :   PyObject * obj2 = 0 ;
    6842                 :   int result;
    6843                 :   
    6844              29 :   if (!PyArg_ParseTuple(args,(char *)"OOO:VSIFSeekL",&obj0,&obj1,&obj2)) SWIG_fail;
    6845              29 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    6846              29 :   if (!SWIG_IsOK(res1)) {
    6847               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFSeekL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    6848                 :   }
    6849                 :   {
    6850                 :     PY_LONG_LONG val;
    6851              29 :     if ( !PyArg_Parse(obj1,"L",&val) ) {
    6852               0 :       PyErr_SetString(PyExc_TypeError, "not an integer");
    6853               0 :       SWIG_fail;
    6854                 :     }
    6855              29 :     arg2 = (GIntBig)val;
    6856                 :   }
    6857              29 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    6858              29 :   if (!SWIG_IsOK(ecode3)) {
    6859               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFSeekL" "', argument " "3"" of type '" "int""'");
    6860                 :   } 
    6861              29 :   arg3 = static_cast< int >(val3);
    6862                 :   {
    6863              29 :     if ( bUseExceptions ) {
    6864               0 :       CPLErrorReset();
    6865                 :     }
    6866              29 :     result = (int)VSIFSeekL(arg1,arg2,arg3);
    6867              29 :     if ( bUseExceptions ) {
    6868               0 :       CPLErr eclass = CPLGetLastErrorType();
    6869               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6870               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6871                 :       }
    6872                 :     }
    6873                 :   }
    6874              29 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6875              29 :   return resultobj;
    6876                 : fail:
    6877               0 :   return NULL;
    6878                 : }
    6879                 : 
    6880                 : 
    6881              23 : SWIGINTERN PyObject *_wrap_VSIFTellL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6882              23 :   PyObject *resultobj = 0;
    6883              23 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    6884                 :   int res1 ;
    6885              23 :   PyObject * obj0 = 0 ;
    6886                 :   GIntBig result;
    6887                 :   
    6888              23 :   if (!PyArg_ParseTuple(args,(char *)"O:VSIFTellL",&obj0)) SWIG_fail;
    6889              23 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    6890              23 :   if (!SWIG_IsOK(res1)) {
    6891               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTellL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    6892                 :   }
    6893                 :   {
    6894              23 :     if ( bUseExceptions ) {
    6895               0 :       CPLErrorReset();
    6896                 :     }
    6897              23 :     result = VSIFTellL(arg1);
    6898              23 :     if ( bUseExceptions ) {
    6899               0 :       CPLErr eclass = CPLGetLastErrorType();
    6900               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6901               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6902                 :       }
    6903                 :     }
    6904                 :   }
    6905                 :   {
    6906                 :     char szTmp[32];
    6907                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
    6908                 : #if PY_VERSION_HEX>=0x03000000
    6909                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
    6910                 : #else
    6911              23 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
    6912                 : #endif
    6913                 :   }
    6914              23 :   return resultobj;
    6915                 : fail:
    6916               0 :   return NULL;
    6917                 : }
    6918                 : 
    6919                 : 
    6920               3 : SWIGINTERN PyObject *_wrap_VSIFTruncateL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6921               3 :   PyObject *resultobj = 0;
    6922               3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    6923                 :   GIntBig arg2 ;
    6924                 :   int res1 ;
    6925               3 :   PyObject * obj0 = 0 ;
    6926               3 :   PyObject * obj1 = 0 ;
    6927                 :   int result;
    6928                 :   
    6929               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:VSIFTruncateL",&obj0,&obj1)) SWIG_fail;
    6930               3 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    6931               3 :   if (!SWIG_IsOK(res1)) {
    6932               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTruncateL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    6933                 :   }
    6934                 :   {
    6935                 :     PY_LONG_LONG val;
    6936               3 :     if ( !PyArg_Parse(obj1,"L",&val) ) {
    6937               0 :       PyErr_SetString(PyExc_TypeError, "not an integer");
    6938               0 :       SWIG_fail;
    6939                 :     }
    6940               3 :     arg2 = (GIntBig)val;
    6941                 :   }
    6942                 :   {
    6943               3 :     if ( bUseExceptions ) {
    6944               0 :       CPLErrorReset();
    6945                 :     }
    6946               3 :     result = (int)VSIFTruncateL(arg1,arg2);
    6947               3 :     if ( bUseExceptions ) {
    6948               0 :       CPLErr eclass = CPLGetLastErrorType();
    6949               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6950               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6951                 :       }
    6952                 :     }
    6953                 :   }
    6954               3 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6955               3 :   return resultobj;
    6956                 : fail:
    6957               0 :   return NULL;
    6958                 : }
    6959                 : 
    6960                 : 
    6961              58 : SWIGINTERN PyObject *_wrap_VSIFWriteL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6962              58 :   PyObject *resultobj = 0;
    6963                 :   int arg1 ;
    6964              58 :   char *arg2 = (char *) 0 ;
    6965                 :   int arg3 ;
    6966                 :   int arg4 ;
    6967              58 :   VSILFILE *arg5 = (VSILFILE *) 0 ;
    6968              58 :   int alloc1 = 0 ;
    6969                 :   int val3 ;
    6970              58 :   int ecode3 = 0 ;
    6971                 :   int val4 ;
    6972              58 :   int ecode4 = 0 ;
    6973                 :   int res5 ;
    6974              58 :   PyObject * obj0 = 0 ;
    6975              58 :   PyObject * obj1 = 0 ;
    6976              58 :   PyObject * obj2 = 0 ;
    6977              58 :   PyObject * obj3 = 0 ;
    6978                 :   int result;
    6979                 :   
    6980              58 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:VSIFWriteL",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    6981                 :   {
    6982                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    6983                 : #if PY_VERSION_HEX>=0x03000000
    6984                 :     if (PyUnicode_Check(obj0))
    6985                 :     {
    6986                 :       size_t safeLen = 0;
    6987                 :       int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
    6988                 :       if (!SWIG_IsOK(ret)) {
    6989                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    6990                 :       }
    6991                 :       
    6992                 :       if (safeLen) safeLen--;
    6993                 :       arg1 = (int) safeLen;
    6994                 :     }
    6995                 :     else if (PyBytes_Check(obj0))
    6996                 :     {
    6997                 :       Py_ssize_t safeLen = 0;
    6998                 :       PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    6999                 :       arg1 = (int) safeLen;
    7000                 :     }
    7001                 :     else
    7002                 :     {
    7003                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    7004                 :       SWIG_fail;
    7005                 :     }
    7006                 : #else
    7007              58 :     if (PyString_Check(obj0))
    7008                 :     {
    7009              58 :       Py_ssize_t safeLen = 0;
    7010              58 :       PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    7011              58 :       arg1 = (int) safeLen;
    7012                 :     }
    7013                 :     else
    7014                 :     {
    7015               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    7016               0 :       SWIG_fail;
    7017                 :     }
    7018                 : #endif
    7019                 :   }
    7020              58 :   ecode3 = SWIG_AsVal_int(obj1, &val3);
    7021              58 :   if (!SWIG_IsOK(ecode3)) {
    7022               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFWriteL" "', argument " "3"" of type '" "int""'");
    7023                 :   } 
    7024              58 :   arg3 = static_cast< int >(val3);
    7025              58 :   ecode4 = SWIG_AsVal_int(obj2, &val4);
    7026              58 :   if (!SWIG_IsOK(ecode4)) {
    7027               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VSIFWriteL" "', argument " "4"" of type '" "int""'");
    7028                 :   } 
    7029              58 :   arg4 = static_cast< int >(val4);
    7030              58 :   res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
    7031              58 :   if (!SWIG_IsOK(res5)) {
    7032               0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VSIFWriteL" "', argument " "5"" of type '" "VSILFILE *""'"); 
    7033                 :   }
    7034                 :   {
    7035              58 :     if ( bUseExceptions ) {
    7036               0 :       CPLErrorReset();
    7037                 :     }
    7038              58 :     result = (int)wrapper_VSIFWriteL(arg1,arg2,arg3,arg4,arg5);
    7039              58 :     if ( bUseExceptions ) {
    7040               0 :       CPLErr eclass = CPLGetLastErrorType();
    7041               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7042               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7043                 :       }
    7044                 :     }
    7045                 :   }
    7046              58 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7047                 :   {
    7048                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    7049              58 :     if( alloc1 == SWIG_NEWOBJ ) {
    7050               0 :       delete[] arg2;
    7051                 :     }
    7052                 :   }
    7053              58 :   return resultobj;
    7054                 : fail:
    7055                 :   {
    7056                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    7057               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    7058               0 :       delete[] arg2;
    7059                 :     }
    7060                 :   }
    7061               0 :   return NULL;
    7062                 : }
    7063                 : 
    7064                 : 
    7065              68 : SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7066              68 :   PyObject *resultobj = 0;
    7067              68 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7068              68 :   void *argp1 = 0 ;
    7069              68 :   int res1 = 0 ;
    7070              68 :   PyObject * obj0 = 0 ;
    7071              68 :   char *result = 0 ;
    7072                 :   
    7073              68 :   if (!PyArg_ParseTuple(args,(char *)"O:MajorObject_GetDescription",&obj0)) SWIG_fail;
    7074              68 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7075              68 :   if (!SWIG_IsOK(res1)) {
    7076               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7077                 :   }
    7078              68 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7079                 :   {
    7080              68 :     if ( bUseExceptions ) {
    7081               0 :       CPLErrorReset();
    7082                 :     }
    7083              68 :     result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
    7084              68 :     if ( bUseExceptions ) {
    7085               0 :       CPLErr eclass = CPLGetLastErrorType();
    7086               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7087               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7088                 :       }
    7089                 :     }
    7090                 :   }
    7091              68 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7092              68 :   return resultobj;
    7093                 : fail:
    7094               0 :   return NULL;
    7095                 : }
    7096                 : 
    7097                 : 
    7098              23 : SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7099              23 :   PyObject *resultobj = 0;
    7100              23 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7101              23 :   char *arg2 = (char *) 0 ;
    7102              23 :   void *argp1 = 0 ;
    7103              23 :   int res1 = 0 ;
    7104                 :   int res2 ;
    7105              23 :   char *buf2 = 0 ;
    7106              23 :   int alloc2 = 0 ;
    7107              23 :   PyObject * obj0 = 0 ;
    7108              23 :   PyObject * obj1 = 0 ;
    7109                 :   
    7110              23 :   if (!PyArg_ParseTuple(args,(char *)"OO:MajorObject_SetDescription",&obj0,&obj1)) SWIG_fail;
    7111              23 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7112              23 :   if (!SWIG_IsOK(res1)) {
    7113               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7114                 :   }
    7115              23 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7116              23 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7117              23 :   if (!SWIG_IsOK(res2)) {
    7118               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
    7119                 :   }
    7120              23 :   arg2 = reinterpret_cast< char * >(buf2);
    7121                 :   {
    7122              23 :     if (!arg2) {
    7123               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7124                 :     }
    7125                 :   }
    7126                 :   {
    7127              23 :     if ( bUseExceptions ) {
    7128               0 :       CPLErrorReset();
    7129                 :     }
    7130                 :     GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
    7131              23 :     if ( bUseExceptions ) {
    7132               0 :       CPLErr eclass = CPLGetLastErrorType();
    7133               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7134               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7135                 :       }
    7136                 :     }
    7137                 :   }
    7138              23 :   resultobj = SWIG_Py_Void();
    7139              23 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7140              23 :   return resultobj;
    7141                 : fail:
    7142               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7143               0 :   return NULL;
    7144                 : }
    7145                 : 
    7146                 : 
    7147            2658 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7148            2658 :   PyObject *resultobj = 0;
    7149            2658 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7150            2658 :   char *arg2 = (char *) "" ;
    7151            2658 :   void *argp1 = 0 ;
    7152            2658 :   int res1 = 0 ;
    7153                 :   int res2 ;
    7154            2658 :   char *buf2 = 0 ;
    7155            2658 :   int alloc2 = 0 ;
    7156            2658 :   PyObject * obj0 = 0 ;
    7157            2658 :   PyObject * obj1 = 0 ;
    7158            2658 :   char **result = 0 ;
    7159                 :   
    7160            2658 :   if (!PyArg_ParseTuple(args,(char *)"O|O:MajorObject_GetMetadata_Dict",&obj0,&obj1)) SWIG_fail;
    7161            2658 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7162            2658 :   if (!SWIG_IsOK(res1)) {
    7163               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7164                 :   }
    7165            2658 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7166            2658 :   if (obj1) {
    7167            2658 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7168            2658 :     if (!SWIG_IsOK(res2)) {
    7169               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
    7170                 :     }
    7171            2658 :     arg2 = reinterpret_cast< char * >(buf2);
    7172                 :   }
    7173                 :   {
    7174            2658 :     if ( bUseExceptions ) {
    7175               0 :       CPLErrorReset();
    7176                 :     }
    7177            2658 :     result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
    7178            2658 :     if ( bUseExceptions ) {
    7179               0 :       CPLErr eclass = CPLGetLastErrorType();
    7180               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7181               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7182                 :       }
    7183                 :     }
    7184                 :   }
    7185                 :   {
    7186                 :     /* %typemap(out) char **dict */
    7187            2658 :     char **stringarray = result;
    7188            2658 :     resultobj = PyDict_New();
    7189            2658 :     if ( stringarray != NULL ) {
    7190           17051 :       while (*stringarray != NULL ) {
    7191                 :         char const *valptr;
    7192                 :         char *keyptr;
    7193           14408 :         const char* pszSep = strchr( *stringarray, '=' );
    7194           14408 :         if ( pszSep != NULL) {
    7195           14408 :           keyptr = CPLStrdup(*stringarray);
    7196           14408 :           keyptr[pszSep - *stringarray] = '\0';
    7197           14408 :           valptr = pszSep + 1;
    7198           14408 :           PyObject *nm = GDALPythonObjectFromCStr( keyptr );
    7199           14408 :           PyObject *val = GDALPythonObjectFromCStr( valptr );
    7200           14408 :           PyDict_SetItem(resultobj, nm, val );
    7201           14408 :           Py_DECREF(nm);
    7202           14408 :           Py_DECREF(val);
    7203           14408 :           CPLFree( keyptr );
    7204                 :         }
    7205           14408 :         stringarray++;
    7206                 :       }
    7207                 :     }
    7208                 :   }
    7209            2658 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7210            2658 :   return resultobj;
    7211                 : fail:
    7212               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7213               0 :   return NULL;
    7214                 : }
    7215                 : 
    7216                 : 
    7217             161 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7218             161 :   PyObject *resultobj = 0;
    7219             161 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7220             161 :   char *arg2 = (char *) "" ;
    7221             161 :   void *argp1 = 0 ;
    7222             161 :   int res1 = 0 ;
    7223                 :   int res2 ;
    7224             161 :   char *buf2 = 0 ;
    7225             161 :   int alloc2 = 0 ;
    7226             161 :   PyObject * obj0 = 0 ;
    7227             161 :   PyObject * obj1 = 0 ;
    7228             161 :   char **result = 0 ;
    7229                 :   
    7230             161 :   if (!PyArg_ParseTuple(args,(char *)"O|O:MajorObject_GetMetadata_List",&obj0,&obj1)) SWIG_fail;
    7231             161 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7232             161 :   if (!SWIG_IsOK(res1)) {
    7233               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7234                 :   }
    7235             161 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7236             161 :   if (obj1) {
    7237             128 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7238             128 :     if (!SWIG_IsOK(res2)) {
    7239               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
    7240                 :     }
    7241             128 :     arg2 = reinterpret_cast< char * >(buf2);
    7242                 :   }
    7243                 :   {
    7244             161 :     if ( bUseExceptions ) {
    7245               0 :       CPLErrorReset();
    7246                 :     }
    7247             161 :     result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
    7248             161 :     if ( bUseExceptions ) {
    7249               0 :       CPLErr eclass = CPLGetLastErrorType();
    7250               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7251               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7252                 :       }
    7253                 :     }
    7254                 :   }
    7255                 :   {
    7256                 :     /* %typemap(out) char **options -> ( string ) */
    7257             161 :     char **stringarray = result;
    7258             161 :     if ( stringarray == NULL ) {
    7259             104 :       resultobj = Py_None;
    7260             104 :       Py_INCREF( resultobj );
    7261                 :     }
    7262                 :     else {
    7263              57 :       int len = CSLCount( stringarray );
    7264              57 :       resultobj = PyList_New( len );
    7265             384 :       for ( int i = 0; i < len; ++i ) {
    7266             327 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    7267             327 :         PyList_SetItem(resultobj, i, o );
    7268                 :       }
    7269                 :     }
    7270                 :   }
    7271             161 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7272             161 :   return resultobj;
    7273                 : fail:
    7274               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7275               0 :   return NULL;
    7276                 : }
    7277                 : 
    7278                 : 
    7279              69 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7280              69 :   PyObject *resultobj = 0;
    7281              69 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7282              69 :   char **arg2 = (char **) 0 ;
    7283              69 :   char *arg3 = (char *) "" ;
    7284              69 :   void *argp1 = 0 ;
    7285              69 :   int res1 = 0 ;
    7286                 :   int res3 ;
    7287              69 :   char *buf3 = 0 ;
    7288              69 :   int alloc3 = 0 ;
    7289              69 :   PyObject * obj0 = 0 ;
    7290              69 :   PyObject * obj1 = 0 ;
    7291              69 :   PyObject * obj2 = 0 ;
    7292                 :   CPLErr result;
    7293                 :   
    7294              69 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_SetMetadata",&obj0,&obj1,&obj2)) SWIG_fail;
    7295              69 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7296              69 :   if (!SWIG_IsOK(res1)) {
    7297               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7298                 :   }
    7299              69 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7300                 :   {
    7301                 :     /* %typemap(in) char **dict */
    7302              69 :     arg2 = NULL;
    7303              69 :     if ( PySequence_Check( obj1 ) ) {
    7304               9 :       int size = PySequence_Size(obj1);
    7305              20 :       for (int i = 0; i < size; i++) {
    7306              11 :         char *pszItem = NULL;
    7307              11 :         PyObject* pyObj = PySequence_GetItem(obj1,i);
    7308              11 :         if ( ! PyArg_Parse( pyObj, "s", &pszItem ) ) {
    7309               0 :           Py_DECREF(pyObj);
    7310               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    7311               0 :           SWIG_fail;
    7312                 :         }
    7313              11 :         arg2 = CSLAddString( arg2, pszItem );
    7314              11 :         Py_DECREF(pyObj);
    7315                 :       }
    7316                 :     }
    7317              60 :     else if ( PyMapping_Check( obj1 ) ) {
    7318                 :       /* We need to use the dictionary form. */
    7319              60 :       int size = PyMapping_Length( obj1 );
    7320              60 :       if ( size > 0 ) {
    7321              60 :         PyObject *item_list = PyMapping_Items( obj1 );
    7322             132 :         for( int i=0; i<size; i++ ) {
    7323              72 :           PyObject *it = PySequence_GetItem( item_list, i );
    7324                 :           char *nm;
    7325                 :           char *val;
    7326              72 :           if ( ! PyArg_ParseTuple( it, "ss", &nm, &val ) ) {
    7327               0 :             Py_DECREF(it);
    7328               0 :             PyErr_SetString(PyExc_TypeError,"dictionnaire must contain tuples of strings");
    7329               0 :             SWIG_fail;
    7330                 :           }
    7331              72 :           arg2 = CSLAddNameValue( arg2, nm, val );
    7332              72 :           Py_DECREF(it);
    7333                 :         }
    7334              60 :         Py_DECREF(item_list);
    7335                 :       }
    7336                 :     }
    7337                 :     else {
    7338               0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
    7339               0 :       SWIG_fail;
    7340                 :     }
    7341                 :   }
    7342              69 :   if (obj2) {
    7343              11 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7344              11 :     if (!SWIG_IsOK(res3)) {
    7345               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
    7346                 :     }
    7347              11 :     arg3 = reinterpret_cast< char * >(buf3);
    7348                 :   }
    7349                 :   {
    7350              69 :     if ( bUseExceptions ) {
    7351               0 :       CPLErrorReset();
    7352                 :     }
    7353              69 :     result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
    7354              69 :     if ( bUseExceptions ) {
    7355               0 :       CPLErr eclass = CPLGetLastErrorType();
    7356               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7357               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7358                 :       }
    7359                 :     }
    7360                 :   }
    7361             138 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7362                 :   {
    7363                 :     /* %typemap(freearg) char **dict */
    7364              69 :     CSLDestroy( arg2 );
    7365                 :   }
    7366              69 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7367                 :   {
    7368                 :     /* %typemap(ret) CPLErr */
    7369              69 :     if ( bUseExceptions == 0 ) {
    7370                 :       /* We're not using exceptions.  And no error has occurred */
    7371              69 :       if ( resultobj == 0 ) {
    7372                 :         /* No other return values set so return ErrorCode */
    7373               0 :         resultobj = PyInt_FromLong(result);
    7374                 :       }
    7375                 :     }
    7376                 :   }
    7377              69 :   return resultobj;
    7378                 : fail:
    7379                 :   {
    7380                 :     /* %typemap(freearg) char **dict */
    7381               0 :     CSLDestroy( arg2 );
    7382                 :   }
    7383               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7384               0 :   return NULL;
    7385                 : }
    7386                 : 
    7387                 : 
    7388               5 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7389               5 :   PyObject *resultobj = 0;
    7390               5 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7391               5 :   char *arg2 = (char *) 0 ;
    7392               5 :   char *arg3 = (char *) "" ;
    7393               5 :   void *argp1 = 0 ;
    7394               5 :   int res1 = 0 ;
    7395                 :   int res2 ;
    7396               5 :   char *buf2 = 0 ;
    7397               5 :   int alloc2 = 0 ;
    7398                 :   int res3 ;
    7399               5 :   char *buf3 = 0 ;
    7400               5 :   int alloc3 = 0 ;
    7401               5 :   PyObject * obj0 = 0 ;
    7402               5 :   PyObject * obj1 = 0 ;
    7403               5 :   PyObject * obj2 = 0 ;
    7404                 :   CPLErr result;
    7405                 :   
    7406               5 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_SetMetadata",&obj0,&obj1,&obj2)) SWIG_fail;
    7407               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7408               5 :   if (!SWIG_IsOK(res1)) {
    7409               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7410                 :   }
    7411               5 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7412               5 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7413               5 :   if (!SWIG_IsOK(res2)) {
    7414               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
    7415                 :   }
    7416               5 :   arg2 = reinterpret_cast< char * >(buf2);
    7417               5 :   if (obj2) {
    7418               5 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7419               5 :     if (!SWIG_IsOK(res3)) {
    7420               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
    7421                 :     }
    7422               5 :     arg3 = reinterpret_cast< char * >(buf3);
    7423                 :   }
    7424                 :   {
    7425               5 :     if ( bUseExceptions ) {
    7426               0 :       CPLErrorReset();
    7427                 :     }
    7428               5 :     result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
    7429               5 :     if ( bUseExceptions ) {
    7430               0 :       CPLErr eclass = CPLGetLastErrorType();
    7431               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7432               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7433                 :       }
    7434                 :     }
    7435                 :   }
    7436              10 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7437               5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7438               5 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7439                 :   {
    7440                 :     /* %typemap(ret) CPLErr */
    7441               5 :     if ( bUseExceptions == 0 ) {
    7442                 :       /* We're not using exceptions.  And no error has occurred */
    7443               5 :       if ( resultobj == 0 ) {
    7444                 :         /* No other return values set so return ErrorCode */
    7445               0 :         resultobj = PyInt_FromLong(result);
    7446                 :       }
    7447                 :     }
    7448                 :   }
    7449               5 :   return resultobj;
    7450                 : fail:
    7451               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7452               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7453               0 :   return NULL;
    7454                 : }
    7455                 : 
    7456                 : 
    7457              74 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
    7458                 :   int argc;
    7459                 :   PyObject *argv[4];
    7460                 :   int ii;
    7461                 :   
    7462              74 :   if (!PyTuple_Check(args)) SWIG_fail;
    7463              74 :   argc = (int)PyObject_Length(args);
    7464             238 :   for (ii = 0; (ii < argc) && (ii < 3); ii++) {
    7465             164 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    7466                 :   }
    7467              74 :   if ((argc >= 2) && (argc <= 3)) {
    7468                 :     int _v;
    7469              74 :     void *vptr = 0;
    7470              74 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
    7471              74 :     _v = SWIG_CheckState(res);
    7472              74 :     if (_v) {
    7473                 :       {
    7474                 :         /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
    7475                 :         /* Note: we exclude explicitely strings, because they can be considered as a sequence of characters, */
    7476                 :         /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
    7477                 :         /* (see #4816) */
    7478              74 :         _v = ((PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0)) ) ? 1 : 0;
    7479                 :       }
    7480              74 :       if (_v) {
    7481              69 :         if (argc <= 2) {
    7482              58 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, args);
    7483                 :         }
    7484              11 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
    7485              11 :         _v = SWIG_CheckState(res);
    7486              11 :         if (_v) {
    7487              11 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, args);
    7488                 :         }
    7489                 :       }
    7490                 :     }
    7491                 :   }
    7492               5 :   if ((argc >= 2) && (argc <= 3)) {
    7493                 :     int _v;
    7494               5 :     void *vptr = 0;
    7495               5 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
    7496               5 :     _v = SWIG_CheckState(res);
    7497               5 :     if (_v) {
    7498               5 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    7499               5 :       _v = SWIG_CheckState(res);
    7500               5 :       if (_v) {
    7501               5 :         if (argc <= 2) {
    7502               0 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, args);
    7503                 :         }
    7504               5 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
    7505               5 :         _v = SWIG_CheckState(res);
    7506               5 :         if (_v) {
    7507               5 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, args);
    7508                 :         }
    7509                 :       }
    7510                 :     }
    7511                 :   }
    7512                 :   
    7513                 : fail:
    7514                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
    7515                 :     "  Possible C/C++ prototypes are:\n"
    7516                 :     "    SetMetadata(GDALMajorObjectShadow *,char **,char const *)\n"
    7517               0 :     "    SetMetadata(GDALMajorObjectShadow *,char *,char const *)\n");
    7518               0 :   return NULL;
    7519                 : }
    7520                 : 
    7521                 : 
    7522             153 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7523             153 :   PyObject *resultobj = 0;
    7524             153 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7525             153 :   char *arg2 = (char *) 0 ;
    7526             153 :   char *arg3 = (char *) "" ;
    7527             153 :   void *argp1 = 0 ;
    7528             153 :   int res1 = 0 ;
    7529                 :   int res2 ;
    7530             153 :   char *buf2 = 0 ;
    7531             153 :   int alloc2 = 0 ;
    7532                 :   int res3 ;
    7533             153 :   char *buf3 = 0 ;
    7534             153 :   int alloc3 = 0 ;
    7535             153 :   PyObject * obj0 = 0 ;
    7536             153 :   PyObject * obj1 = 0 ;
    7537             153 :   PyObject * obj2 = 0 ;
    7538             153 :   char *result = 0 ;
    7539                 :   
    7540             153 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_GetMetadataItem",&obj0,&obj1,&obj2)) SWIG_fail;
    7541             153 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7542             153 :   if (!SWIG_IsOK(res1)) {
    7543               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7544                 :   }
    7545             153 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7546             153 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7547             153 :   if (!SWIG_IsOK(res2)) {
    7548               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
    7549                 :   }
    7550             153 :   arg2 = reinterpret_cast< char * >(buf2);
    7551             153 :   if (obj2) {
    7552              91 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7553              91 :     if (!SWIG_IsOK(res3)) {
    7554               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
    7555                 :     }
    7556              91 :     arg3 = reinterpret_cast< char * >(buf3);
    7557                 :   }
    7558                 :   {
    7559             153 :     if (!arg2) {
    7560               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7561                 :     }
    7562                 :   }
    7563                 :   {
    7564             153 :     if ( bUseExceptions ) {
    7565               0 :       CPLErrorReset();
    7566                 :     }
    7567             153 :     result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
    7568             153 :     if ( bUseExceptions ) {
    7569               0 :       CPLErr eclass = CPLGetLastErrorType();
    7570               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7571               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7572                 :       }
    7573                 :     }
    7574                 :   }
    7575             153 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7576             153 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7577             153 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7578             153 :   return resultobj;
    7579                 : fail:
    7580               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7581               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7582               0 :   return NULL;
    7583                 : }
    7584                 : 
    7585                 : 
    7586              33 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7587              33 :   PyObject *resultobj = 0;
    7588              33 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7589              33 :   char *arg2 = (char *) 0 ;
    7590              33 :   char *arg3 = (char *) 0 ;
    7591              33 :   char *arg4 = (char *) "" ;
    7592              33 :   void *argp1 = 0 ;
    7593              33 :   int res1 = 0 ;
    7594                 :   int res2 ;
    7595              33 :   char *buf2 = 0 ;
    7596              33 :   int alloc2 = 0 ;
    7597                 :   int res3 ;
    7598              33 :   char *buf3 = 0 ;
    7599              33 :   int alloc3 = 0 ;
    7600                 :   int res4 ;
    7601              33 :   char *buf4 = 0 ;
    7602              33 :   int alloc4 = 0 ;
    7603              33 :   PyObject * obj0 = 0 ;
    7604              33 :   PyObject * obj1 = 0 ;
    7605              33 :   PyObject * obj2 = 0 ;
    7606              33 :   PyObject * obj3 = 0 ;
    7607                 :   CPLErr result;
    7608                 :   
    7609              33 :   if (!PyArg_ParseTuple(args,(char *)"OOO|O:MajorObject_SetMetadataItem",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    7610              33 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7611              33 :   if (!SWIG_IsOK(res1)) {
    7612               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7613                 :   }
    7614              33 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7615              33 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7616              33 :   if (!SWIG_IsOK(res2)) {
    7617               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
    7618                 :   }
    7619              33 :   arg2 = reinterpret_cast< char * >(buf2);
    7620              33 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7621              33 :   if (!SWIG_IsOK(res3)) {
    7622               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
    7623                 :   }
    7624              33 :   arg3 = reinterpret_cast< char * >(buf3);
    7625              33 :   if (obj3) {
    7626               7 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
    7627               7 :     if (!SWIG_IsOK(res4)) {
    7628               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
    7629                 :     }
    7630               7 :     arg4 = reinterpret_cast< char * >(buf4);
    7631                 :   }
    7632                 :   {
    7633              33 :     if (!arg2) {
    7634               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7635                 :     }
    7636                 :   }
    7637                 :   {
    7638              33 :     if ( bUseExceptions ) {
    7639               0 :       CPLErrorReset();
    7640                 :     }
    7641              33 :     result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
    7642              33 :     if ( bUseExceptions ) {
    7643               0 :       CPLErr eclass = CPLGetLastErrorType();
    7644               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7645               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7646                 :       }
    7647                 :     }
    7648                 :   }
    7649              66 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7650              33 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7651              33 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7652              33 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
    7653                 :   {
    7654                 :     /* %typemap(ret) CPLErr */
    7655              33 :     if ( bUseExceptions == 0 ) {
    7656                 :       /* We're not using exceptions.  And no error has occurred */
    7657              33 :       if ( resultobj == 0 ) {
    7658                 :         /* No other return values set so return ErrorCode */
    7659               0 :         resultobj = PyInt_FromLong(result);
    7660                 :       }
    7661                 :     }
    7662                 :   }
    7663              33 :   return resultobj;
    7664                 : fail:
    7665               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7666               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7667               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
    7668               0 :   return NULL;
    7669                 : }
    7670                 : 
    7671                 : 
    7672               6 : SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7673                 :   PyObject *obj;
    7674               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    7675               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
    7676               6 :   return SWIG_Py_Void();
    7677                 : }
    7678                 : 
    7679           22983 : SWIGINTERN PyObject *_wrap_Driver_ShortName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7680           22983 :   PyObject *resultobj = 0;
    7681           22983 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7682           22983 :   void *argp1 = 0 ;
    7683           22983 :   int res1 = 0 ;
    7684           22983 :   PyObject * obj0 = 0 ;
    7685           22983 :   char *result = 0 ;
    7686                 :   
    7687           22983 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_ShortName_get",&obj0)) SWIG_fail;
    7688           22983 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7689           22983 :   if (!SWIG_IsOK(res1)) {
    7690               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_ShortName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7691                 :   }
    7692           22983 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7693                 :   {
    7694           22983 :     if ( bUseExceptions ) {
    7695               0 :       CPLErrorReset();
    7696                 :     }
    7697           22983 :     result = (char *)GDALDriverShadow_ShortName_get(arg1);
    7698           22983 :     if ( bUseExceptions ) {
    7699               0 :       CPLErr eclass = CPLGetLastErrorType();
    7700               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7701               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7702                 :       }
    7703                 :     }
    7704                 :   }
    7705           22983 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7706           22983 :   return resultobj;
    7707                 : fail:
    7708               0 :   return NULL;
    7709                 : }
    7710                 : 
    7711                 : 
    7712              17 : SWIGINTERN PyObject *_wrap_Driver_LongName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7713              17 :   PyObject *resultobj = 0;
    7714              17 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7715              17 :   void *argp1 = 0 ;
    7716              17 :   int res1 = 0 ;
    7717              17 :   PyObject * obj0 = 0 ;
    7718              17 :   char *result = 0 ;
    7719                 :   
    7720              17 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_LongName_get",&obj0)) SWIG_fail;
    7721              17 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7722              17 :   if (!SWIG_IsOK(res1)) {
    7723               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_LongName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7724                 :   }
    7725              17 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7726                 :   {
    7727              17 :     if ( bUseExceptions ) {
    7728               0 :       CPLErrorReset();
    7729                 :     }
    7730              17 :     result = (char *)GDALDriverShadow_LongName_get(arg1);
    7731              17 :     if ( bUseExceptions ) {
    7732               0 :       CPLErr eclass = CPLGetLastErrorType();
    7733               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7734               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7735                 :       }
    7736                 :     }
    7737                 :   }
    7738              17 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7739              17 :   return resultobj;
    7740                 : fail:
    7741               0 :   return NULL;
    7742                 : }
    7743                 : 
    7744                 : 
    7745               0 : SWIGINTERN PyObject *_wrap_Driver_HelpTopic_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7746               0 :   PyObject *resultobj = 0;
    7747               0 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7748               0 :   void *argp1 = 0 ;
    7749               0 :   int res1 = 0 ;
    7750               0 :   PyObject * obj0 = 0 ;
    7751               0 :   char *result = 0 ;
    7752                 :   
    7753               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_HelpTopic_get",&obj0)) SWIG_fail;
    7754               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7755               0 :   if (!SWIG_IsOK(res1)) {
    7756               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HelpTopic_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7757                 :   }
    7758               0 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7759                 :   {
    7760               0 :     if ( bUseExceptions ) {
    7761               0 :       CPLErrorReset();
    7762                 :     }
    7763               0 :     result = (char *)GDALDriverShadow_HelpTopic_get(arg1);
    7764               0 :     if ( bUseExceptions ) {
    7765               0 :       CPLErr eclass = CPLGetLastErrorType();
    7766               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7767               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7768                 :       }
    7769                 :     }
    7770                 :   }
    7771               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7772               0 :   return resultobj;
    7773                 : fail:
    7774               0 :   return NULL;
    7775                 : }
    7776                 : 
    7777                 : 
    7778            6997 : SWIGINTERN PyObject *_wrap_Driver_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    7779            6997 :   PyObject *resultobj = 0;
    7780            6997 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7781            6997 :   char *arg2 = (char *) 0 ;
    7782                 :   int arg3 ;
    7783                 :   int arg4 ;
    7784            6997 :   int arg5 = (int) 1 ;
    7785            6997 :   GDALDataType arg6 = (GDALDataType) GDT_Byte ;
    7786            6997 :   char **arg7 = (char **) 0 ;
    7787            6997 :   void *argp1 = 0 ;
    7788            6997 :   int res1 = 0 ;
    7789            6997 :   int bToFree2 = 0 ;
    7790                 :   int val3 ;
    7791            6997 :   int ecode3 = 0 ;
    7792                 :   int val4 ;
    7793            6997 :   int ecode4 = 0 ;
    7794                 :   int val5 ;
    7795            6997 :   int ecode5 = 0 ;
    7796                 :   int val6 ;
    7797            6997 :   int ecode6 = 0 ;
    7798            6997 :   PyObject * obj0 = 0 ;
    7799            6997 :   PyObject * obj1 = 0 ;
    7800            6997 :   PyObject * obj2 = 0 ;
    7801            6997 :   PyObject * obj3 = 0 ;
    7802            6997 :   PyObject * obj4 = 0 ;
    7803            6997 :   PyObject * obj5 = 0 ;
    7804            6997 :   PyObject * obj6 = 0 ;
    7805                 :   char *  kwnames[] = {
    7806                 :     (char *) "self",(char *) "utf8_path",(char *) "xsize",(char *) "ysize",(char *) "bands",(char *) "eType",(char *) "options", NULL 
    7807            6997 :   };
    7808            6997 :   GDALDatasetShadow *result = 0 ;
    7809                 :   
    7810            6997 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:Driver_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
    7811            6997 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7812            6997 :   if (!SWIG_IsOK(res1)) {
    7813               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Create" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7814                 :   }
    7815            6997 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7816                 :   {
    7817                 :     /* %typemap(in) (const char *utf8_path) */
    7818            6997 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    7819            6997 :     if (arg2 == NULL)
    7820                 :     {
    7821               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    7822               0 :       SWIG_fail;
    7823                 :     }
    7824                 :   }
    7825            6997 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    7826            6997 :   if (!SWIG_IsOK(ecode3)) {
    7827               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Create" "', argument " "3"" of type '" "int""'");
    7828                 :   } 
    7829            6997 :   arg3 = static_cast< int >(val3);
    7830            6997 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
    7831            6997 :   if (!SWIG_IsOK(ecode4)) {
    7832               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_Create" "', argument " "4"" of type '" "int""'");
    7833                 :   } 
    7834            6997 :   arg4 = static_cast< int >(val4);
    7835            6997 :   if (obj4) {
    7836            6777 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
    7837            6777 :     if (!SWIG_IsOK(ecode5)) {
    7838               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Driver_Create" "', argument " "5"" of type '" "int""'");
    7839                 :     } 
    7840            6777 :     arg5 = static_cast< int >(val5);
    7841                 :   }
    7842            6997 :   if (obj5) {
    7843            1609 :     ecode6 = SWIG_AsVal_int(obj5, &val6);
    7844            1609 :     if (!SWIG_IsOK(ecode6)) {
    7845               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Driver_Create" "', argument " "6"" of type '" "GDALDataType""'");
    7846                 :     } 
    7847            1609 :     arg6 = static_cast< GDALDataType >(val6);
    7848                 :   }
    7849            6997 :   if (obj6) {
    7850                 :     {
    7851                 :       /* %typemap(in) char **options */
    7852                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    7853             358 :       if ( ! PySequence_Check(obj6) || PyUnicode_Check(obj6)
    7854                 :   #if PY_VERSION_HEX < 0x03000000
    7855                 :         || PyString_Check(obj6)
    7856                 :   #endif
    7857                 :         ) {
    7858               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    7859               0 :         SWIG_fail;
    7860                 :       }
    7861                 :       
    7862             358 :       int size = PySequence_Size(obj6);
    7863             684 :       for (int i = 0; i < size; i++) {
    7864             326 :         PyObject* pyObj = PySequence_GetItem(obj6,i);
    7865             326 :         if (PyUnicode_Check(pyObj))
    7866                 :         {
    7867                 :           char *pszStr;
    7868                 :           Py_ssize_t nLen;
    7869               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    7870                 : #if PY_VERSION_HEX >= 0x03000000
    7871                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7872                 : #else
    7873               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7874                 : #endif
    7875               0 :           arg7 = CSLAddString( arg7, pszStr );
    7876               0 :           Py_XDECREF(pyUTF8Str);
    7877                 :         }
    7878                 : #if PY_VERSION_HEX >= 0x03000000
    7879                 :         else if (PyBytes_Check(pyObj))
    7880                 :         arg7 = CSLAddString( arg7, PyBytes_AsString(pyObj) );
    7881                 : #else
    7882             326 :         else if (PyString_Check(pyObj))
    7883             326 :         arg7 = CSLAddString( arg7, PyString_AsString(pyObj) );
    7884                 : #endif
    7885                 :         else
    7886                 :         {
    7887               0 :           Py_DECREF(pyObj);
    7888               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    7889               0 :           SWIG_fail;
    7890                 :         }
    7891             326 :         Py_DECREF(pyObj);
    7892                 :       }
    7893                 :     }
    7894                 :   }
    7895                 :   {
    7896            6997 :     if ( bUseExceptions ) {
    7897               0 :       CPLErrorReset();
    7898                 :     }
    7899            6997 :     result = (GDALDatasetShadow *)GDALDriverShadow_Create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
    7900            6997 :     if ( bUseExceptions ) {
    7901               0 :       CPLErr eclass = CPLGetLastErrorType();
    7902               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7903               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7904                 :       }
    7905                 :     }
    7906                 :   }
    7907            6997 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
    7908                 :   {
    7909                 :     /* %typemap(freearg) (const char *utf8_path) */
    7910            6997 :     GDALPythonFreeCStr(arg2, bToFree2);
    7911                 :   }
    7912                 :   {
    7913                 :     /* %typemap(freearg) char **options */
    7914            6997 :     CSLDestroy( arg7 );
    7915                 :   }
    7916            6997 :   return resultobj;
    7917                 : fail:
    7918                 :   {
    7919                 :     /* %typemap(freearg) (const char *utf8_path) */
    7920               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    7921                 :   }
    7922                 :   {
    7923                 :     /* %typemap(freearg) char **options */
    7924               0 :     CSLDestroy( arg7 );
    7925                 :   }
    7926               0 :   return NULL;
    7927                 : }
    7928                 : 
    7929                 : 
    7930            2041 : SWIGINTERN PyObject *_wrap_Driver_CreateCopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    7931            2041 :   PyObject *resultobj = 0;
    7932            2041 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7933            2041 :   char *arg2 = (char *) 0 ;
    7934            2041 :   GDALDatasetShadow *arg3 = (GDALDatasetShadow *) 0 ;
    7935            2041 :   int arg4 = (int) 1 ;
    7936            2041 :   char **arg5 = (char **) 0 ;
    7937            2041 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
    7938            2041 :   void *arg7 = (void *) NULL ;
    7939            2041 :   void *argp1 = 0 ;
    7940            2041 :   int res1 = 0 ;
    7941            2041 :   int bToFree2 = 0 ;
    7942            2041 :   void *argp3 = 0 ;
    7943            2041 :   int res3 = 0 ;
    7944                 :   int val4 ;
    7945            2041 :   int ecode4 = 0 ;
    7946            2041 :   PyObject * obj0 = 0 ;
    7947            2041 :   PyObject * obj1 = 0 ;
    7948            2041 :   PyObject * obj2 = 0 ;
    7949            2041 :   PyObject * obj3 = 0 ;
    7950            2041 :   PyObject * obj4 = 0 ;
    7951            2041 :   PyObject * obj5 = 0 ;
    7952            2041 :   PyObject * obj6 = 0 ;
    7953                 :   char *  kwnames[] = {
    7954                 :     (char *) "self",(char *) "utf8_path",(char *) "src",(char *) "strict",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
    7955            2041 :   };
    7956            2041 :   GDALDatasetShadow *result = 0 ;
    7957                 :   
    7958                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
    7959                 :   PyProgressData *psProgressInfo;
    7960            2041 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
    7961            2041 :   psProgressInfo->nLastReported = -1;
    7962            2041 :   psProgressInfo->psPyCallback = NULL;
    7963            2041 :   psProgressInfo->psPyCallbackData = NULL;
    7964            2041 :   arg7 = psProgressInfo;
    7965            2041 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Driver_CreateCopy",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
    7966            2041 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7967            2041 :   if (!SWIG_IsOK(res1)) {
    7968               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateCopy" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7969                 :   }
    7970            2041 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7971                 :   {
    7972                 :     /* %typemap(in) (const char *utf8_path) */
    7973            2041 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    7974            2041 :     if (arg2 == NULL)
    7975                 :     {
    7976               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    7977               0 :       SWIG_fail;
    7978                 :     }
    7979                 :   }
    7980            2041 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
    7981            2041 :   if (!SWIG_IsOK(res3)) {
    7982               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CreateCopy" "', argument " "3"" of type '" "GDALDatasetShadow *""'"); 
    7983                 :   }
    7984            2041 :   arg3 = reinterpret_cast< GDALDatasetShadow * >(argp3);
    7985            2041 :   if (obj3) {
    7986             256 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
    7987             256 :     if (!SWIG_IsOK(ecode4)) {
    7988               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_CreateCopy" "', argument " "4"" of type '" "int""'");
    7989                 :     } 
    7990             256 :     arg4 = static_cast< int >(val4);
    7991                 :   }
    7992            2041 :   if (obj4) {
    7993                 :     {
    7994                 :       /* %typemap(in) char **options */
    7995                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    7996             363 :       if ( ! PySequence_Check(obj4) || PyUnicode_Check(obj4)
    7997                 :   #if PY_VERSION_HEX < 0x03000000
    7998                 :         || PyString_Check(obj4)
    7999                 :   #endif
    8000                 :         ) {
    8001               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    8002               0 :         SWIG_fail;
    8003                 :       }
    8004                 :       
    8005             363 :       int size = PySequence_Size(obj4);
    8006             702 :       for (int i = 0; i < size; i++) {
    8007             339 :         PyObject* pyObj = PySequence_GetItem(obj4,i);
    8008             339 :         if (PyUnicode_Check(pyObj))
    8009                 :         {
    8010                 :           char *pszStr;
    8011                 :           Py_ssize_t nLen;
    8012               1 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    8013                 : #if PY_VERSION_HEX >= 0x03000000
    8014                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8015                 : #else
    8016               1 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8017                 : #endif
    8018               1 :           arg5 = CSLAddString( arg5, pszStr );
    8019               1 :           Py_XDECREF(pyUTF8Str);
    8020                 :         }
    8021                 : #if PY_VERSION_HEX >= 0x03000000
    8022                 :         else if (PyBytes_Check(pyObj))
    8023                 :         arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
    8024                 : #else
    8025             338 :         else if (PyString_Check(pyObj))
    8026             338 :         arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
    8027                 : #endif
    8028                 :         else
    8029                 :         {
    8030               0 :           Py_DECREF(pyObj);
    8031               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    8032               0 :           SWIG_fail;
    8033                 :         }
    8034             339 :         Py_DECREF(pyObj);
    8035                 :       }
    8036                 :     }
    8037                 :   }
    8038            2041 :   if (obj5) {
    8039                 :     {
    8040                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
    8041                 :       /* callback_func typemap */
    8042             364 :       if (obj5 && obj5 != Py_None ) {
    8043             364 :         void* cbfunction = NULL;
    8044                 :         SWIG_ConvertPtr( obj5, 
    8045                 :           (void**)&cbfunction,
    8046                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
    8047             364 :           SWIG_POINTER_EXCEPTION | 0 );
    8048                 :         
    8049             364 :         if ( cbfunction == GDALTermProgress ) {
    8050               0 :           arg6 = GDALTermProgress;
    8051                 :         } else {
    8052             364 :           if (!PyCallable_Check(obj5)) {
    8053                 :             PyErr_SetString( PyExc_RuntimeError, 
    8054               0 :               "Object given is not a Python function" );
    8055               0 :             SWIG_fail;
    8056                 :           }
    8057             364 :           psProgressInfo->psPyCallback = obj5;
    8058             364 :           arg6 = PyProgressProxy;
    8059                 :         }
    8060                 :         
    8061                 :       }
    8062                 :       
    8063                 :     }
    8064                 :   }
    8065            2041 :   if (obj6) {
    8066                 :     {
    8067                 :       /* %typemap(in) ( void* callback_data=NULL)  */
    8068               0 :       psProgressInfo->psPyCallbackData = obj6 ;
    8069                 :     }
    8070                 :   }
    8071                 :   {
    8072            2041 :     if (!arg3) {
    8073               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8074                 :     }
    8075                 :   }
    8076                 :   {
    8077            2041 :     if ( bUseExceptions ) {
    8078               0 :       CPLErrorReset();
    8079                 :     }
    8080            2041 :     result = (GDALDatasetShadow *)GDALDriverShadow_CreateCopy(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
    8081            2041 :     if ( bUseExceptions ) {
    8082               0 :       CPLErr eclass = CPLGetLastErrorType();
    8083               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8084               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8085                 :       }
    8086                 :     }
    8087                 :   }
    8088            2041 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
    8089                 :   {
    8090                 :     /* %typemap(freearg) (const char *utf8_path) */
    8091            2041 :     GDALPythonFreeCStr(arg2, bToFree2);
    8092                 :   }
    8093                 :   {
    8094                 :     /* %typemap(freearg) char **options */
    8095            2041 :     CSLDestroy( arg5 );
    8096                 :   }
    8097                 :   {
    8098                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8099                 :     
    8100            2041 :     CPLFree(psProgressInfo);
    8101                 :     
    8102                 :   }
    8103            2041 :   return resultobj;
    8104                 : fail:
    8105                 :   {
    8106                 :     /* %typemap(freearg) (const char *utf8_path) */
    8107               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    8108                 :   }
    8109                 :   {
    8110                 :     /* %typemap(freearg) char **options */
    8111               0 :     CSLDestroy( arg5 );
    8112                 :   }
    8113                 :   {
    8114                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8115                 :     
    8116               0 :     CPLFree(psProgressInfo);
    8117                 :     
    8118                 :   }
    8119               0 :   return NULL;
    8120                 : }
    8121                 : 
    8122                 : 
    8123            1317 : SWIGINTERN PyObject *_wrap_Driver_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8124            1317 :   PyObject *resultobj = 0;
    8125            1317 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8126            1317 :   char *arg2 = (char *) 0 ;
    8127            1317 :   void *argp1 = 0 ;
    8128            1317 :   int res1 = 0 ;
    8129            1317 :   int bToFree2 = 0 ;
    8130            1317 :   PyObject * obj0 = 0 ;
    8131            1317 :   PyObject * obj1 = 0 ;
    8132                 :   int result;
    8133                 :   
    8134            1317 :   if (!PyArg_ParseTuple(args,(char *)"OO:Driver_Delete",&obj0,&obj1)) SWIG_fail;
    8135            1317 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8136            1317 :   if (!SWIG_IsOK(res1)) {
    8137               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Delete" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8138                 :   }
    8139            1317 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8140                 :   {
    8141                 :     /* %typemap(in) (const char *utf8_path) */
    8142            1317 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    8143            1317 :     if (arg2 == NULL)
    8144                 :     {
    8145               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    8146               0 :       SWIG_fail;
    8147                 :     }
    8148                 :   }
    8149                 :   {
    8150            1317 :     if ( bUseExceptions ) {
    8151               0 :       CPLErrorReset();
    8152                 :     }
    8153            1317 :     result = (int)GDALDriverShadow_Delete(arg1,(char const *)arg2);
    8154            1317 :     if ( bUseExceptions ) {
    8155               0 :       CPLErr eclass = CPLGetLastErrorType();
    8156               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8157               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8158                 :       }
    8159                 :     }
    8160                 :   }
    8161            1317 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8162                 :   {
    8163                 :     /* %typemap(freearg) (const char *utf8_path) */
    8164            1317 :     GDALPythonFreeCStr(arg2, bToFree2);
    8165                 :   }
    8166            1317 :   return resultobj;
    8167                 : fail:
    8168                 :   {
    8169                 :     /* %typemap(freearg) (const char *utf8_path) */
    8170               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    8171                 :   }
    8172               0 :   return NULL;
    8173                 : }
    8174                 : 
    8175                 : 
    8176               1 : SWIGINTERN PyObject *_wrap_Driver_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8177               1 :   PyObject *resultobj = 0;
    8178               1 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8179               1 :   char *arg2 = (char *) 0 ;
    8180               1 :   char *arg3 = (char *) 0 ;
    8181               1 :   void *argp1 = 0 ;
    8182               1 :   int res1 = 0 ;
    8183                 :   int res2 ;
    8184               1 :   char *buf2 = 0 ;
    8185               1 :   int alloc2 = 0 ;
    8186                 :   int res3 ;
    8187               1 :   char *buf3 = 0 ;
    8188               1 :   int alloc3 = 0 ;
    8189               1 :   PyObject * obj0 = 0 ;
    8190               1 :   PyObject * obj1 = 0 ;
    8191               1 :   PyObject * obj2 = 0 ;
    8192                 :   int result;
    8193                 :   
    8194               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Driver_Rename",&obj0,&obj1,&obj2)) SWIG_fail;
    8195               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8196               1 :   if (!SWIG_IsOK(res1)) {
    8197               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Rename" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8198                 :   }
    8199               1 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8200               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    8201               1 :   if (!SWIG_IsOK(res2)) {
    8202               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_Rename" "', argument " "2"" of type '" "char const *""'");
    8203                 :   }
    8204               1 :   arg2 = reinterpret_cast< char * >(buf2);
    8205               1 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    8206               1 :   if (!SWIG_IsOK(res3)) {
    8207               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_Rename" "', argument " "3"" of type '" "char const *""'");
    8208                 :   }
    8209               1 :   arg3 = reinterpret_cast< char * >(buf3);
    8210                 :   {
    8211               1 :     if (!arg2) {
    8212               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8213                 :     }
    8214                 :   }
    8215                 :   {
    8216               1 :     if (!arg3) {
    8217               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8218                 :     }
    8219                 :   }
    8220                 :   {
    8221               1 :     if ( bUseExceptions ) {
    8222               0 :       CPLErrorReset();
    8223                 :     }
    8224               1 :     result = (int)GDALDriverShadow_Rename(arg1,(char const *)arg2,(char const *)arg3);
    8225               1 :     if ( bUseExceptions ) {
    8226               0 :       CPLErr eclass = CPLGetLastErrorType();
    8227               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8228               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8229                 :       }
    8230                 :     }
    8231                 :   }
    8232               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8233               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8234               1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8235               1 :   return resultobj;
    8236                 : fail:
    8237               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8238               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8239               0 :   return NULL;
    8240                 : }
    8241                 : 
    8242                 : 
    8243               1 : SWIGINTERN PyObject *_wrap_Driver_CopyFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8244               1 :   PyObject *resultobj = 0;
    8245               1 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8246               1 :   char *arg2 = (char *) 0 ;
    8247               1 :   char *arg3 = (char *) 0 ;
    8248               1 :   void *argp1 = 0 ;
    8249               1 :   int res1 = 0 ;
    8250                 :   int res2 ;
    8251               1 :   char *buf2 = 0 ;
    8252               1 :   int alloc2 = 0 ;
    8253                 :   int res3 ;
    8254               1 :   char *buf3 = 0 ;
    8255               1 :   int alloc3 = 0 ;
    8256               1 :   PyObject * obj0 = 0 ;
    8257               1 :   PyObject * obj1 = 0 ;
    8258               1 :   PyObject * obj2 = 0 ;
    8259                 :   int result;
    8260                 :   
    8261               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Driver_CopyFiles",&obj0,&obj1,&obj2)) SWIG_fail;
    8262               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8263               1 :   if (!SWIG_IsOK(res1)) {
    8264               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyFiles" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8265                 :   }
    8266               1 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8267               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    8268               1 :   if (!SWIG_IsOK(res2)) {
    8269               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_CopyFiles" "', argument " "2"" of type '" "char const *""'");
    8270                 :   }
    8271               1 :   arg2 = reinterpret_cast< char * >(buf2);
    8272               1 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    8273               1 :   if (!SWIG_IsOK(res3)) {
    8274               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CopyFiles" "', argument " "3"" of type '" "char const *""'");
    8275                 :   }
    8276               1 :   arg3 = reinterpret_cast< char * >(buf3);
    8277                 :   {
    8278               1 :     if (!arg2) {
    8279               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8280                 :     }
    8281                 :   }
    8282                 :   {
    8283               1 :     if (!arg3) {
    8284               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8285                 :     }
    8286                 :   }
    8287                 :   {
    8288               1 :     if ( bUseExceptions ) {
    8289               0 :       CPLErrorReset();
    8290                 :     }
    8291               1 :     result = (int)GDALDriverShadow_CopyFiles(arg1,(char const *)arg2,(char const *)arg3);
    8292               1 :     if ( bUseExceptions ) {
    8293               0 :       CPLErr eclass = CPLGetLastErrorType();
    8294               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8295               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8296                 :       }
    8297                 :     }
    8298                 :   }
    8299               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8300               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8301               1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8302               1 :   return resultobj;
    8303                 : fail:
    8304               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8305               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8306               0 :   return NULL;
    8307                 : }
    8308                 : 
    8309                 : 
    8310              75 : SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8311              75 :   PyObject *resultobj = 0;
    8312              75 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8313              75 :   void *argp1 = 0 ;
    8314              75 :   int res1 = 0 ;
    8315              75 :   PyObject * obj0 = 0 ;
    8316                 :   int result;
    8317                 :   
    8318              75 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_Register",&obj0)) SWIG_fail;
    8319              75 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8320              75 :   if (!SWIG_IsOK(res1)) {
    8321               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8322                 :   }
    8323              75 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8324                 :   {
    8325              75 :     if ( bUseExceptions ) {
    8326               0 :       CPLErrorReset();
    8327                 :     }
    8328              75 :     result = (int)GDALDriverShadow_Register(arg1);
    8329              75 :     if ( bUseExceptions ) {
    8330               0 :       CPLErr eclass = CPLGetLastErrorType();
    8331               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8332               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8333                 :       }
    8334                 :     }
    8335                 :   }
    8336              75 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8337              75 :   return resultobj;
    8338                 : fail:
    8339               0 :   return NULL;
    8340                 : }
    8341                 : 
    8342                 : 
    8343              72 : SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8344              72 :   PyObject *resultobj = 0;
    8345              72 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8346              72 :   void *argp1 = 0 ;
    8347              72 :   int res1 = 0 ;
    8348              72 :   PyObject * obj0 = 0 ;
    8349                 :   
    8350              72 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_Deregister",&obj0)) SWIG_fail;
    8351              72 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8352              72 :   if (!SWIG_IsOK(res1)) {
    8353               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8354                 :   }
    8355              72 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8356                 :   {
    8357              72 :     if ( bUseExceptions ) {
    8358               0 :       CPLErrorReset();
    8359                 :     }
    8360                 :     GDALDriverShadow_Deregister(arg1);
    8361              72 :     if ( bUseExceptions ) {
    8362               0 :       CPLErr eclass = CPLGetLastErrorType();
    8363               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8364               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8365                 :       }
    8366                 :     }
    8367                 :   }
    8368              72 :   resultobj = SWIG_Py_Void();
    8369              72 :   return resultobj;
    8370                 : fail:
    8371               0 :   return NULL;
    8372                 : }
    8373                 : 
    8374                 : 
    8375               6 : SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8376                 :   PyObject *obj;
    8377               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    8378               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDriverShadow, SWIG_NewClientData(obj));
    8379               6 :   return SWIG_Py_Void();
    8380                 : }
    8381                 : 
    8382               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8383               0 :   PyObject *resultobj = 0;
    8384               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8385                 :   short arg2 ;
    8386                 :   GDALColorEntry ce1 ;
    8387                 :   short val2 ;
    8388               0 :   int ecode2 = 0 ;
    8389               0 :   PyObject * obj0 = 0 ;
    8390               0 :   PyObject * obj1 = 0 ;
    8391                 :   
    8392               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c1_set",&obj0,&obj1)) SWIG_fail;
    8393                 :   {
    8394                 :     /* %typemap(in) GDALColorEntry* */
    8395               0 :     ce1.c4 = 255;
    8396               0 :     if (! PySequence_Check(obj0) ) {
    8397               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8398               0 :       SWIG_fail;
    8399                 :     }
    8400               0 :     int size = PySequence_Size(obj0);
    8401               0 :     if ( size > 4 ) {
    8402               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8403               0 :       SWIG_fail;
    8404                 :     }
    8405               0 :     if ( size < 3 ) {
    8406               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8407               0 :       SWIG_fail;
    8408                 :     }
    8409               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8410               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8411               0 :       SWIG_fail;
    8412                 :     }
    8413               0 :     arg1 = &ce1;
    8414                 :   }
    8415               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8416               0 :   if (!SWIG_IsOK(ecode2)) {
    8417               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c1_set" "', argument " "2"" of type '" "short""'");
    8418                 :   } 
    8419               0 :   arg2 = static_cast< short >(val2);
    8420               0 :   if (arg1) (arg1)->c1 = arg2;
    8421               0 :   resultobj = SWIG_Py_Void();
    8422               0 :   return resultobj;
    8423                 : fail:
    8424               0 :   return NULL;
    8425                 : }
    8426                 : 
    8427                 : 
    8428               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8429               0 :   PyObject *resultobj = 0;
    8430               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8431                 :   GDALColorEntry ce1 ;
    8432               0 :   PyObject * obj0 = 0 ;
    8433                 :   short result;
    8434                 :   
    8435               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c1_get",&obj0)) SWIG_fail;
    8436                 :   {
    8437                 :     /* %typemap(in) GDALColorEntry* */
    8438               0 :     ce1.c4 = 255;
    8439               0 :     if (! PySequence_Check(obj0) ) {
    8440               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8441               0 :       SWIG_fail;
    8442                 :     }
    8443               0 :     int size = PySequence_Size(obj0);
    8444               0 :     if ( size > 4 ) {
    8445               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8446               0 :       SWIG_fail;
    8447                 :     }
    8448               0 :     if ( size < 3 ) {
    8449               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8450               0 :       SWIG_fail;
    8451                 :     }
    8452               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8453               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8454               0 :       SWIG_fail;
    8455                 :     }
    8456               0 :     arg1 = &ce1;
    8457                 :   }
    8458               0 :   result = (short) ((arg1)->c1);
    8459               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8460               0 :   return resultobj;
    8461                 : fail:
    8462               0 :   return NULL;
    8463                 : }
    8464                 : 
    8465                 : 
    8466               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8467               0 :   PyObject *resultobj = 0;
    8468               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8469                 :   short arg2 ;
    8470                 :   GDALColorEntry ce1 ;
    8471                 :   short val2 ;
    8472               0 :   int ecode2 = 0 ;
    8473               0 :   PyObject * obj0 = 0 ;
    8474               0 :   PyObject * obj1 = 0 ;
    8475                 :   
    8476               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c2_set",&obj0,&obj1)) SWIG_fail;
    8477                 :   {
    8478                 :     /* %typemap(in) GDALColorEntry* */
    8479               0 :     ce1.c4 = 255;
    8480               0 :     if (! PySequence_Check(obj0) ) {
    8481               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8482               0 :       SWIG_fail;
    8483                 :     }
    8484               0 :     int size = PySequence_Size(obj0);
    8485               0 :     if ( size > 4 ) {
    8486               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8487               0 :       SWIG_fail;
    8488                 :     }
    8489               0 :     if ( size < 3 ) {
    8490               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8491               0 :       SWIG_fail;
    8492                 :     }
    8493               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8494               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8495               0 :       SWIG_fail;
    8496                 :     }
    8497               0 :     arg1 = &ce1;
    8498                 :   }
    8499               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8500               0 :   if (!SWIG_IsOK(ecode2)) {
    8501               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c2_set" "', argument " "2"" of type '" "short""'");
    8502                 :   } 
    8503               0 :   arg2 = static_cast< short >(val2);
    8504               0 :   if (arg1) (arg1)->c2 = arg2;
    8505               0 :   resultobj = SWIG_Py_Void();
    8506               0 :   return resultobj;
    8507                 : fail:
    8508               0 :   return NULL;
    8509                 : }
    8510                 : 
    8511                 : 
    8512               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8513               0 :   PyObject *resultobj = 0;
    8514               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8515                 :   GDALColorEntry ce1 ;
    8516               0 :   PyObject * obj0 = 0 ;
    8517                 :   short result;
    8518                 :   
    8519               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c2_get",&obj0)) SWIG_fail;
    8520                 :   {
    8521                 :     /* %typemap(in) GDALColorEntry* */
    8522               0 :     ce1.c4 = 255;
    8523               0 :     if (! PySequence_Check(obj0) ) {
    8524               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8525               0 :       SWIG_fail;
    8526                 :     }
    8527               0 :     int size = PySequence_Size(obj0);
    8528               0 :     if ( size > 4 ) {
    8529               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8530               0 :       SWIG_fail;
    8531                 :     }
    8532               0 :     if ( size < 3 ) {
    8533               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8534               0 :       SWIG_fail;
    8535                 :     }
    8536               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8537               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8538               0 :       SWIG_fail;
    8539                 :     }
    8540               0 :     arg1 = &ce1;
    8541                 :   }
    8542               0 :   result = (short) ((arg1)->c2);
    8543               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8544               0 :   return resultobj;
    8545                 : fail:
    8546               0 :   return NULL;
    8547                 : }
    8548                 : 
    8549                 : 
    8550               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8551               0 :   PyObject *resultobj = 0;
    8552               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8553                 :   short arg2 ;
    8554                 :   GDALColorEntry ce1 ;
    8555                 :   short val2 ;
    8556               0 :   int ecode2 = 0 ;
    8557               0 :   PyObject * obj0 = 0 ;
    8558               0 :   PyObject * obj1 = 0 ;
    8559                 :   
    8560               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c3_set",&obj0,&obj1)) SWIG_fail;
    8561                 :   {
    8562                 :     /* %typemap(in) GDALColorEntry* */
    8563               0 :     ce1.c4 = 255;
    8564               0 :     if (! PySequence_Check(obj0) ) {
    8565               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8566               0 :       SWIG_fail;
    8567                 :     }
    8568               0 :     int size = PySequence_Size(obj0);
    8569               0 :     if ( size > 4 ) {
    8570               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8571               0 :       SWIG_fail;
    8572                 :     }
    8573               0 :     if ( size < 3 ) {
    8574               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8575               0 :       SWIG_fail;
    8576                 :     }
    8577               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8578               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8579               0 :       SWIG_fail;
    8580                 :     }
    8581               0 :     arg1 = &ce1;
    8582                 :   }
    8583               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8584               0 :   if (!SWIG_IsOK(ecode2)) {
    8585               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c3_set" "', argument " "2"" of type '" "short""'");
    8586                 :   } 
    8587               0 :   arg2 = static_cast< short >(val2);
    8588               0 :   if (arg1) (arg1)->c3 = arg2;
    8589               0 :   resultobj = SWIG_Py_Void();
    8590               0 :   return resultobj;
    8591                 : fail:
    8592               0 :   return NULL;
    8593                 : }
    8594                 : 
    8595                 : 
    8596               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8597               0 :   PyObject *resultobj = 0;
    8598               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8599                 :   GDALColorEntry ce1 ;
    8600               0 :   PyObject * obj0 = 0 ;
    8601                 :   short result;
    8602                 :   
    8603               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c3_get",&obj0)) SWIG_fail;
    8604                 :   {
    8605                 :     /* %typemap(in) GDALColorEntry* */
    8606               0 :     ce1.c4 = 255;
    8607               0 :     if (! PySequence_Check(obj0) ) {
    8608               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8609               0 :       SWIG_fail;
    8610                 :     }
    8611               0 :     int size = PySequence_Size(obj0);
    8612               0 :     if ( size > 4 ) {
    8613               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8614               0 :       SWIG_fail;
    8615                 :     }
    8616               0 :     if ( size < 3 ) {
    8617               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8618               0 :       SWIG_fail;
    8619                 :     }
    8620               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8621               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8622               0 :       SWIG_fail;
    8623                 :     }
    8624               0 :     arg1 = &ce1;
    8625                 :   }
    8626               0 :   result = (short) ((arg1)->c3);
    8627               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8628               0 :   return resultobj;
    8629                 : fail:
    8630               0 :   return NULL;
    8631                 : }
    8632                 : 
    8633                 : 
    8634               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8635               0 :   PyObject *resultobj = 0;
    8636               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8637                 :   short arg2 ;
    8638                 :   GDALColorEntry ce1 ;
    8639                 :   short val2 ;
    8640               0 :   int ecode2 = 0 ;
    8641               0 :   PyObject * obj0 = 0 ;
    8642               0 :   PyObject * obj1 = 0 ;
    8643                 :   
    8644               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c4_set",&obj0,&obj1)) SWIG_fail;
    8645                 :   {
    8646                 :     /* %typemap(in) GDALColorEntry* */
    8647               0 :     ce1.c4 = 255;
    8648               0 :     if (! PySequence_Check(obj0) ) {
    8649               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8650               0 :       SWIG_fail;
    8651                 :     }
    8652               0 :     int size = PySequence_Size(obj0);
    8653               0 :     if ( size > 4 ) {
    8654               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8655               0 :       SWIG_fail;
    8656                 :     }
    8657               0 :     if ( size < 3 ) {
    8658               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8659               0 :       SWIG_fail;
    8660                 :     }
    8661               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8662               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8663               0 :       SWIG_fail;
    8664                 :     }
    8665               0 :     arg1 = &ce1;
    8666                 :   }
    8667               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8668               0 :   if (!SWIG_IsOK(ecode2)) {
    8669               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c4_set" "', argument " "2"" of type '" "short""'");
    8670                 :   } 
    8671               0 :   arg2 = static_cast< short >(val2);
    8672               0 :   if (arg1) (arg1)->c4 = arg2;
    8673               0 :   resultobj = SWIG_Py_Void();
    8674               0 :   return resultobj;
    8675                 : fail:
    8676               0 :   return NULL;
    8677                 : }
    8678                 : 
    8679                 : 
    8680               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8681               0 :   PyObject *resultobj = 0;
    8682               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8683                 :   GDALColorEntry ce1 ;
    8684               0 :   PyObject * obj0 = 0 ;
    8685                 :   short result;
    8686                 :   
    8687               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c4_get",&obj0)) SWIG_fail;
    8688                 :   {
    8689                 :     /* %typemap(in) GDALColorEntry* */
    8690               0 :     ce1.c4 = 255;
    8691               0 :     if (! PySequence_Check(obj0) ) {
    8692               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8693               0 :       SWIG_fail;
    8694                 :     }
    8695               0 :     int size = PySequence_Size(obj0);
    8696               0 :     if ( size > 4 ) {
    8697               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8698               0 :       SWIG_fail;
    8699                 :     }
    8700               0 :     if ( size < 3 ) {
    8701               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8702               0 :       SWIG_fail;
    8703                 :     }
    8704               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8705               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8706               0 :       SWIG_fail;
    8707                 :     }
    8708               0 :     arg1 = &ce1;
    8709                 :   }
    8710               0 :   result = (short) ((arg1)->c4);
    8711               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8712               0 :   return resultobj;
    8713                 : fail:
    8714               0 :   return NULL;
    8715                 : }
    8716                 : 
    8717                 : 
    8718               0 : SWIGINTERN PyObject *_wrap_new_ColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8719               0 :   PyObject *resultobj = 0;
    8720               0 :   GDALColorEntry *result = 0 ;
    8721                 :   
    8722               0 :   if (!PyArg_ParseTuple(args,(char *)":new_ColorEntry")) SWIG_fail;
    8723                 :   {
    8724               0 :     if ( bUseExceptions ) {
    8725               0 :       CPLErrorReset();
    8726                 :     }
    8727               0 :     result = (GDALColorEntry *)new GDALColorEntry();
    8728               0 :     if ( bUseExceptions ) {
    8729               0 :       CPLErr eclass = CPLGetLastErrorType();
    8730               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8731               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8732                 :       }
    8733                 :     }
    8734                 :   }
    8735                 :   {
    8736                 :     /* %typemap(out) GDALColorEntry* */
    8737               0 :     if ( result != NULL )
    8738               0 :     resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
    8739                 :     else
    8740               0 :     resultobj = NULL;
    8741                 :   }
    8742               0 :   return resultobj;
    8743                 : fail:
    8744               0 :   return NULL;
    8745                 : }
    8746                 : 
    8747                 : 
    8748               0 : SWIGINTERN PyObject *_wrap_delete_ColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8749               0 :   PyObject *resultobj = 0;
    8750               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8751                 :   GDALColorEntry ce1 ;
    8752               0 :   PyObject * obj0 = 0 ;
    8753                 :   
    8754               0 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_ColorEntry",&obj0)) SWIG_fail;
    8755                 :   {
    8756                 :     /* %typemap(in) GDALColorEntry* */
    8757               0 :     ce1.c4 = 255;
    8758               0 :     if (! PySequence_Check(obj0) ) {
    8759               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8760               0 :       SWIG_fail;
    8761                 :     }
    8762               0 :     int size = PySequence_Size(obj0);
    8763               0 :     if ( size > 4 ) {
    8764               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8765               0 :       SWIG_fail;
    8766                 :     }
    8767               0 :     if ( size < 3 ) {
    8768               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8769               0 :       SWIG_fail;
    8770                 :     }
    8771               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8772               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8773               0 :       SWIG_fail;
    8774                 :     }
    8775               0 :     arg1 = &ce1;
    8776                 :   }
    8777                 :   {
    8778               0 :     if ( bUseExceptions ) {
    8779               0 :       CPLErrorReset();
    8780                 :     }
    8781               0 :     delete arg1;
    8782               0 :     if ( bUseExceptions ) {
    8783               0 :       CPLErr eclass = CPLGetLastErrorType();
    8784               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8785               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8786                 :       }
    8787                 :     }
    8788                 :   }
    8789               0 :   resultobj = SWIG_Py_Void();
    8790               0 :   return resultobj;
    8791                 : fail:
    8792               0 :   return NULL;
    8793                 : }
    8794                 : 
    8795                 : 
    8796               6 : SWIGINTERN PyObject *ColorEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8797                 :   PyObject *obj;
    8798               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    8799               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorEntry, SWIG_NewClientData(obj));
    8800               6 :   return SWIG_Py_Void();
    8801                 : }
    8802                 : 
    8803               8 : SWIGINTERN PyObject *_wrap_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8804               8 :   PyObject *resultobj = 0;
    8805               8 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8806                 :   double arg2 ;
    8807               8 :   void *argp1 = 0 ;
    8808               8 :   int res1 = 0 ;
    8809                 :   double val2 ;
    8810               8 :   int ecode2 = 0 ;
    8811               8 :   PyObject * obj0 = 0 ;
    8812               8 :   PyObject * obj1 = 0 ;
    8813                 :   
    8814               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPX_set",&obj0,&obj1)) SWIG_fail;
    8815               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8816               8 :   if (!SWIG_IsOK(res1)) {
    8817               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8818                 :   }
    8819               8 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8820               8 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    8821               8 :   if (!SWIG_IsOK(ecode2)) {
    8822               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
    8823                 :   } 
    8824               8 :   arg2 = static_cast< double >(val2);
    8825                 :   {
    8826               8 :     if ( bUseExceptions ) {
    8827               0 :       CPLErrorReset();
    8828                 :     }
    8829               8 :     GDAL_GCP_GCPX_set(arg1,arg2);
    8830               8 :     if ( bUseExceptions ) {
    8831               0 :       CPLErr eclass = CPLGetLastErrorType();
    8832               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8833               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8834                 :       }
    8835                 :     }
    8836                 :   }
    8837               8 :   resultobj = SWIG_Py_Void();
    8838               8 :   return resultobj;
    8839                 : fail:
    8840               0 :   return NULL;
    8841                 : }
    8842                 : 
    8843                 : 
    8844            2773 : SWIGINTERN PyObject *_wrap_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8845            2773 :   PyObject *resultobj = 0;
    8846            2773 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8847            2773 :   void *argp1 = 0 ;
    8848            2773 :   int res1 = 0 ;
    8849            2773 :   PyObject * obj0 = 0 ;
    8850                 :   double result;
    8851                 :   
    8852            2773 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPX_get",&obj0)) SWIG_fail;
    8853            2773 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8854            2773 :   if (!SWIG_IsOK(res1)) {
    8855               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8856                 :   }
    8857            2773 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8858                 :   {
    8859            2773 :     if ( bUseExceptions ) {
    8860               0 :       CPLErrorReset();
    8861                 :     }
    8862            2773 :     result = (double)GDAL_GCP_GCPX_get(arg1);
    8863            2773 :     if ( bUseExceptions ) {
    8864               0 :       CPLErr eclass = CPLGetLastErrorType();
    8865               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8866               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8867                 :       }
    8868                 :     }
    8869                 :   }
    8870            2773 :   resultobj = SWIG_From_double(static_cast< double >(result));
    8871            2773 :   return resultobj;
    8872                 : fail:
    8873               0 :   return NULL;
    8874                 : }
    8875                 : 
    8876                 : 
    8877               8 : SWIGINTERN PyObject *_wrap_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8878               8 :   PyObject *resultobj = 0;
    8879               8 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8880                 :   double arg2 ;
    8881               8 :   void *argp1 = 0 ;
    8882               8 :   int res1 = 0 ;
    8883                 :   double val2 ;
    8884               8 :   int ecode2 = 0 ;
    8885               8 :   PyObject * obj0 = 0 ;
    8886               8 :   PyObject * obj1 = 0 ;
    8887                 :   
    8888               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPY_set",&obj0,&obj1)) SWIG_fail;
    8889               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8890               8 :   if (!SWIG_IsOK(res1)) {
    8891               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8892                 :   }
    8893               8 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8894               8 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    8895               8 :   if (!SWIG_IsOK(ecode2)) {
    8896               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
    8897                 :   } 
    8898               8 :   arg2 = static_cast< double >(val2);
    8899                 :   {
    8900               8 :     if ( bUseExceptions ) {
    8901               0 :       CPLErrorReset();
    8902                 :     }
    8903               8 :     GDAL_GCP_GCPY_set(arg1,arg2);
    8904               8 :     if ( bUseExceptions ) {
    8905               0 :       CPLErr eclass = CPLGetLastErrorType();
    8906               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8907               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8908                 :       }
    8909                 :     }
    8910                 :   }
    8911               8 :   resultobj = SWIG_Py_Void();
    8912               8 :   return resultobj;
    8913                 : fail:
    8914               0 :   return NULL;
    8915                 : }
    8916                 : 
    8917                 : 
    8918            2773 : SWIGINTERN PyObject *_wrap_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8919            2773 :   PyObject *resultobj = 0;
    8920            2773 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8921            2773 :   void *argp1 = 0 ;
    8922            2773 :   int res1 = 0 ;
    8923            2773 :   PyObject * obj0 = 0 ;
    8924                 :   double result;
    8925                 :   
    8926            2773 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPY_get",&obj0)) SWIG_fail;
    8927            2773 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8928            2773 :   if (!SWIG_IsOK(res1)) {
    8929               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8930                 :   }
    8931            2773 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8932                 :   {
    8933            2773 :     if ( bUseExceptions ) {
    8934               0 :       CPLErrorReset();
    8935                 :     }
    8936            2773 :     result = (double)GDAL_GCP_GCPY_get(arg1);
    8937            2773 :     if ( bUseExceptions ) {
    8938               0 :       CPLErr eclass = CPLGetLastErrorType();
    8939               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8940               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8941                 :       }
    8942                 :     }
    8943                 :   }
    8944            2773 :   resultobj = SWIG_From_double(static_cast< double >(result));
    8945            2773 :   return resultobj;
    8946                 : fail:
    8947               0 :   return NULL;
    8948                 : }
    8949                 : 
    8950                 : 
    8951               0 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8952               0 :   PyObject *resultobj = 0;
    8953               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8954                 :   double arg2 ;
    8955               0 :   void *argp1 = 0 ;
    8956               0 :   int res1 = 0 ;
    8957                 :   double val2 ;
    8958               0 :   int ecode2 = 0 ;
    8959               0 :   PyObject * obj0 = 0 ;
    8960               0 :   PyObject * obj1 = 0 ;
    8961                 :   
    8962               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPZ_set",&obj0,&obj1)) SWIG_fail;
    8963               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8964               0 :   if (!SWIG_IsOK(res1)) {
    8965               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8966                 :   }
    8967               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8968               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    8969               0 :   if (!SWIG_IsOK(ecode2)) {
    8970               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
    8971                 :   } 
    8972               0 :   arg2 = static_cast< double >(val2);
    8973                 :   {
    8974               0 :     if ( bUseExceptions ) {
    8975               0 :       CPLErrorReset();
    8976                 :     }
    8977               0 :     GDAL_GCP_GCPZ_set(arg1,arg2);
    8978               0 :     if ( bUseExceptions ) {
    8979               0 :       CPLErr eclass = CPLGetLastErrorType();
    8980               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8981               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8982                 :       }
    8983                 :     }
    8984                 :   }
    8985               0 :   resultobj = SWIG_Py_Void();
    8986               0 :   return resultobj;
    8987                 : fail:
    8988               0 :   return NULL;
    8989                 : }
    8990                 : 
    8991                 : 
    8992            2748 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8993            2748 :   PyObject *resultobj = 0;
    8994            2748 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8995            2748 :   void *argp1 = 0 ;
    8996            2748 :   int res1 = 0 ;
    8997            2748 :   PyObject * obj0 = 0 ;
    8998                 :   double result;
    8999                 :   
    9000            2748 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPZ_get",&obj0)) SWIG_fail;
    9001            2748 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9002            2748 :   if (!SWIG_IsOK(res1)) {
    9003               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9004                 :   }
    9005            2748 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9006                 :   {
    9007            2748 :     if ( bUseExceptions ) {
    9008               0 :       CPLErrorReset();
    9009                 :     }
    9010            2748 :     result = (double)GDAL_GCP_GCPZ_get(arg1);
    9011            2748 :     if ( bUseExceptions ) {
    9012               0 :       CPLErr eclass = CPLGetLastErrorType();
    9013               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9014               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9015                 :       }
    9016                 :     }
    9017                 :   }
    9018            2748 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9019            2748 :   return resultobj;
    9020                 : fail:
    9021               0 :   return NULL;
    9022                 : }
    9023                 : 
    9024                 : 
    9025              16 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9026              16 :   PyObject *resultobj = 0;
    9027              16 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9028                 :   double arg2 ;
    9029              16 :   void *argp1 = 0 ;
    9030              16 :   int res1 = 0 ;
    9031                 :   double val2 ;
    9032              16 :   int ecode2 = 0 ;
    9033              16 :   PyObject * obj0 = 0 ;
    9034              16 :   PyObject * obj1 = 0 ;
    9035                 :   
    9036              16 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPPixel_set",&obj0,&obj1)) SWIG_fail;
    9037              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9038              16 :   if (!SWIG_IsOK(res1)) {
    9039               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9040                 :   }
    9041              16 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9042              16 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9043              16 :   if (!SWIG_IsOK(ecode2)) {
    9044               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
    9045                 :   } 
    9046              16 :   arg2 = static_cast< double >(val2);
    9047                 :   {
    9048              16 :     if ( bUseExceptions ) {
    9049               0 :       CPLErrorReset();
    9050                 :     }
    9051              16 :     GDAL_GCP_GCPPixel_set(arg1,arg2);
    9052              16 :     if ( bUseExceptions ) {
    9053               0 :       CPLErr eclass = CPLGetLastErrorType();
    9054               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9055               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9056                 :       }
    9057                 :     }
    9058                 :   }
    9059              16 :   resultobj = SWIG_Py_Void();
    9060              16 :   return resultobj;
    9061                 : fail:
    9062               0 :   return NULL;
    9063                 : }
    9064                 : 
    9065                 : 
    9066            2781 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9067            2781 :   PyObject *resultobj = 0;
    9068            2781 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9069            2781 :   void *argp1 = 0 ;
    9070            2781 :   int res1 = 0 ;
    9071            2781 :   PyObject * obj0 = 0 ;
    9072                 :   double result;
    9073                 :   
    9074            2781 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPPixel_get",&obj0)) SWIG_fail;
    9075            2781 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9076            2781 :   if (!SWIG_IsOK(res1)) {
    9077               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9078                 :   }
    9079            2781 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9080                 :   {
    9081            2781 :     if ( bUseExceptions ) {
    9082               0 :       CPLErrorReset();
    9083                 :     }
    9084            2781 :     result = (double)GDAL_GCP_GCPPixel_get(arg1);
    9085            2781 :     if ( bUseExceptions ) {
    9086               0 :       CPLErr eclass = CPLGetLastErrorType();
    9087               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9088               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9089                 :       }
    9090                 :     }
    9091                 :   }
    9092            2781 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9093            2781 :   return resultobj;
    9094                 : fail:
    9095               0 :   return NULL;
    9096                 : }
    9097                 : 
    9098                 : 
    9099              16 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9100              16 :   PyObject *resultobj = 0;
    9101              16 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9102                 :   double arg2 ;
    9103              16 :   void *argp1 = 0 ;
    9104              16 :   int res1 = 0 ;
    9105                 :   double val2 ;
    9106              16 :   int ecode2 = 0 ;
    9107              16 :   PyObject * obj0 = 0 ;
    9108              16 :   PyObject * obj1 = 0 ;
    9109                 :   
    9110              16 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPLine_set",&obj0,&obj1)) SWIG_fail;
    9111              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9112              16 :   if (!SWIG_IsOK(res1)) {
    9113               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9114                 :   }
    9115              16 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9116              16 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9117              16 :   if (!SWIG_IsOK(ecode2)) {
    9118               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
    9119                 :   } 
    9120              16 :   arg2 = static_cast< double >(val2);
    9121                 :   {
    9122              16 :     if ( bUseExceptions ) {
    9123               0 :       CPLErrorReset();
    9124                 :     }
    9125              16 :     GDAL_GCP_GCPLine_set(arg1,arg2);
    9126              16 :     if ( bUseExceptions ) {
    9127               0 :       CPLErr eclass = CPLGetLastErrorType();
    9128               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9129               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9130                 :       }
    9131                 :     }
    9132                 :   }
    9133              16 :   resultobj = SWIG_Py_Void();
    9134              16 :   return resultobj;
    9135                 : fail:
    9136               0 :   return NULL;
    9137                 : }
    9138                 : 
    9139                 : 
    9140            2781 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9141            2781 :   PyObject *resultobj = 0;
    9142            2781 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9143            2781 :   void *argp1 = 0 ;
    9144            2781 :   int res1 = 0 ;
    9145            2781 :   PyObject * obj0 = 0 ;
    9146                 :   double result;
    9147                 :   
    9148            2781 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPLine_get",&obj0)) SWIG_fail;
    9149            2781 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9150            2781 :   if (!SWIG_IsOK(res1)) {
    9151               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9152                 :   }
    9153            2781 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9154                 :   {
    9155            2781 :     if ( bUseExceptions ) {
    9156               0 :       CPLErrorReset();
    9157                 :     }
    9158            2781 :     result = (double)GDAL_GCP_GCPLine_get(arg1);
    9159            2781 :     if ( bUseExceptions ) {
    9160               0 :       CPLErr eclass = CPLGetLastErrorType();
    9161               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9162               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9163                 :       }
    9164                 :     }
    9165                 :   }
    9166            2781 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9167            2781 :   return resultobj;
    9168                 : fail:
    9169               0 :   return NULL;
    9170                 : }
    9171                 : 
    9172                 : 
    9173               0 : SWIGINTERN PyObject *_wrap_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9174               0 :   PyObject *resultobj = 0;
    9175               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9176               0 :   char *arg2 = (char *) 0 ;
    9177               0 :   void *argp1 = 0 ;
    9178               0 :   int res1 = 0 ;
    9179                 :   int res2 ;
    9180               0 :   char *buf2 = 0 ;
    9181               0 :   int alloc2 = 0 ;
    9182               0 :   PyObject * obj0 = 0 ;
    9183               0 :   PyObject * obj1 = 0 ;
    9184                 :   
    9185               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_Info_set",&obj0,&obj1)) SWIG_fail;
    9186               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9187               0 :   if (!SWIG_IsOK(res1)) {
    9188               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9189                 :   }
    9190               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9191               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9192               0 :   if (!SWIG_IsOK(res2)) {
    9193               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Info_set" "', argument " "2"" of type '" "char *""'");
    9194                 :   }
    9195               0 :   arg2 = reinterpret_cast< char * >(buf2);
    9196                 :   {
    9197               0 :     if ( bUseExceptions ) {
    9198               0 :       CPLErrorReset();
    9199                 :     }
    9200                 :     
    9201                 :     /* char* Info memberin typemap */
    9202               0 :     GDAL_GCP_Info_set(arg1,arg2);
    9203                 :     
    9204               0 :     if ( bUseExceptions ) {
    9205               0 :       CPLErr eclass = CPLGetLastErrorType();
    9206               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9207               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9208                 :       }
    9209                 :     }
    9210                 :   }
    9211               0 :   resultobj = SWIG_Py_Void();
    9212               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9213               0 :   return resultobj;
    9214                 : fail:
    9215               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9216               0 :   return NULL;
    9217                 : }
    9218                 : 
    9219                 : 
    9220               4 : SWIGINTERN PyObject *_wrap_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9221               4 :   PyObject *resultobj = 0;
    9222               4 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9223               4 :   void *argp1 = 0 ;
    9224               4 :   int res1 = 0 ;
    9225               4 :   PyObject * obj0 = 0 ;
    9226               4 :   char *result = 0 ;
    9227                 :   
    9228               4 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_Info_get",&obj0)) SWIG_fail;
    9229               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9230               4 :   if (!SWIG_IsOK(res1)) {
    9231               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9232                 :   }
    9233               4 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9234                 :   {
    9235               4 :     if ( bUseExceptions ) {
    9236               0 :       CPLErrorReset();
    9237                 :     }
    9238               4 :     result = (char *)GDAL_GCP_Info_get(arg1);
    9239               4 :     if ( bUseExceptions ) {
    9240               0 :       CPLErr eclass = CPLGetLastErrorType();
    9241               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9242               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9243                 :       }
    9244                 :     }
    9245                 :   }
    9246               4 :   resultobj = SWIG_FromCharPtr((const char *)result);
    9247               4 :   return resultobj;
    9248                 : fail:
    9249               0 :   return NULL;
    9250                 : }
    9251                 : 
    9252                 : 
    9253               0 : SWIGINTERN PyObject *_wrap_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9254               0 :   PyObject *resultobj = 0;
    9255               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9256               0 :   char *arg2 = (char *) 0 ;
    9257               0 :   void *argp1 = 0 ;
    9258               0 :   int res1 = 0 ;
    9259                 :   int res2 ;
    9260               0 :   char *buf2 = 0 ;
    9261               0 :   int alloc2 = 0 ;
    9262               0 :   PyObject * obj0 = 0 ;
    9263               0 :   PyObject * obj1 = 0 ;
    9264                 :   
    9265               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_Id_set",&obj0,&obj1)) SWIG_fail;
    9266               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9267               0 :   if (!SWIG_IsOK(res1)) {
    9268               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9269                 :   }
    9270               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9271               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9272               0 :   if (!SWIG_IsOK(res2)) {
    9273               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Id_set" "', argument " "2"" of type '" "char *""'");
    9274                 :   }
    9275               0 :   arg2 = reinterpret_cast< char * >(buf2);
    9276                 :   {
    9277               0 :     if ( bUseExceptions ) {
    9278               0 :       CPLErrorReset();
    9279                 :     }
    9280                 :     
    9281                 :     /* char* Info memberin typemap */
    9282               0 :     GDAL_GCP_Id_set(arg1,arg2);
    9283                 :     
    9284               0 :     if ( bUseExceptions ) {
    9285               0 :       CPLErr eclass = CPLGetLastErrorType();
    9286               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9287               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9288                 :       }
    9289                 :     }
    9290                 :   }
    9291               0 :   resultobj = SWIG_Py_Void();
    9292               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9293               0 :   return resultobj;
    9294                 : fail:
    9295               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9296               0 :   return NULL;
    9297                 : }
    9298                 : 
    9299                 : 
    9300               4 : SWIGINTERN PyObject *_wrap_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9301               4 :   PyObject *resultobj = 0;
    9302               4 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9303               4 :   void *argp1 = 0 ;
    9304               4 :   int res1 = 0 ;
    9305               4 :   PyObject * obj0 = 0 ;
    9306               4 :   char *result = 0 ;
    9307                 :   
    9308               4 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_Id_get",&obj0)) SWIG_fail;
    9309               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9310               4 :   if (!SWIG_IsOK(res1)) {
    9311               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9312                 :   }
    9313               4 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9314                 :   {
    9315               4 :     if ( bUseExceptions ) {
    9316               0 :       CPLErrorReset();
    9317                 :     }
    9318               4 :     result = (char *)GDAL_GCP_Id_get(arg1);
    9319               4 :     if ( bUseExceptions ) {
    9320               0 :       CPLErr eclass = CPLGetLastErrorType();
    9321               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9322               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9323                 :       }
    9324                 :     }
    9325                 :   }
    9326               4 :   resultobj = SWIG_FromCharPtr((const char *)result);
    9327               4 :   return resultobj;
    9328                 : fail:
    9329               0 :   return NULL;
    9330                 : }
    9331                 : 
    9332                 : 
    9333               9 : SWIGINTERN PyObject *_wrap_new_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9334               9 :   PyObject *resultobj = 0;
    9335               9 :   double arg1 = (double) 0.0 ;
    9336               9 :   double arg2 = (double) 0.0 ;
    9337               9 :   double arg3 = (double) 0.0 ;
    9338               9 :   double arg4 = (double) 0.0 ;
    9339               9 :   double arg5 = (double) 0.0 ;
    9340               9 :   char *arg6 = (char *) "" ;
    9341               9 :   char *arg7 = (char *) "" ;
    9342                 :   double val1 ;
    9343               9 :   int ecode1 = 0 ;
    9344                 :   double val2 ;
    9345               9 :   int ecode2 = 0 ;
    9346                 :   double val3 ;
    9347               9 :   int ecode3 = 0 ;
    9348                 :   double val4 ;
    9349               9 :   int ecode4 = 0 ;
    9350                 :   double val5 ;
    9351               9 :   int ecode5 = 0 ;
    9352                 :   int res6 ;
    9353               9 :   char *buf6 = 0 ;
    9354               9 :   int alloc6 = 0 ;
    9355                 :   int res7 ;
    9356               9 :   char *buf7 = 0 ;
    9357               9 :   int alloc7 = 0 ;
    9358               9 :   PyObject * obj0 = 0 ;
    9359               9 :   PyObject * obj1 = 0 ;
    9360               9 :   PyObject * obj2 = 0 ;
    9361               9 :   PyObject * obj3 = 0 ;
    9362               9 :   PyObject * obj4 = 0 ;
    9363               9 :   PyObject * obj5 = 0 ;
    9364               9 :   PyObject * obj6 = 0 ;
    9365               9 :   GDAL_GCP *result = 0 ;
    9366                 :   
    9367               9 :   if (!PyArg_ParseTuple(args,(char *)"|OOOOOOO:new_GCP",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
    9368               9 :   if (obj0) {
    9369               1 :     ecode1 = SWIG_AsVal_double(obj0, &val1);
    9370               1 :     if (!SWIG_IsOK(ecode1)) {
    9371               0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GCP" "', argument " "1"" of type '" "double""'");
    9372                 :     } 
    9373               1 :     arg1 = static_cast< double >(val1);
    9374                 :   }
    9375               9 :   if (obj1) {
    9376               1 :     ecode2 = SWIG_AsVal_double(obj1, &val2);
    9377               1 :     if (!SWIG_IsOK(ecode2)) {
    9378               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GCP" "', argument " "2"" of type '" "double""'");
    9379                 :     } 
    9380               1 :     arg2 = static_cast< double >(val2);
    9381                 :   }
    9382               9 :   if (obj2) {
    9383               1 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
    9384               1 :     if (!SWIG_IsOK(ecode3)) {
    9385               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GCP" "', argument " "3"" of type '" "double""'");
    9386                 :     } 
    9387               1 :     arg3 = static_cast< double >(val3);
    9388                 :   }
    9389               9 :   if (obj3) {
    9390               1 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
    9391               1 :     if (!SWIG_IsOK(ecode4)) {
    9392               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GCP" "', argument " "4"" of type '" "double""'");
    9393                 :     } 
    9394               1 :     arg4 = static_cast< double >(val4);
    9395                 :   }
    9396               9 :   if (obj4) {
    9397               1 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
    9398               1 :     if (!SWIG_IsOK(ecode5)) {
    9399               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GCP" "', argument " "5"" of type '" "double""'");
    9400                 :     } 
    9401               1 :     arg5 = static_cast< double >(val5);
    9402                 :   }
    9403               9 :   if (obj5) {
    9404               0 :     res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
    9405               0 :     if (!SWIG_IsOK(res6)) {
    9406               0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_GCP" "', argument " "6"" of type '" "char const *""'");
    9407                 :     }
    9408               0 :     arg6 = reinterpret_cast< char * >(buf6);
    9409                 :   }
    9410               9 :   if (obj6) {
    9411               0 :     res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
    9412               0 :     if (!SWIG_IsOK(res7)) {
    9413               0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_GCP" "', argument " "7"" of type '" "char const *""'");
    9414                 :     }
    9415               0 :     arg7 = reinterpret_cast< char * >(buf7);
    9416                 :   }
    9417                 :   {
    9418               9 :     if ( bUseExceptions ) {
    9419               0 :       CPLErrorReset();
    9420                 :     }
    9421               9 :     result = (GDAL_GCP *)new_GDAL_GCP(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7);
    9422               9 :     if ( bUseExceptions ) {
    9423               0 :       CPLErr eclass = CPLGetLastErrorType();
    9424               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9425               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9426                 :       }
    9427                 :     }
    9428                 :   }
    9429               9 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_NEW |  0 );
    9430               9 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
    9431               9 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
    9432               9 :   return resultobj;
    9433                 : fail:
    9434               0 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
    9435               0 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
    9436               0 :   return NULL;
    9437                 : }
    9438                 : 
    9439                 : 
    9440            5555 : SWIGINTERN PyObject *_wrap_delete_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9441            5555 :   PyObject *resultobj = 0;
    9442            5555 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9443            5555 :   void *argp1 = 0 ;
    9444            5555 :   int res1 = 0 ;
    9445            5555 :   PyObject * obj0 = 0 ;
    9446                 :   
    9447            5555 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_GCP",&obj0)) SWIG_fail;
    9448            5555 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_DISOWN |  0 );
    9449            5555 :   if (!SWIG_IsOK(res1)) {
    9450               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GCP" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9451                 :   }
    9452            5555 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9453                 :   {
    9454            5555 :     if ( bUseExceptions ) {
    9455               0 :       CPLErrorReset();
    9456                 :     }
    9457                 :     delete_GDAL_GCP(arg1);
    9458            5555 :     if ( bUseExceptions ) {
    9459               0 :       CPLErr eclass = CPLGetLastErrorType();
    9460               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9461               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9462                 :       }
    9463                 :     }
    9464                 :   }
    9465            5555 :   resultobj = SWIG_Py_Void();
    9466            5555 :   return resultobj;
    9467                 : fail:
    9468               0 :   return NULL;
    9469                 : }
    9470                 : 
    9471                 : 
    9472               6 : SWIGINTERN PyObject *GCP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9473                 :   PyObject *obj;
    9474               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    9475               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDAL_GCP, SWIG_NewClientData(obj));
    9476               6 :   return SWIG_Py_Void();
    9477                 : }
    9478                 : 
    9479               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9480               0 :   PyObject *resultobj = 0;
    9481               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9482               0 :   void *argp1 = 0 ;
    9483               0 :   int res1 = 0 ;
    9484               0 :   PyObject * obj0 = 0 ;
    9485                 :   double result;
    9486                 :   
    9487               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPX_get",&obj0)) SWIG_fail;
    9488               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9489               0 :   if (!SWIG_IsOK(res1)) {
    9490               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9491                 :   }
    9492               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9493                 :   {
    9494               0 :     if (!arg1) {
    9495               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9496                 :     }
    9497                 :   }
    9498                 :   {
    9499               0 :     if ( bUseExceptions ) {
    9500               0 :       CPLErrorReset();
    9501                 :     }
    9502               0 :     result = (double)GDAL_GCP_GCPX_get(arg1);
    9503               0 :     if ( bUseExceptions ) {
    9504               0 :       CPLErr eclass = CPLGetLastErrorType();
    9505               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9506               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9507                 :       }
    9508                 :     }
    9509                 :   }
    9510               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9511               0 :   return resultobj;
    9512                 : fail:
    9513               0 :   return NULL;
    9514                 : }
    9515                 : 
    9516                 : 
    9517               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9518               0 :   PyObject *resultobj = 0;
    9519               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9520                 :   double arg2 ;
    9521               0 :   void *argp1 = 0 ;
    9522               0 :   int res1 = 0 ;
    9523                 :   double val2 ;
    9524               0 :   int ecode2 = 0 ;
    9525               0 :   PyObject * obj0 = 0 ;
    9526               0 :   PyObject * obj1 = 0 ;
    9527                 :   
    9528               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPX_set",&obj0,&obj1)) SWIG_fail;
    9529               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9530               0 :   if (!SWIG_IsOK(res1)) {
    9531               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9532                 :   }
    9533               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9534               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9535               0 :   if (!SWIG_IsOK(ecode2)) {
    9536               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
    9537                 :   } 
    9538               0 :   arg2 = static_cast< double >(val2);
    9539                 :   {
    9540               0 :     if (!arg1) {
    9541               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9542                 :     }
    9543                 :   }
    9544                 :   {
    9545               0 :     if ( bUseExceptions ) {
    9546               0 :       CPLErrorReset();
    9547                 :     }
    9548               0 :     GDAL_GCP_GCPX_set(arg1,arg2);
    9549               0 :     if ( bUseExceptions ) {
    9550               0 :       CPLErr eclass = CPLGetLastErrorType();
    9551               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9552               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9553                 :       }
    9554                 :     }
    9555                 :   }
    9556               0 :   resultobj = SWIG_Py_Void();
    9557               0 :   return resultobj;
    9558                 : fail:
    9559               0 :   return NULL;
    9560                 : }
    9561                 : 
    9562                 : 
    9563               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9564               0 :   PyObject *resultobj = 0;
    9565               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9566               0 :   void *argp1 = 0 ;
    9567               0 :   int res1 = 0 ;
    9568               0 :   PyObject * obj0 = 0 ;
    9569                 :   double result;
    9570                 :   
    9571               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPY_get",&obj0)) SWIG_fail;
    9572               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9573               0 :   if (!SWIG_IsOK(res1)) {
    9574               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9575                 :   }
    9576               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9577                 :   {
    9578               0 :     if (!arg1) {
    9579               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9580                 :     }
    9581                 :   }
    9582                 :   {
    9583               0 :     if ( bUseExceptions ) {
    9584               0 :       CPLErrorReset();
    9585                 :     }
    9586               0 :     result = (double)GDAL_GCP_GCPY_get(arg1);
    9587               0 :     if ( bUseExceptions ) {
    9588               0 :       CPLErr eclass = CPLGetLastErrorType();
    9589               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9590               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9591                 :       }
    9592                 :     }
    9593                 :   }
    9594               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9595               0 :   return resultobj;
    9596                 : fail:
    9597               0 :   return NULL;
    9598                 : }
    9599                 : 
    9600                 : 
    9601               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9602               0 :   PyObject *resultobj = 0;
    9603               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9604                 :   double arg2 ;
    9605               0 :   void *argp1 = 0 ;
    9606               0 :   int res1 = 0 ;
    9607                 :   double val2 ;
    9608               0 :   int ecode2 = 0 ;
    9609               0 :   PyObject * obj0 = 0 ;
    9610               0 :   PyObject * obj1 = 0 ;
    9611                 :   
    9612               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPY_set",&obj0,&obj1)) SWIG_fail;
    9613               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9614               0 :   if (!SWIG_IsOK(res1)) {
    9615               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9616                 :   }
    9617               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9618               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9619               0 :   if (!SWIG_IsOK(ecode2)) {
    9620               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
    9621                 :   } 
    9622               0 :   arg2 = static_cast< double >(val2);
    9623                 :   {
    9624               0 :     if (!arg1) {
    9625               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9626                 :     }
    9627                 :   }
    9628                 :   {
    9629               0 :     if ( bUseExceptions ) {
    9630               0 :       CPLErrorReset();
    9631                 :     }
    9632               0 :     GDAL_GCP_GCPY_set(arg1,arg2);
    9633               0 :     if ( bUseExceptions ) {
    9634               0 :       CPLErr eclass = CPLGetLastErrorType();
    9635               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9636               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9637                 :       }
    9638                 :     }
    9639                 :   }
    9640               0 :   resultobj = SWIG_Py_Void();
    9641               0 :   return resultobj;
    9642                 : fail:
    9643               0 :   return NULL;
    9644                 : }
    9645                 : 
    9646                 : 
    9647               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9648               0 :   PyObject *resultobj = 0;
    9649               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9650               0 :   void *argp1 = 0 ;
    9651               0 :   int res1 = 0 ;
    9652               0 :   PyObject * obj0 = 0 ;
    9653                 :   double result;
    9654                 :   
    9655               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPZ_get",&obj0)) SWIG_fail;
    9656               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9657               0 :   if (!SWIG_IsOK(res1)) {
    9658               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9659                 :   }
    9660               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9661                 :   {
    9662               0 :     if (!arg1) {
    9663               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9664                 :     }
    9665                 :   }
    9666                 :   {
    9667               0 :     if ( bUseExceptions ) {
    9668               0 :       CPLErrorReset();
    9669                 :     }
    9670               0 :     result = (double)GDAL_GCP_GCPZ_get(arg1);
    9671               0 :     if ( bUseExceptions ) {
    9672               0 :       CPLErr eclass = CPLGetLastErrorType();
    9673               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9674               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9675                 :       }
    9676                 :     }
    9677                 :   }
    9678               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9679               0 :   return resultobj;
    9680                 : fail:
    9681               0 :   return NULL;
    9682                 : }
    9683                 : 
    9684                 : 
    9685               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9686               0 :   PyObject *resultobj = 0;
    9687               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9688                 :   double arg2 ;
    9689               0 :   void *argp1 = 0 ;
    9690               0 :   int res1 = 0 ;
    9691                 :   double val2 ;
    9692               0 :   int ecode2 = 0 ;
    9693               0 :   PyObject * obj0 = 0 ;
    9694               0 :   PyObject * obj1 = 0 ;
    9695                 :   
    9696               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPZ_set",&obj0,&obj1)) SWIG_fail;
    9697               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9698               0 :   if (!SWIG_IsOK(res1)) {
    9699               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9700                 :   }
    9701               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9702               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9703               0 :   if (!SWIG_IsOK(ecode2)) {
    9704               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
    9705                 :   } 
    9706               0 :   arg2 = static_cast< double >(val2);
    9707                 :   {
    9708               0 :     if (!arg1) {
    9709               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9710                 :     }
    9711                 :   }
    9712                 :   {
    9713               0 :     if ( bUseExceptions ) {
    9714               0 :       CPLErrorReset();
    9715                 :     }
    9716               0 :     GDAL_GCP_GCPZ_set(arg1,arg2);
    9717               0 :     if ( bUseExceptions ) {
    9718               0 :       CPLErr eclass = CPLGetLastErrorType();
    9719               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9720               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9721                 :       }
    9722                 :     }
    9723                 :   }
    9724               0 :   resultobj = SWIG_Py_Void();
    9725               0 :   return resultobj;
    9726                 : fail:
    9727               0 :   return NULL;
    9728                 : }
    9729                 : 
    9730                 : 
    9731               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9732               0 :   PyObject *resultobj = 0;
    9733               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9734               0 :   void *argp1 = 0 ;
    9735               0 :   int res1 = 0 ;
    9736               0 :   PyObject * obj0 = 0 ;
    9737                 :   double result;
    9738                 :   
    9739               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPPixel_get",&obj0)) SWIG_fail;
    9740               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9741               0 :   if (!SWIG_IsOK(res1)) {
    9742               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9743                 :   }
    9744               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9745                 :   {
    9746               0 :     if (!arg1) {
    9747               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9748                 :     }
    9749                 :   }
    9750                 :   {
    9751               0 :     if ( bUseExceptions ) {
    9752               0 :       CPLErrorReset();
    9753                 :     }
    9754               0 :     result = (double)GDAL_GCP_GCPPixel_get(arg1);
    9755               0 :     if ( bUseExceptions ) {
    9756               0 :       CPLErr eclass = CPLGetLastErrorType();
    9757               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9758               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9759                 :       }
    9760                 :     }
    9761                 :   }
    9762               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9763               0 :   return resultobj;
    9764                 : fail:
    9765               0 :   return NULL;
    9766                 : }
    9767                 : 
    9768                 : 
    9769               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9770               0 :   PyObject *resultobj = 0;
    9771               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9772                 :   double arg2 ;
    9773               0 :   void *argp1 = 0 ;
    9774               0 :   int res1 = 0 ;
    9775                 :   double val2 ;
    9776               0 :   int ecode2 = 0 ;
    9777               0 :   PyObject * obj0 = 0 ;
    9778               0 :   PyObject * obj1 = 0 ;
    9779                 :   
    9780               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPPixel_set",&obj0,&obj1)) SWIG_fail;
    9781               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9782               0 :   if (!SWIG_IsOK(res1)) {
    9783               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9784                 :   }
    9785               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9786               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9787               0 :   if (!SWIG_IsOK(ecode2)) {
    9788               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
    9789                 :   } 
    9790               0 :   arg2 = static_cast< double >(val2);
    9791                 :   {
    9792               0 :     if (!arg1) {
    9793               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9794                 :     }
    9795                 :   }
    9796                 :   {
    9797               0 :     if ( bUseExceptions ) {
    9798               0 :       CPLErrorReset();
    9799                 :     }
    9800               0 :     GDAL_GCP_GCPPixel_set(arg1,arg2);
    9801               0 :     if ( bUseExceptions ) {
    9802               0 :       CPLErr eclass = CPLGetLastErrorType();
    9803               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9804               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9805                 :       }
    9806                 :     }
    9807                 :   }
    9808               0 :   resultobj = SWIG_Py_Void();
    9809               0 :   return resultobj;
    9810                 : fail:
    9811               0 :   return NULL;
    9812                 : }
    9813                 : 
    9814                 : 
    9815               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9816               0 :   PyObject *resultobj = 0;
    9817               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9818               0 :   void *argp1 = 0 ;
    9819               0 :   int res1 = 0 ;
    9820               0 :   PyObject * obj0 = 0 ;
    9821                 :   double result;
    9822                 :   
    9823               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPLine_get",&obj0)) SWIG_fail;
    9824               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9825               0 :   if (!SWIG_IsOK(res1)) {
    9826               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9827                 :   }
    9828               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9829                 :   {
    9830               0 :     if (!arg1) {
    9831               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9832                 :     }
    9833                 :   }
    9834                 :   {
    9835               0 :     if ( bUseExceptions ) {
    9836               0 :       CPLErrorReset();
    9837                 :     }
    9838               0 :     result = (double)GDAL_GCP_GCPLine_get(arg1);
    9839               0 :     if ( bUseExceptions ) {
    9840               0 :       CPLErr eclass = CPLGetLastErrorType();
    9841               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9842               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9843                 :       }
    9844                 :     }
    9845                 :   }
    9846               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9847               0 :   return resultobj;
    9848                 : fail:
    9849               0 :   return NULL;
    9850                 : }
    9851                 : 
    9852                 : 
    9853               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9854               0 :   PyObject *resultobj = 0;
    9855               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9856                 :   double arg2 ;
    9857               0 :   void *argp1 = 0 ;
    9858               0 :   int res1 = 0 ;
    9859                 :   double val2 ;
    9860               0 :   int ecode2 = 0 ;
    9861               0 :   PyObject * obj0 = 0 ;
    9862               0 :   PyObject * obj1 = 0 ;
    9863                 :   
    9864               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPLine_set",&obj0,&obj1)) SWIG_fail;
    9865               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9866               0 :   if (!SWIG_IsOK(res1)) {
    9867               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9868                 :   }
    9869               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9870               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9871               0 :   if (!SWIG_IsOK(ecode2)) {
    9872               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
    9873                 :   } 
    9874               0 :   arg2 = static_cast< double >(val2);
    9875                 :   {
    9876               0 :     if (!arg1) {
    9877               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9878                 :     }
    9879                 :   }
    9880                 :   {
    9881               0 :     if ( bUseExceptions ) {
    9882               0 :       CPLErrorReset();
    9883                 :     }
    9884               0 :     GDAL_GCP_GCPLine_set(arg1,arg2);
    9885               0 :     if ( bUseExceptions ) {
    9886               0 :       CPLErr eclass = CPLGetLastErrorType();
    9887               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9888               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9889                 :       }
    9890                 :     }
    9891                 :   }
    9892               0 :   resultobj = SWIG_Py_Void();
    9893               0 :   return resultobj;
    9894                 : fail:
    9895               0 :   return NULL;
    9896                 : }
    9897                 : 
    9898                 : 
    9899               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9900               0 :   PyObject *resultobj = 0;
    9901               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9902               0 :   void *argp1 = 0 ;
    9903               0 :   int res1 = 0 ;
    9904               0 :   PyObject * obj0 = 0 ;
    9905               0 :   char *result = 0 ;
    9906                 :   
    9907               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_Info_get",&obj0)) SWIG_fail;
    9908               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9909               0 :   if (!SWIG_IsOK(res1)) {
    9910               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9911                 :   }
    9912               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9913                 :   {
    9914               0 :     if (!arg1) {
    9915               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9916                 :     }
    9917                 :   }
    9918                 :   {
    9919               0 :     if ( bUseExceptions ) {
    9920               0 :       CPLErrorReset();
    9921                 :     }
    9922               0 :     result = (char *)GDAL_GCP_Info_get(arg1);
    9923               0 :     if ( bUseExceptions ) {
    9924               0 :       CPLErr eclass = CPLGetLastErrorType();
    9925               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9926               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9927                 :       }
    9928                 :     }
    9929                 :   }
    9930               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
    9931               0 :   return resultobj;
    9932                 : fail:
    9933               0 :   return NULL;
    9934                 : }
    9935                 : 
    9936                 : 
    9937               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9938               0 :   PyObject *resultobj = 0;
    9939               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9940               0 :   char *arg2 = (char *) 0 ;
    9941               0 :   void *argp1 = 0 ;
    9942               0 :   int res1 = 0 ;
    9943                 :   int res2 ;
    9944               0 :   char *buf2 = 0 ;
    9945               0 :   int alloc2 = 0 ;
    9946               0 :   PyObject * obj0 = 0 ;
    9947               0 :   PyObject * obj1 = 0 ;
    9948                 :   
    9949               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_Info_set",&obj0,&obj1)) SWIG_fail;
    9950               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9951               0 :   if (!SWIG_IsOK(res1)) {
    9952               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9953                 :   }
    9954               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9955               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9956               0 :   if (!SWIG_IsOK(res2)) {
    9957               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Info_set" "', argument " "2"" of type '" "char const *""'");
    9958                 :   }
    9959               0 :   arg2 = reinterpret_cast< char * >(buf2);
    9960                 :   {
    9961               0 :     if (!arg1) {
    9962               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9963                 :     }
    9964                 :   }
    9965                 :   {
    9966               0 :     if ( bUseExceptions ) {
    9967               0 :       CPLErrorReset();
    9968                 :     }
    9969               0 :     GDAL_GCP_Info_set(arg1,(char const *)arg2);
    9970               0 :     if ( bUseExceptions ) {
    9971               0 :       CPLErr eclass = CPLGetLastErrorType();
    9972               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9973               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9974                 :       }
    9975                 :     }
    9976                 :   }
    9977               0 :   resultobj = SWIG_Py_Void();
    9978               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9979               0 :   return resultobj;
    9980                 : fail:
    9981               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9982               0 :   return NULL;
    9983                 : }
    9984                 : 
    9985                 : 
    9986               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9987               0 :   PyObject *resultobj = 0;
    9988               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9989               0 :   void *argp1 = 0 ;
    9990               0 :   int res1 = 0 ;
    9991               0 :   PyObject * obj0 = 0 ;
    9992               0 :   char *result = 0 ;
    9993                 :   
    9994               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_Id_get",&obj0)) SWIG_fail;
    9995               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9996               0 :   if (!SWIG_IsOK(res1)) {
    9997               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9998                 :   }
    9999               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10000                 :   {
   10001               0 :     if (!arg1) {
   10002               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10003                 :     }
   10004                 :   }
   10005                 :   {
   10006               0 :     if ( bUseExceptions ) {
   10007               0 :       CPLErrorReset();
   10008                 :     }
   10009               0 :     result = (char *)GDAL_GCP_Id_get(arg1);
   10010               0 :     if ( bUseExceptions ) {
   10011               0 :       CPLErr eclass = CPLGetLastErrorType();
   10012               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10013               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10014                 :       }
   10015                 :     }
   10016                 :   }
   10017               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10018               0 :   return resultobj;
   10019                 : fail:
   10020               0 :   return NULL;
   10021                 : }
   10022                 : 
   10023                 : 
   10024               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10025               0 :   PyObject *resultobj = 0;
   10026               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10027               0 :   char *arg2 = (char *) 0 ;
   10028               0 :   void *argp1 = 0 ;
   10029               0 :   int res1 = 0 ;
   10030                 :   int res2 ;
   10031               0 :   char *buf2 = 0 ;
   10032               0 :   int alloc2 = 0 ;
   10033               0 :   PyObject * obj0 = 0 ;
   10034               0 :   PyObject * obj1 = 0 ;
   10035                 :   
   10036               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_Id_set",&obj0,&obj1)) SWIG_fail;
   10037               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10038               0 :   if (!SWIG_IsOK(res1)) {
   10039               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10040                 :   }
   10041               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10042               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10043               0 :   if (!SWIG_IsOK(res2)) {
   10044               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Id_set" "', argument " "2"" of type '" "char const *""'");
   10045                 :   }
   10046               0 :   arg2 = reinterpret_cast< char * >(buf2);
   10047                 :   {
   10048               0 :     if (!arg1) {
   10049               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10050                 :     }
   10051                 :   }
   10052                 :   {
   10053               0 :     if ( bUseExceptions ) {
   10054               0 :       CPLErrorReset();
   10055                 :     }
   10056               0 :     GDAL_GCP_Id_set(arg1,(char const *)arg2);
   10057               0 :     if ( bUseExceptions ) {
   10058               0 :       CPLErr eclass = CPLGetLastErrorType();
   10059               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10060               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10061                 :       }
   10062                 :     }
   10063                 :   }
   10064               0 :   resultobj = SWIG_Py_Void();
   10065               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10066               0 :   return resultobj;
   10067                 : fail:
   10068               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10069               0 :   return NULL;
   10070                 : }
   10071                 : 
   10072                 : 
   10073               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10074               0 :   PyObject *resultobj = 0;
   10075               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10076               0 :   void *argp1 = 0 ;
   10077               0 :   int res1 = 0 ;
   10078               0 :   PyObject * obj0 = 0 ;
   10079                 :   double result;
   10080                 :   
   10081               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPX",&obj0)) SWIG_fail;
   10082               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10083               0 :   if (!SWIG_IsOK(res1)) {
   10084               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPX" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10085                 :   }
   10086               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10087                 :   {
   10088               0 :     if (!arg1) {
   10089               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10090                 :     }
   10091                 :   }
   10092                 :   {
   10093               0 :     if ( bUseExceptions ) {
   10094               0 :       CPLErrorReset();
   10095                 :     }
   10096               0 :     result = (double)GDAL_GCP_get_GCPX(arg1);
   10097               0 :     if ( bUseExceptions ) {
   10098               0 :       CPLErr eclass = CPLGetLastErrorType();
   10099               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10100               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10101                 :       }
   10102                 :     }
   10103                 :   }
   10104               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10105               0 :   return resultobj;
   10106                 : fail:
   10107               0 :   return NULL;
   10108                 : }
   10109                 : 
   10110                 : 
   10111               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10112               0 :   PyObject *resultobj = 0;
   10113               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10114                 :   double arg2 ;
   10115               0 :   void *argp1 = 0 ;
   10116               0 :   int res1 = 0 ;
   10117                 :   double val2 ;
   10118               0 :   int ecode2 = 0 ;
   10119               0 :   PyObject * obj0 = 0 ;
   10120               0 :   PyObject * obj1 = 0 ;
   10121                 :   
   10122               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPX",&obj0,&obj1)) SWIG_fail;
   10123               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10124               0 :   if (!SWIG_IsOK(res1)) {
   10125               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPX" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10126                 :   }
   10127               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10128               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10129               0 :   if (!SWIG_IsOK(ecode2)) {
   10130               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPX" "', argument " "2"" of type '" "double""'");
   10131                 :   } 
   10132               0 :   arg2 = static_cast< double >(val2);
   10133                 :   {
   10134               0 :     if (!arg1) {
   10135               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10136                 :     }
   10137                 :   }
   10138                 :   {
   10139               0 :     if ( bUseExceptions ) {
   10140               0 :       CPLErrorReset();
   10141                 :     }
   10142               0 :     GDAL_GCP_set_GCPX(arg1,arg2);
   10143               0 :     if ( bUseExceptions ) {
   10144               0 :       CPLErr eclass = CPLGetLastErrorType();
   10145               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10146               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10147                 :       }
   10148                 :     }
   10149                 :   }
   10150               0 :   resultobj = SWIG_Py_Void();
   10151               0 :   return resultobj;
   10152                 : fail:
   10153               0 :   return NULL;
   10154                 : }
   10155                 : 
   10156                 : 
   10157               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10158               0 :   PyObject *resultobj = 0;
   10159               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10160               0 :   void *argp1 = 0 ;
   10161               0 :   int res1 = 0 ;
   10162               0 :   PyObject * obj0 = 0 ;
   10163                 :   double result;
   10164                 :   
   10165               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPY",&obj0)) SWIG_fail;
   10166               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10167               0 :   if (!SWIG_IsOK(res1)) {
   10168               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPY" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10169                 :   }
   10170               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10171                 :   {
   10172               0 :     if (!arg1) {
   10173               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10174                 :     }
   10175                 :   }
   10176                 :   {
   10177               0 :     if ( bUseExceptions ) {
   10178               0 :       CPLErrorReset();
   10179                 :     }
   10180               0 :     result = (double)GDAL_GCP_get_GCPY(arg1);
   10181               0 :     if ( bUseExceptions ) {
   10182               0 :       CPLErr eclass = CPLGetLastErrorType();
   10183               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10184               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10185                 :       }
   10186                 :     }
   10187                 :   }
   10188               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10189               0 :   return resultobj;
   10190                 : fail:
   10191               0 :   return NULL;
   10192                 : }
   10193                 : 
   10194                 : 
   10195               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10196               0 :   PyObject *resultobj = 0;
   10197               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10198                 :   double arg2 ;
   10199               0 :   void *argp1 = 0 ;
   10200               0 :   int res1 = 0 ;
   10201                 :   double val2 ;
   10202               0 :   int ecode2 = 0 ;
   10203               0 :   PyObject * obj0 = 0 ;
   10204               0 :   PyObject * obj1 = 0 ;
   10205                 :   
   10206               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPY",&obj0,&obj1)) SWIG_fail;
   10207               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10208               0 :   if (!SWIG_IsOK(res1)) {
   10209               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPY" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10210                 :   }
   10211               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10212               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10213               0 :   if (!SWIG_IsOK(ecode2)) {
   10214               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPY" "', argument " "2"" of type '" "double""'");
   10215                 :   } 
   10216               0 :   arg2 = static_cast< double >(val2);
   10217                 :   {
   10218               0 :     if (!arg1) {
   10219               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10220                 :     }
   10221                 :   }
   10222                 :   {
   10223               0 :     if ( bUseExceptions ) {
   10224               0 :       CPLErrorReset();
   10225                 :     }
   10226               0 :     GDAL_GCP_set_GCPY(arg1,arg2);
   10227               0 :     if ( bUseExceptions ) {
   10228               0 :       CPLErr eclass = CPLGetLastErrorType();
   10229               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10230               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10231                 :       }
   10232                 :     }
   10233                 :   }
   10234               0 :   resultobj = SWIG_Py_Void();
   10235               0 :   return resultobj;
   10236                 : fail:
   10237               0 :   return NULL;
   10238                 : }
   10239                 : 
   10240                 : 
   10241               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10242               0 :   PyObject *resultobj = 0;
   10243               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10244               0 :   void *argp1 = 0 ;
   10245               0 :   int res1 = 0 ;
   10246               0 :   PyObject * obj0 = 0 ;
   10247                 :   double result;
   10248                 :   
   10249               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPZ",&obj0)) SWIG_fail;
   10250               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10251               0 :   if (!SWIG_IsOK(res1)) {
   10252               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPZ" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10253                 :   }
   10254               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10255                 :   {
   10256               0 :     if (!arg1) {
   10257               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10258                 :     }
   10259                 :   }
   10260                 :   {
   10261               0 :     if ( bUseExceptions ) {
   10262               0 :       CPLErrorReset();
   10263                 :     }
   10264               0 :     result = (double)GDAL_GCP_get_GCPZ(arg1);
   10265               0 :     if ( bUseExceptions ) {
   10266               0 :       CPLErr eclass = CPLGetLastErrorType();
   10267               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10268               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10269                 :       }
   10270                 :     }
   10271                 :   }
   10272               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10273               0 :   return resultobj;
   10274                 : fail:
   10275               0 :   return NULL;
   10276                 : }
   10277                 : 
   10278                 : 
   10279               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10280               0 :   PyObject *resultobj = 0;
   10281               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10282                 :   double arg2 ;
   10283               0 :   void *argp1 = 0 ;
   10284               0 :   int res1 = 0 ;
   10285                 :   double val2 ;
   10286               0 :   int ecode2 = 0 ;
   10287               0 :   PyObject * obj0 = 0 ;
   10288               0 :   PyObject * obj1 = 0 ;
   10289                 :   
   10290               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPZ",&obj0,&obj1)) SWIG_fail;
   10291               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10292               0 :   if (!SWIG_IsOK(res1)) {
   10293               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPZ" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10294                 :   }
   10295               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10296               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10297               0 :   if (!SWIG_IsOK(ecode2)) {
   10298               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPZ" "', argument " "2"" of type '" "double""'");
   10299                 :   } 
   10300               0 :   arg2 = static_cast< double >(val2);
   10301                 :   {
   10302               0 :     if (!arg1) {
   10303               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10304                 :     }
   10305                 :   }
   10306                 :   {
   10307               0 :     if ( bUseExceptions ) {
   10308               0 :       CPLErrorReset();
   10309                 :     }
   10310               0 :     GDAL_GCP_set_GCPZ(arg1,arg2);
   10311               0 :     if ( bUseExceptions ) {
   10312               0 :       CPLErr eclass = CPLGetLastErrorType();
   10313               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10314               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10315                 :       }
   10316                 :     }
   10317                 :   }
   10318               0 :   resultobj = SWIG_Py_Void();
   10319               0 :   return resultobj;
   10320                 : fail:
   10321               0 :   return NULL;
   10322                 : }
   10323                 : 
   10324                 : 
   10325               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPPixel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10326               0 :   PyObject *resultobj = 0;
   10327               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10328               0 :   void *argp1 = 0 ;
   10329               0 :   int res1 = 0 ;
   10330               0 :   PyObject * obj0 = 0 ;
   10331                 :   double result;
   10332                 :   
   10333               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPPixel",&obj0)) SWIG_fail;
   10334               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10335               0 :   if (!SWIG_IsOK(res1)) {
   10336               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPPixel" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10337                 :   }
   10338               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10339                 :   {
   10340               0 :     if (!arg1) {
   10341               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10342                 :     }
   10343                 :   }
   10344                 :   {
   10345               0 :     if ( bUseExceptions ) {
   10346               0 :       CPLErrorReset();
   10347                 :     }
   10348               0 :     result = (double)GDAL_GCP_get_GCPPixel(arg1);
   10349               0 :     if ( bUseExceptions ) {
   10350               0 :       CPLErr eclass = CPLGetLastErrorType();
   10351               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10352               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10353                 :       }
   10354                 :     }
   10355                 :   }
   10356               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10357               0 :   return resultobj;
   10358                 : fail:
   10359               0 :   return NULL;
   10360                 : }
   10361                 : 
   10362                 : 
   10363               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPPixel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10364               0 :   PyObject *resultobj = 0;
   10365               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10366                 :   double arg2 ;
   10367               0 :   void *argp1 = 0 ;
   10368               0 :   int res1 = 0 ;
   10369                 :   double val2 ;
   10370               0 :   int ecode2 = 0 ;
   10371               0 :   PyObject * obj0 = 0 ;
   10372               0 :   PyObject * obj1 = 0 ;
   10373                 :   
   10374               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPPixel",&obj0,&obj1)) SWIG_fail;
   10375               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10376               0 :   if (!SWIG_IsOK(res1)) {
   10377               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPPixel" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10378                 :   }
   10379               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10380               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10381               0 :   if (!SWIG_IsOK(ecode2)) {
   10382               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPPixel" "', argument " "2"" of type '" "double""'");
   10383                 :   } 
   10384               0 :   arg2 = static_cast< double >(val2);
   10385                 :   {
   10386               0 :     if (!arg1) {
   10387               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10388                 :     }
   10389                 :   }
   10390                 :   {
   10391               0 :     if ( bUseExceptions ) {
   10392               0 :       CPLErrorReset();
   10393                 :     }
   10394               0 :     GDAL_GCP_set_GCPPixel(arg1,arg2);
   10395               0 :     if ( bUseExceptions ) {
   10396               0 :       CPLErr eclass = CPLGetLastErrorType();
   10397               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10398               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10399                 :       }
   10400                 :     }
   10401                 :   }
   10402               0 :   resultobj = SWIG_Py_Void();
   10403               0 :   return resultobj;
   10404                 : fail:
   10405               0 :   return NULL;
   10406                 : }
   10407                 : 
   10408                 : 
   10409               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10410               0 :   PyObject *resultobj = 0;
   10411               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10412               0 :   void *argp1 = 0 ;
   10413               0 :   int res1 = 0 ;
   10414               0 :   PyObject * obj0 = 0 ;
   10415                 :   double result;
   10416                 :   
   10417               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPLine",&obj0)) SWIG_fail;
   10418               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10419               0 :   if (!SWIG_IsOK(res1)) {
   10420               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPLine" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10421                 :   }
   10422               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10423                 :   {
   10424               0 :     if (!arg1) {
   10425               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10426                 :     }
   10427                 :   }
   10428                 :   {
   10429               0 :     if ( bUseExceptions ) {
   10430               0 :       CPLErrorReset();
   10431                 :     }
   10432               0 :     result = (double)GDAL_GCP_get_GCPLine(arg1);
   10433               0 :     if ( bUseExceptions ) {
   10434               0 :       CPLErr eclass = CPLGetLastErrorType();
   10435               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10436               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10437                 :       }
   10438                 :     }
   10439                 :   }
   10440               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10441               0 :   return resultobj;
   10442                 : fail:
   10443               0 :   return NULL;
   10444                 : }
   10445                 : 
   10446                 : 
   10447               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10448               0 :   PyObject *resultobj = 0;
   10449               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10450                 :   double arg2 ;
   10451               0 :   void *argp1 = 0 ;
   10452               0 :   int res1 = 0 ;
   10453                 :   double val2 ;
   10454               0 :   int ecode2 = 0 ;
   10455               0 :   PyObject * obj0 = 0 ;
   10456               0 :   PyObject * obj1 = 0 ;
   10457                 :   
   10458               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPLine",&obj0,&obj1)) SWIG_fail;
   10459               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10460               0 :   if (!SWIG_IsOK(res1)) {
   10461               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPLine" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10462                 :   }
   10463               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10464               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10465               0 :   if (!SWIG_IsOK(ecode2)) {
   10466               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPLine" "', argument " "2"" of type '" "double""'");
   10467                 :   } 
   10468               0 :   arg2 = static_cast< double >(val2);
   10469                 :   {
   10470               0 :     if (!arg1) {
   10471               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10472                 :     }
   10473                 :   }
   10474                 :   {
   10475               0 :     if ( bUseExceptions ) {
   10476               0 :       CPLErrorReset();
   10477                 :     }
   10478               0 :     GDAL_GCP_set_GCPLine(arg1,arg2);
   10479               0 :     if ( bUseExceptions ) {
   10480               0 :       CPLErr eclass = CPLGetLastErrorType();
   10481               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10482               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10483                 :       }
   10484                 :     }
   10485                 :   }
   10486               0 :   resultobj = SWIG_Py_Void();
   10487               0 :   return resultobj;
   10488                 : fail:
   10489               0 :   return NULL;
   10490                 : }
   10491                 : 
   10492                 : 
   10493               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_Info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10494               0 :   PyObject *resultobj = 0;
   10495               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10496               0 :   void *argp1 = 0 ;
   10497               0 :   int res1 = 0 ;
   10498               0 :   PyObject * obj0 = 0 ;
   10499               0 :   char *result = 0 ;
   10500                 :   
   10501               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_Info",&obj0)) SWIG_fail;
   10502               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10503               0 :   if (!SWIG_IsOK(res1)) {
   10504               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_Info" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10505                 :   }
   10506               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10507                 :   {
   10508               0 :     if (!arg1) {
   10509               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10510                 :     }
   10511                 :   }
   10512                 :   {
   10513               0 :     if ( bUseExceptions ) {
   10514               0 :       CPLErrorReset();
   10515                 :     }
   10516               0 :     result = (char *)GDAL_GCP_get_Info(arg1);
   10517               0 :     if ( bUseExceptions ) {
   10518               0 :       CPLErr eclass = CPLGetLastErrorType();
   10519               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10520               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10521                 :       }
   10522                 :     }
   10523                 :   }
   10524               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10525               0 :   return resultobj;
   10526                 : fail:
   10527               0 :   return NULL;
   10528                 : }
   10529                 : 
   10530                 : 
   10531               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_Info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10532               0 :   PyObject *resultobj = 0;
   10533               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10534               0 :   char *arg2 = (char *) 0 ;
   10535               0 :   void *argp1 = 0 ;
   10536               0 :   int res1 = 0 ;
   10537                 :   int res2 ;
   10538               0 :   char *buf2 = 0 ;
   10539               0 :   int alloc2 = 0 ;
   10540               0 :   PyObject * obj0 = 0 ;
   10541               0 :   PyObject * obj1 = 0 ;
   10542                 :   
   10543               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_Info",&obj0,&obj1)) SWIG_fail;
   10544               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10545               0 :   if (!SWIG_IsOK(res1)) {
   10546               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_Info" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10547                 :   }
   10548               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10549               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10550               0 :   if (!SWIG_IsOK(res2)) {
   10551               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_set_Info" "', argument " "2"" of type '" "char const *""'");
   10552                 :   }
   10553               0 :   arg2 = reinterpret_cast< char * >(buf2);
   10554                 :   {
   10555               0 :     if (!arg1) {
   10556               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10557                 :     }
   10558                 :   }
   10559                 :   {
   10560               0 :     if ( bUseExceptions ) {
   10561               0 :       CPLErrorReset();
   10562                 :     }
   10563               0 :     GDAL_GCP_set_Info(arg1,(char const *)arg2);
   10564               0 :     if ( bUseExceptions ) {
   10565               0 :       CPLErr eclass = CPLGetLastErrorType();
   10566               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10567               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10568                 :       }
   10569                 :     }
   10570                 :   }
   10571               0 :   resultobj = SWIG_Py_Void();
   10572               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10573               0 :   return resultobj;
   10574                 : fail:
   10575               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10576               0 :   return NULL;
   10577                 : }
   10578                 : 
   10579                 : 
   10580               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_Id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10581               0 :   PyObject *resultobj = 0;
   10582               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10583               0 :   void *argp1 = 0 ;
   10584               0 :   int res1 = 0 ;
   10585               0 :   PyObject * obj0 = 0 ;
   10586               0 :   char *result = 0 ;
   10587                 :   
   10588               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_Id",&obj0)) SWIG_fail;
   10589               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10590               0 :   if (!SWIG_IsOK(res1)) {
   10591               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_Id" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10592                 :   }
   10593               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10594                 :   {
   10595               0 :     if (!arg1) {
   10596               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10597                 :     }
   10598                 :   }
   10599                 :   {
   10600               0 :     if ( bUseExceptions ) {
   10601               0 :       CPLErrorReset();
   10602                 :     }
   10603               0 :     result = (char *)GDAL_GCP_get_Id(arg1);
   10604               0 :     if ( bUseExceptions ) {
   10605               0 :       CPLErr eclass = CPLGetLastErrorType();
   10606               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10607               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10608                 :       }
   10609                 :     }
   10610                 :   }
   10611               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10612               0 :   return resultobj;
   10613                 : fail:
   10614               0 :   return NULL;
   10615                 : }
   10616                 : 
   10617                 : 
   10618               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_Id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10619               0 :   PyObject *resultobj = 0;
   10620               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10621               0 :   char *arg2 = (char *) 0 ;
   10622               0 :   void *argp1 = 0 ;
   10623               0 :   int res1 = 0 ;
   10624                 :   int res2 ;
   10625               0 :   char *buf2 = 0 ;
   10626               0 :   int alloc2 = 0 ;
   10627               0 :   PyObject * obj0 = 0 ;
   10628               0 :   PyObject * obj1 = 0 ;
   10629                 :   
   10630               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_Id",&obj0,&obj1)) SWIG_fail;
   10631               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10632               0 :   if (!SWIG_IsOK(res1)) {
   10633               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_Id" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10634                 :   }
   10635               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10636               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10637               0 :   if (!SWIG_IsOK(res2)) {
   10638               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_set_Id" "', argument " "2"" of type '" "char const *""'");
   10639                 :   }
   10640               0 :   arg2 = reinterpret_cast< char * >(buf2);
   10641                 :   {
   10642               0 :     if (!arg1) {
   10643               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10644                 :     }
   10645                 :   }
   10646                 :   {
   10647               0 :     if ( bUseExceptions ) {
   10648               0 :       CPLErrorReset();
   10649                 :     }
   10650               0 :     GDAL_GCP_set_Id(arg1,(char const *)arg2);
   10651               0 :     if ( bUseExceptions ) {
   10652               0 :       CPLErr eclass = CPLGetLastErrorType();
   10653               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10654               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10655                 :       }
   10656                 :     }
   10657                 :   }
   10658               0 :   resultobj = SWIG_Py_Void();
   10659               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10660               0 :   return resultobj;
   10661                 : fail:
   10662               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10663               0 :   return NULL;
   10664                 : }
   10665                 : 
   10666                 : 
   10667               0 : SWIGINTERN PyObject *_wrap_GCPsToGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10668               0 :   PyObject *resultobj = 0;
   10669                 :   int arg1 ;
   10670               0 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   10671                 :   double *arg3 ;
   10672               0 :   int arg4 = (int) 1 ;
   10673                 :   GDAL_GCP *tmpGCPList1 ;
   10674                 :   double argout3[6] ;
   10675                 :   int val4 ;
   10676               0 :   int ecode4 = 0 ;
   10677               0 :   PyObject * obj0 = 0 ;
   10678               0 :   PyObject * obj1 = 0 ;
   10679                 :   RETURN_NONE result;
   10680                 :   
   10681                 :   {
   10682                 :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   10683               0 :     arg3 = argout3;
   10684                 :   }
   10685               0 :   if (!PyArg_ParseTuple(args,(char *)"O|O:GCPsToGeoTransform",&obj0,&obj1)) SWIG_fail;
   10686                 :   {
   10687                 :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   10688                 :     /* check if is List */
   10689               0 :     if ( !PySequence_Check(obj0) ) {
   10690               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   10691               0 :       SWIG_fail;
   10692                 :     }
   10693               0 :     arg1 = PySequence_Size(obj0);
   10694               0 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   10695               0 :     arg2 = tmpGCPList1;
   10696               0 :     for( int i = 0; i<arg1; i++ ) {
   10697               0 :       PyObject *o = PySequence_GetItem(obj0,i);
   10698               0 :       GDAL_GCP *item = 0;
   10699               0 :       SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 );
   10700               0 :       if ( ! item ) {
   10701               0 :         Py_DECREF(o);
   10702                 :         SWIG_fail;
   10703                 :       }
   10704               0 :       memcpy( (void*) tmpGCPList1, (void*) item, sizeof( GDAL_GCP ) );
   10705               0 :       ++tmpGCPList1;
   10706               0 :       Py_DECREF(o);
   10707                 :     }
   10708                 :   }
   10709               0 :   if (obj1) {
   10710               0 :     ecode4 = SWIG_AsVal_int(obj1, &val4);
   10711               0 :     if (!SWIG_IsOK(ecode4)) {
   10712               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GCPsToGeoTransform" "', argument " "4"" of type '" "int""'");
   10713                 :     } 
   10714               0 :     arg4 = static_cast< int >(val4);
   10715                 :   }
   10716                 :   {
   10717               0 :     if ( bUseExceptions ) {
   10718               0 :       CPLErrorReset();
   10719                 :     }
   10720               0 :     result = GDALGCPsToGeoTransform(arg1,(GDAL_GCP const *)arg2,arg3,arg4);
   10721               0 :     if ( bUseExceptions ) {
   10722               0 :       CPLErr eclass = CPLGetLastErrorType();
   10723               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10724               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10725                 :       }
   10726                 :     }
   10727                 :   }
   10728                 :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   10729                 :   {
   10730                 :     /* %typemap(argout) (double argout[ANY]) */
   10731               0 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 6 );
   10732               0 :     resultobj = t_output_helper(resultobj,out);
   10733                 :   }
   10734                 :   {
   10735                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   10736               0 :     if (arg2) {
   10737               0 :       free( (void*) arg2 );
   10738                 :     }
   10739                 :   }
   10740                 :   {
   10741                 :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   10742               0 :     if (result == 0 ) {
   10743               0 :       Py_XDECREF( resultobj );
   10744               0 :       resultobj = Py_None;
   10745               0 :       Py_INCREF(resultobj);
   10746                 :     }
   10747               0 :     if (resultobj == 0) {
   10748               0 :       resultobj = Py_None;
   10749               0 :       Py_INCREF(resultobj);
   10750                 :     }
   10751                 :   }
   10752               0 :   return resultobj;
   10753                 : fail:
   10754                 :   {
   10755                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   10756               0 :     if (arg2) {
   10757               0 :       free( (void*) arg2 );
   10758                 :     }
   10759                 :   }
   10760               0 :   return NULL;
   10761                 : }
   10762                 : 
   10763                 : 
   10764               1 : SWIGINTERN PyObject *_wrap_delete_AsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10765               1 :   PyObject *resultobj = 0;
   10766               1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10767               1 :   void *argp1 = 0 ;
   10768               1 :   int res1 = 0 ;
   10769               1 :   PyObject * obj0 = 0 ;
   10770                 :   
   10771               1 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_AsyncReader",&obj0)) SWIG_fail;
   10772               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_DISOWN |  0 );
   10773               1 :   if (!SWIG_IsOK(res1)) {
   10774               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AsyncReader" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10775                 :   }
   10776               1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   10777                 :   {
   10778               1 :     if ( bUseExceptions ) {
   10779               0 :       CPLErrorReset();
   10780                 :     }
   10781                 :     delete_GDALAsyncReaderShadow(arg1);
   10782               1 :     if ( bUseExceptions ) {
   10783               0 :       CPLErr eclass = CPLGetLastErrorType();
   10784               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10785               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10786                 :       }
   10787                 :     }
   10788                 :   }
   10789               1 :   resultobj = SWIG_Py_Void();
   10790               1 :   return resultobj;
   10791                 : fail:
   10792               0 :   return NULL;
   10793                 : }
   10794                 : 
   10795                 : 
   10796               1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetNextUpdatedRegion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10797               1 :   PyObject *resultobj = 0;
   10798               1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10799                 :   double arg2 ;
   10800               1 :   int *arg3 = (int *) 0 ;
   10801               1 :   int *arg4 = (int *) 0 ;
   10802               1 :   int *arg5 = (int *) 0 ;
   10803               1 :   int *arg6 = (int *) 0 ;
   10804               1 :   void *argp1 = 0 ;
   10805               1 :   int res1 = 0 ;
   10806                 :   double val2 ;
   10807               1 :   int ecode2 = 0 ;
   10808                 :   int temp3 ;
   10809               1 :   int res3 = SWIG_TMPOBJ ;
   10810                 :   int temp4 ;
   10811               1 :   int res4 = SWIG_TMPOBJ ;
   10812                 :   int temp5 ;
   10813               1 :   int res5 = SWIG_TMPOBJ ;
   10814                 :   int temp6 ;
   10815               1 :   int res6 = SWIG_TMPOBJ ;
   10816               1 :   PyObject * obj0 = 0 ;
   10817               1 :   PyObject * obj1 = 0 ;
   10818                 :   GDALAsyncStatusType result;
   10819                 :   
   10820               1 :   arg3 = &temp3;
   10821               1 :   arg4 = &temp4;
   10822               1 :   arg5 = &temp5;
   10823               1 :   arg6 = &temp6;
   10824               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:AsyncReader_GetNextUpdatedRegion",&obj0,&obj1)) SWIG_fail;
   10825               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   10826               1 :   if (!SWIG_IsOK(res1)) {
   10827               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10828                 :   }
   10829               1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   10830               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10831               1 :   if (!SWIG_IsOK(ecode2)) {
   10832               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "2"" of type '" "double""'");
   10833                 :   } 
   10834               1 :   arg2 = static_cast< double >(val2);
   10835                 :   {
   10836               1 :     if ( bUseExceptions ) {
   10837               0 :       CPLErrorReset();
   10838                 :     }
   10839               1 :     result = (GDALAsyncStatusType)GDALAsyncReaderShadow_GetNextUpdatedRegion(arg1,arg2,arg3,arg4,arg5,arg6);
   10840               1 :     if ( bUseExceptions ) {
   10841               0 :       CPLErr eclass = CPLGetLastErrorType();
   10842               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10843               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10844                 :       }
   10845                 :     }
   10846                 :   }
   10847               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10848               2 :   if (SWIG_IsTmpObj(res3)) {
   10849               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   10850                 :   } else {
   10851               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   10852               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   10853                 :   }
   10854               2 :   if (SWIG_IsTmpObj(res4)) {
   10855               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   10856                 :   } else {
   10857               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   10858               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   10859                 :   }
   10860               2 :   if (SWIG_IsTmpObj(res5)) {
   10861               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   10862                 :   } else {
   10863               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   10864               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   10865                 :   }
   10866               2 :   if (SWIG_IsTmpObj(res6)) {
   10867               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   10868                 :   } else {
   10869               0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   10870               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   10871                 :   }
   10872               1 :   return resultobj;
   10873                 : fail:
   10874               0 :   return NULL;
   10875                 : }
   10876                 : 
   10877                 : 
   10878               1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10879               1 :   PyObject *resultobj = 0;
   10880               1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10881               1 :   void **arg2 = (void **) 0 ;
   10882               1 :   void *argp1 = 0 ;
   10883               1 :   int res1 = 0 ;
   10884               1 :   void *pyObject2 = NULL ;
   10885               1 :   PyObject * obj0 = 0 ;
   10886                 :   
   10887                 :   {
   10888                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   10889               1 :     arg2 = &pyObject2;
   10890                 :   }
   10891               1 :   if (!PyArg_ParseTuple(args,(char *)"O:AsyncReader_GetBuffer",&obj0)) SWIG_fail;
   10892               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   10893               1 :   if (!SWIG_IsOK(res1)) {
   10894               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10895                 :   }
   10896               1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   10897                 :   {
   10898               1 :     if ( bUseExceptions ) {
   10899               0 :       CPLErrorReset();
   10900                 :     }
   10901                 :     GDALAsyncReaderShadow_GetBuffer(arg1,arg2);
   10902               1 :     if ( bUseExceptions ) {
   10903               0 :       CPLErr eclass = CPLGetLastErrorType();
   10904               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10905               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10906                 :       }
   10907                 :     }
   10908                 :   }
   10909               1 :   resultobj = SWIG_Py_Void();
   10910                 :   {
   10911                 :     /* %typemap(argout) ( void **outPythonObject ) */
   10912               1 :     Py_XDECREF(resultobj);
   10913               1 :     if (*arg2)
   10914                 :     {
   10915               1 :       resultobj = (PyObject*)*arg2;
   10916                 :     }
   10917                 :     else
   10918                 :     {
   10919               0 :       resultobj = Py_None;
   10920               0 :       Py_INCREF(resultobj);
   10921                 :     }
   10922                 :   }
   10923               1 :   return resultobj;
   10924                 : fail:
   10925               0 :   return NULL;
   10926                 : }
   10927                 : 
   10928                 : 
   10929               0 : SWIGINTERN PyObject *_wrap_AsyncReader_LockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10930               0 :   PyObject *resultobj = 0;
   10931               0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10932                 :   double arg2 ;
   10933               0 :   void *argp1 = 0 ;
   10934               0 :   int res1 = 0 ;
   10935                 :   double val2 ;
   10936               0 :   int ecode2 = 0 ;
   10937               0 :   PyObject * obj0 = 0 ;
   10938               0 :   PyObject * obj1 = 0 ;
   10939                 :   int result;
   10940                 :   
   10941               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:AsyncReader_LockBuffer",&obj0,&obj1)) SWIG_fail;
   10942               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   10943               0 :   if (!SWIG_IsOK(res1)) {
   10944               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_LockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10945                 :   }
   10946               0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   10947               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10948               0 :   if (!SWIG_IsOK(ecode2)) {
   10949               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_LockBuffer" "', argument " "2"" of type '" "double""'");
   10950                 :   } 
   10951               0 :   arg2 = static_cast< double >(val2);
   10952                 :   {
   10953               0 :     if ( bUseExceptions ) {
   10954               0 :       CPLErrorReset();
   10955                 :     }
   10956               0 :     result = (int)GDALAsyncReaderShadow_LockBuffer(arg1,arg2);
   10957               0 :     if ( bUseExceptions ) {
   10958               0 :       CPLErr eclass = CPLGetLastErrorType();
   10959               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10960               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10961                 :       }
   10962                 :     }
   10963                 :   }
   10964               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10965               0 :   return resultobj;
   10966                 : fail:
   10967               0 :   return NULL;
   10968                 : }
   10969                 : 
   10970                 : 
   10971               0 : SWIGINTERN PyObject *_wrap_AsyncReader_UnlockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10972               0 :   PyObject *resultobj = 0;
   10973               0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10974               0 :   void *argp1 = 0 ;
   10975               0 :   int res1 = 0 ;
   10976               0 :   PyObject * obj0 = 0 ;
   10977                 :   
   10978               0 :   if (!PyArg_ParseTuple(args,(char *)"O:AsyncReader_UnlockBuffer",&obj0)) SWIG_fail;
   10979               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   10980               0 :   if (!SWIG_IsOK(res1)) {
   10981               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_UnlockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10982                 :   }
   10983               0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   10984                 :   {
   10985               0 :     if ( bUseExceptions ) {
   10986               0 :       CPLErrorReset();
   10987                 :     }
   10988                 :     GDALAsyncReaderShadow_UnlockBuffer(arg1);
   10989               0 :     if ( bUseExceptions ) {
   10990               0 :       CPLErr eclass = CPLGetLastErrorType();
   10991               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10992               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10993                 :       }
   10994                 :     }
   10995                 :   }
   10996               0 :   resultobj = SWIG_Py_Void();
   10997               0 :   return resultobj;
   10998                 : fail:
   10999               0 :   return NULL;
   11000                 : }
   11001                 : 
   11002                 : 
   11003               6 : SWIGINTERN PyObject *AsyncReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11004                 :   PyObject *obj;
   11005               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   11006               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_NewClientData(obj));
   11007               6 :   return SWIG_Py_Void();
   11008                 : }
   11009                 : 
   11010            2158 : SWIGINTERN PyObject *_wrap_Dataset_RasterXSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11011            2158 :   PyObject *resultobj = 0;
   11012            2158 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11013            2158 :   void *argp1 = 0 ;
   11014            2158 :   int res1 = 0 ;
   11015            2158 :   PyObject * obj0 = 0 ;
   11016                 :   int result;
   11017                 :   
   11018            2158 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterXSize_get",&obj0)) SWIG_fail;
   11019            2158 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11020            2158 :   if (!SWIG_IsOK(res1)) {
   11021               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterXSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11022                 :   }
   11023            2158 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11024                 :   {
   11025            2158 :     if ( bUseExceptions ) {
   11026               0 :       CPLErrorReset();
   11027                 :     }
   11028            2158 :     result = (int)GDALDatasetShadow_RasterXSize_get(arg1);
   11029            2158 :     if ( bUseExceptions ) {
   11030               0 :       CPLErr eclass = CPLGetLastErrorType();
   11031               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11032               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11033                 :       }
   11034                 :     }
   11035                 :   }
   11036            2158 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11037            2158 :   return resultobj;
   11038                 : fail:
   11039               0 :   return NULL;
   11040                 : }
   11041                 : 
   11042                 : 
   11043           10535 : SWIGINTERN PyObject *_wrap_Dataset_RasterYSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11044           10535 :   PyObject *resultobj = 0;
   11045           10535 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11046           10535 :   void *argp1 = 0 ;
   11047           10535 :   int res1 = 0 ;
   11048           10535 :   PyObject * obj0 = 0 ;
   11049                 :   int result;
   11050                 :   
   11051           10535 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterYSize_get",&obj0)) SWIG_fail;
   11052           10535 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11053           10535 :   if (!SWIG_IsOK(res1)) {
   11054               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterYSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11055                 :   }
   11056           10535 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11057                 :   {
   11058           10535 :     if ( bUseExceptions ) {
   11059               0 :       CPLErrorReset();
   11060                 :     }
   11061           10535 :     result = (int)GDALDatasetShadow_RasterYSize_get(arg1);
   11062           10535 :     if ( bUseExceptions ) {
   11063               0 :       CPLErr eclass = CPLGetLastErrorType();
   11064               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11065               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11066                 :       }
   11067                 :     }
   11068                 :   }
   11069           10535 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11070           10535 :   return resultobj;
   11071                 : fail:
   11072               0 :   return NULL;
   11073                 : }
   11074                 : 
   11075                 : 
   11076          335629 : SWIGINTERN PyObject *_wrap_Dataset_RasterCount_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11077          335629 :   PyObject *resultobj = 0;
   11078          335629 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11079          335629 :   void *argp1 = 0 ;
   11080          335629 :   int res1 = 0 ;
   11081          335629 :   PyObject * obj0 = 0 ;
   11082                 :   int result;
   11083                 :   
   11084          335629 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterCount_get",&obj0)) SWIG_fail;
   11085          335629 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11086          335629 :   if (!SWIG_IsOK(res1)) {
   11087               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterCount_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11088                 :   }
   11089          335629 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11090                 :   {
   11091          335629 :     if ( bUseExceptions ) {
   11092               0 :       CPLErrorReset();
   11093                 :     }
   11094          335629 :     result = (int)GDALDatasetShadow_RasterCount_get(arg1);
   11095          335629 :     if ( bUseExceptions ) {
   11096               0 :       CPLErr eclass = CPLGetLastErrorType();
   11097               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11098               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11099                 :       }
   11100                 :     }
   11101                 :   }
   11102          335629 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11103          335629 :   return resultobj;
   11104                 : fail:
   11105               0 :   return NULL;
   11106                 : }
   11107                 : 
   11108                 : 
   11109           16274 : SWIGINTERN PyObject *_wrap_delete_Dataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11110           16274 :   PyObject *resultobj = 0;
   11111           16274 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11112           16274 :   void *argp1 = 0 ;
   11113           16274 :   int res1 = 0 ;
   11114           16274 :   PyObject * obj0 = 0 ;
   11115                 :   
   11116           16274 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_Dataset",&obj0)) SWIG_fail;
   11117           16274 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_DISOWN |  0 );
   11118           16274 :   if (!SWIG_IsOK(res1)) {
   11119               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11120                 :   }
   11121           16274 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11122                 :   {
   11123           16274 :     if ( bUseExceptions ) {
   11124               0 :       CPLErrorReset();
   11125                 :     }
   11126                 :     delete_GDALDatasetShadow(arg1);
   11127           16274 :     if ( bUseExceptions ) {
   11128               0 :       CPLErr eclass = CPLGetLastErrorType();
   11129               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11130               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11131                 :       }
   11132                 :     }
   11133                 :   }
   11134           16274 :   resultobj = SWIG_Py_Void();
   11135           16274 :   return resultobj;
   11136                 : fail:
   11137               0 :   return NULL;
   11138                 : }
   11139                 : 
   11140                 : 
   11141             554 : SWIGINTERN PyObject *_wrap_Dataset_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11142             554 :   PyObject *resultobj = 0;
   11143             554 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11144             554 :   void *argp1 = 0 ;
   11145             554 :   int res1 = 0 ;
   11146             554 :   PyObject * obj0 = 0 ;
   11147             554 :   GDALDriverShadow *result = 0 ;
   11148                 :   
   11149             554 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetDriver",&obj0)) SWIG_fail;
   11150             554 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11151             554 :   if (!SWIG_IsOK(res1)) {
   11152               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetDriver" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11153                 :   }
   11154             554 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11155                 :   {
   11156             554 :     if ( bUseExceptions ) {
   11157               0 :       CPLErrorReset();
   11158                 :     }
   11159             554 :     result = (GDALDriverShadow *)GDALDatasetShadow_GetDriver(arg1);
   11160             554 :     if ( bUseExceptions ) {
   11161               0 :       CPLErr eclass = CPLGetLastErrorType();
   11162               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11163               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11164                 :       }
   11165                 :     }
   11166                 :   }
   11167             554 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   11168             554 :   return resultobj;
   11169                 : fail:
   11170               0 :   return NULL;
   11171                 : }
   11172                 : 
   11173                 : 
   11174          174178 : SWIGINTERN PyObject *_wrap_Dataset_GetRasterBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11175          174178 :   PyObject *resultobj = 0;
   11176          174178 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11177                 :   int arg2 ;
   11178          174178 :   void *argp1 = 0 ;
   11179          174178 :   int res1 = 0 ;
   11180                 :   int val2 ;
   11181          174178 :   int ecode2 = 0 ;
   11182          174178 :   PyObject * obj0 = 0 ;
   11183          174178 :   PyObject * obj1 = 0 ;
   11184          174178 :   GDALRasterBandShadow *result = 0 ;
   11185                 :   
   11186          174178 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_GetRasterBand",&obj0,&obj1)) SWIG_fail;
   11187          174178 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11188          174178 :   if (!SWIG_IsOK(res1)) {
   11189               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRasterBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11190                 :   }
   11191          174178 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11192          174178 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11193          174178 :   if (!SWIG_IsOK(ecode2)) {
   11194               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetRasterBand" "', argument " "2"" of type '" "int""'");
   11195                 :   } 
   11196          174178 :   arg2 = static_cast< int >(val2);
   11197                 :   {
   11198          174178 :     if ( bUseExceptions ) {
   11199               0 :       CPLErrorReset();
   11200                 :     }
   11201          174178 :     result = (GDALRasterBandShadow *)GDALDatasetShadow_GetRasterBand(arg1,arg2);
   11202          174178 :     if ( bUseExceptions ) {
   11203               0 :       CPLErr eclass = CPLGetLastErrorType();
   11204               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11205               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11206                 :       }
   11207                 :     }
   11208                 :   }
   11209          174178 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   11210          174178 :   return resultobj;
   11211                 : fail:
   11212               0 :   return NULL;
   11213                 : }
   11214                 : 
   11215                 : 
   11216             385 : SWIGINTERN PyObject *_wrap_Dataset_GetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11217             385 :   PyObject *resultobj = 0;
   11218             385 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11219             385 :   void *argp1 = 0 ;
   11220             385 :   int res1 = 0 ;
   11221             385 :   PyObject * obj0 = 0 ;
   11222             385 :   char *result = 0 ;
   11223                 :   
   11224             385 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetProjection",&obj0)) SWIG_fail;
   11225             385 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11226             385 :   if (!SWIG_IsOK(res1)) {
   11227               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11228                 :   }
   11229             385 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11230                 :   {
   11231             385 :     if ( bUseExceptions ) {
   11232               0 :       CPLErrorReset();
   11233                 :     }
   11234             385 :     result = (char *)GDALDatasetShadow_GetProjection(arg1);
   11235             385 :     if ( bUseExceptions ) {
   11236               0 :       CPLErr eclass = CPLGetLastErrorType();
   11237               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11238               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11239                 :       }
   11240                 :     }
   11241                 :   }
   11242             385 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11243             385 :   return resultobj;
   11244                 : fail:
   11245               0 :   return NULL;
   11246                 : }
   11247                 : 
   11248                 : 
   11249             185 : SWIGINTERN PyObject *_wrap_Dataset_GetProjectionRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11250             185 :   PyObject *resultobj = 0;
   11251             185 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11252             185 :   void *argp1 = 0 ;
   11253             185 :   int res1 = 0 ;
   11254             185 :   PyObject * obj0 = 0 ;
   11255             185 :   char *result = 0 ;
   11256                 :   
   11257             185 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetProjectionRef",&obj0)) SWIG_fail;
   11258             185 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11259             185 :   if (!SWIG_IsOK(res1)) {
   11260               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjectionRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11261                 :   }
   11262             185 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11263                 :   {
   11264             185 :     if ( bUseExceptions ) {
   11265               0 :       CPLErrorReset();
   11266                 :     }
   11267             185 :     result = (char *)GDALDatasetShadow_GetProjectionRef(arg1);
   11268             185 :     if ( bUseExceptions ) {
   11269               0 :       CPLErr eclass = CPLGetLastErrorType();
   11270               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11271               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11272                 :       }
   11273                 :     }
   11274                 :   }
   11275             185 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11276             185 :   return resultobj;
   11277                 : fail:
   11278               0 :   return NULL;
   11279                 : }
   11280                 : 
   11281                 : 
   11282             917 : SWIGINTERN PyObject *_wrap_Dataset_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11283             917 :   PyObject *resultobj = 0;
   11284             917 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11285             917 :   char *arg2 = (char *) 0 ;
   11286             917 :   void *argp1 = 0 ;
   11287             917 :   int res1 = 0 ;
   11288                 :   int res2 ;
   11289             917 :   char *buf2 = 0 ;
   11290             917 :   int alloc2 = 0 ;
   11291             917 :   PyObject * obj0 = 0 ;
   11292             917 :   PyObject * obj1 = 0 ;
   11293                 :   CPLErr result;
   11294                 :   
   11295             917 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_SetProjection",&obj0,&obj1)) SWIG_fail;
   11296             917 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11297             917 :   if (!SWIG_IsOK(res1)) {
   11298               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11299                 :   }
   11300             917 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11301             917 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   11302             917 :   if (!SWIG_IsOK(res2)) {
   11303               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetProjection" "', argument " "2"" of type '" "char const *""'");
   11304                 :   }
   11305             917 :   arg2 = reinterpret_cast< char * >(buf2);
   11306                 :   {
   11307             917 :     if (!arg2) {
   11308               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11309                 :     }
   11310                 :   }
   11311                 :   {
   11312             917 :     if ( bUseExceptions ) {
   11313               0 :       CPLErrorReset();
   11314                 :     }
   11315             917 :     result = (CPLErr)GDALDatasetShadow_SetProjection(arg1,(char const *)arg2);
   11316             917 :     if ( bUseExceptions ) {
   11317               0 :       CPLErr eclass = CPLGetLastErrorType();
   11318               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11319               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11320                 :       }
   11321                 :     }
   11322                 :   }
   11323            1834 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11324             917 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11325                 :   {
   11326                 :     /* %typemap(ret) CPLErr */
   11327             917 :     if ( bUseExceptions == 0 ) {
   11328                 :       /* We're not using exceptions.  And no error has occurred */
   11329             917 :       if ( resultobj == 0 ) {
   11330                 :         /* No other return values set so return ErrorCode */
   11331               0 :         resultobj = PyInt_FromLong(result);
   11332                 :       }
   11333                 :     }
   11334                 :   }
   11335             917 :   return resultobj;
   11336                 : fail:
   11337               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11338               0 :   return NULL;
   11339                 : }
   11340                 : 
   11341                 : 
   11342            1101 : SWIGINTERN PyObject *_wrap_Dataset_GetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11343            1101 :   PyObject *resultobj = 0;
   11344            1101 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11345                 :   double *arg2 ;
   11346            1101 :   int *arg3 = (int *) 0 ;
   11347            1101 :   int *arg4 = (int *) 0 ;
   11348            1101 :   void *argp1 = 0 ;
   11349            1101 :   int res1 = 0 ;
   11350                 :   double argout2[6] ;
   11351                 :   int isvalid2 ;
   11352                 :   int val4 ;
   11353            1101 :   PyObject * obj0 = 0 ;
   11354            1101 :   PyObject * obj1 = 0 ;
   11355                 :   char *  kwnames[] = {
   11356                 :     (char *) "self",(char *) "can_return_null", NULL 
   11357            1101 :   };
   11358                 :   
   11359                 :   {
   11360                 :     /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
   11361            1101 :     arg2 = argout2;
   11362            1101 :     arg3 = &isvalid2;
   11363                 :   }
   11364            1101 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Dataset_GetGeoTransform",kwnames,&obj0,&obj1)) SWIG_fail;
   11365            1101 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11366            1101 :   if (!SWIG_IsOK(res1)) {
   11367               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11368                 :   }
   11369            1101 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11370            1101 :   if (obj1) {
   11371                 :     {
   11372                 :       /* %typemap(in) (int *optional_##int) */
   11373             102 :       if ( obj1 == Py_None ) {
   11374               0 :         arg4 = 0;
   11375                 :       }
   11376             102 :       else if ( PyArg_Parse( obj1,"i" ,&val4 ) ) {
   11377             102 :         arg4 = (int *) &val4;
   11378                 :       }
   11379                 :       else {
   11380               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   11381               0 :         SWIG_fail;
   11382                 :       }
   11383                 :     }
   11384                 :   }
   11385                 :   {
   11386            1101 :     if ( bUseExceptions ) {
   11387               0 :       CPLErrorReset();
   11388                 :     }
   11389                 :     GDALDatasetShadow_GetGeoTransform(arg1,arg2,arg3,arg4);
   11390            1101 :     if ( bUseExceptions ) {
   11391               0 :       CPLErr eclass = CPLGetLastErrorType();
   11392               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11393               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11394                 :       }
   11395                 :     }
   11396                 :   }
   11397            1101 :   resultobj = SWIG_Py_Void();
   11398                 :   {
   11399                 :     /* %typemap(argout) (double argout[6], int* isvalid)  */
   11400                 :     PyObject *r;
   11401            1101 :     if ( !*arg3 ) {
   11402              24 :       Py_INCREF(Py_None);
   11403              24 :       r = Py_None;
   11404                 :     }
   11405                 :     else {
   11406            1077 :       r = CreateTupleFromDoubleArray(arg2, 6);
   11407                 :     }
   11408            1101 :     resultobj = t_output_helper(resultobj,r);
   11409                 :   }
   11410            1101 :   return resultobj;
   11411                 : fail:
   11412               0 :   return NULL;
   11413                 : }
   11414                 : 
   11415                 : 
   11416             901 : SWIGINTERN PyObject *_wrap_Dataset_SetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11417             901 :   PyObject *resultobj = 0;
   11418             901 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11419                 :   double *arg2 ;
   11420             901 :   void *argp1 = 0 ;
   11421             901 :   int res1 = 0 ;
   11422                 :   double argin2[6] ;
   11423             901 :   PyObject * obj0 = 0 ;
   11424             901 :   PyObject * obj1 = 0 ;
   11425                 :   CPLErr result;
   11426                 :   
   11427             901 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_SetGeoTransform",&obj0,&obj1)) SWIG_fail;
   11428             901 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11429             901 :   if (!SWIG_IsOK(res1)) {
   11430               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11431                 :   }
   11432             901 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11433                 :   {
   11434                 :     /* %typemap(in) (double argin2[ANY]) */
   11435             901 :     arg2 = argin2;
   11436             901 :     if (! PySequence_Check(obj1) ) {
   11437               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   11438               0 :       SWIG_fail;
   11439                 :     }
   11440             901 :     int seq_size = PySequence_Size(obj1);
   11441             901 :     if ( seq_size != 6 ) {
   11442               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   11443               0 :       SWIG_fail;
   11444                 :     }
   11445            6307 :     for (unsigned int i=0; i<6; i++) {
   11446            5406 :       PyObject *o = PySequence_GetItem(obj1,i);
   11447                 :       double val;
   11448            5406 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   11449               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   11450               0 :         Py_DECREF(o);
   11451                 :         SWIG_fail;
   11452                 :       }
   11453            5406 :       arg2[i] =  val;
   11454            5406 :       Py_DECREF(o);
   11455                 :     }
   11456                 :   }
   11457                 :   {
   11458             901 :     if ( bUseExceptions ) {
   11459               0 :       CPLErrorReset();
   11460                 :     }
   11461             901 :     result = (CPLErr)GDALDatasetShadow_SetGeoTransform(arg1,arg2);
   11462             901 :     if ( bUseExceptions ) {
   11463               0 :       CPLErr eclass = CPLGetLastErrorType();
   11464               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11465               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11466                 :       }
   11467                 :     }
   11468                 :   }
   11469            1802 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11470                 :   {
   11471                 :     /* %typemap(ret) CPLErr */
   11472             901 :     if ( bUseExceptions == 0 ) {
   11473                 :       /* We're not using exceptions.  And no error has occurred */
   11474             901 :       if ( resultobj == 0 ) {
   11475                 :         /* No other return values set so return ErrorCode */
   11476               0 :         resultobj = PyInt_FromLong(result);
   11477                 :       }
   11478                 :     }
   11479                 :   }
   11480             901 :   return resultobj;
   11481                 : fail:
   11482               0 :   return NULL;
   11483                 : }
   11484                 : 
   11485                 : 
   11486             177 : SWIGINTERN PyObject *_wrap_Dataset_BuildOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11487             177 :   PyObject *resultobj = 0;
   11488             177 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11489             177 :   char *arg2 = (char *) "NEAREST" ;
   11490             177 :   int arg3 = (int) 0 ;
   11491             177 :   int *arg4 = (int *) 0 ;
   11492             177 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   11493             177 :   void *arg6 = (void *) NULL ;
   11494             177 :   void *argp1 = 0 ;
   11495             177 :   int res1 = 0 ;
   11496                 :   int res2 ;
   11497             177 :   char *buf2 = 0 ;
   11498             177 :   int alloc2 = 0 ;
   11499             177 :   PyObject * obj0 = 0 ;
   11500             177 :   PyObject * obj1 = 0 ;
   11501             177 :   PyObject * obj2 = 0 ;
   11502             177 :   PyObject * obj3 = 0 ;
   11503             177 :   PyObject * obj4 = 0 ;
   11504                 :   char *  kwnames[] = {
   11505                 :     (char *) "self",(char *) "resampling",(char *) "overviewlist",(char *) "callback",(char *) "callback_data", NULL 
   11506             177 :   };
   11507                 :   int result;
   11508                 :   
   11509                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   11510                 :   PyProgressData *psProgressInfo;
   11511             177 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   11512             177 :   psProgressInfo->nLastReported = -1;
   11513             177 :   psProgressInfo->psPyCallback = NULL;
   11514             177 :   psProgressInfo->psPyCallbackData = NULL;
   11515             177 :   arg6 = psProgressInfo;
   11516             177 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOO:Dataset_BuildOverviews",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   11517             177 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11518             177 :   if (!SWIG_IsOK(res1)) {
   11519               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BuildOverviews" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11520                 :   }
   11521             177 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11522             177 :   if (obj1) {
   11523             143 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   11524             143 :     if (!SWIG_IsOK(res2)) {
   11525               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_BuildOverviews" "', argument " "2"" of type '" "char const *""'");
   11526                 :     }
   11527             143 :     arg2 = reinterpret_cast< char * >(buf2);
   11528                 :   }
   11529             177 :   if (obj2) {
   11530                 :     {
   11531                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   11532                 :       /* check if is List */
   11533             177 :       if ( !PySequence_Check(obj2) ) {
   11534               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   11535               0 :         SWIG_fail;
   11536                 :       }
   11537             177 :       arg3 = PySequence_Size(obj2);
   11538             177 :       arg4 = (int*) malloc(arg3*sizeof(int));
   11539             424 :       for( int i = 0; i<arg3; i++ ) {
   11540             247 :         PyObject *o = PySequence_GetItem(obj2,i);
   11541             247 :         if ( !PyArg_Parse(o,"i",&arg4[i]) ) {
   11542               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   11543               0 :           Py_DECREF(o);
   11544                 :           SWIG_fail;
   11545                 :         }
   11546             247 :         Py_DECREF(o);
   11547                 :       }
   11548                 :     }
   11549                 :   }
   11550             177 :   if (obj3) {
   11551                 :     {
   11552                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   11553                 :       /* callback_func typemap */
   11554               0 :       if (obj3 && obj3 != Py_None ) {
   11555               0 :         void* cbfunction = NULL;
   11556                 :         SWIG_ConvertPtr( obj3, 
   11557                 :           (void**)&cbfunction,
   11558                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   11559               0 :           SWIG_POINTER_EXCEPTION | 0 );
   11560                 :         
   11561               0 :         if ( cbfunction == GDALTermProgress ) {
   11562               0 :           arg5 = GDALTermProgress;
   11563                 :         } else {
   11564               0 :           if (!PyCallable_Check(obj3)) {
   11565                 :             PyErr_SetString( PyExc_RuntimeError, 
   11566               0 :               "Object given is not a Python function" );
   11567               0 :             SWIG_fail;
   11568                 :           }
   11569               0 :           psProgressInfo->psPyCallback = obj3;
   11570               0 :           arg5 = PyProgressProxy;
   11571                 :         }
   11572                 :         
   11573                 :       }
   11574                 :       
   11575                 :     }
   11576                 :   }
   11577             177 :   if (obj4) {
   11578                 :     {
   11579                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   11580               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   11581                 :     }
   11582                 :   }
   11583                 :   {
   11584             177 :     if ( bUseExceptions ) {
   11585               0 :       CPLErrorReset();
   11586                 :     }
   11587             177 :     result = (int)GDALDatasetShadow_BuildOverviews(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   11588             177 :     if ( bUseExceptions ) {
   11589               0 :       CPLErr eclass = CPLGetLastErrorType();
   11590               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11591               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11592                 :       }
   11593                 :     }
   11594                 :   }
   11595             177 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11596             177 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11597                 :   {
   11598                 :     /* %typemap(freearg) (int nList, int* pList) */
   11599             177 :     if (arg4) {
   11600             177 :       free((void*) arg4);
   11601                 :     }
   11602                 :   }
   11603                 :   {
   11604                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   11605                 :     
   11606             177 :     CPLFree(psProgressInfo);
   11607                 :     
   11608                 :   }
   11609             177 :   return resultobj;
   11610                 : fail:
   11611               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11612                 :   {
   11613                 :     /* %typemap(freearg) (int nList, int* pList) */
   11614               0 :     if (arg4) {
   11615               0 :       free((void*) arg4);
   11616                 :     }
   11617                 :   }
   11618                 :   {
   11619                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   11620                 :     
   11621               0 :     CPLFree(psProgressInfo);
   11622                 :     
   11623                 :   }
   11624               0 :   return NULL;
   11625                 : }
   11626                 : 
   11627                 : 
   11628              28 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11629              28 :   PyObject *resultobj = 0;
   11630              28 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11631              28 :   void *argp1 = 0 ;
   11632              28 :   int res1 = 0 ;
   11633              28 :   PyObject * obj0 = 0 ;
   11634                 :   int result;
   11635                 :   
   11636              28 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPCount",&obj0)) SWIG_fail;
   11637              28 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11638              28 :   if (!SWIG_IsOK(res1)) {
   11639               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11640                 :   }
   11641              28 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11642                 :   {
   11643              28 :     if ( bUseExceptions ) {
   11644               0 :       CPLErrorReset();
   11645                 :     }
   11646              28 :     result = (int)GDALDatasetShadow_GetGCPCount(arg1);
   11647              28 :     if ( bUseExceptions ) {
   11648               0 :       CPLErr eclass = CPLGetLastErrorType();
   11649               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11650               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11651                 :       }
   11652                 :     }
   11653                 :   }
   11654              28 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11655              28 :   return resultobj;
   11656                 : fail:
   11657               0 :   return NULL;
   11658                 : }
   11659                 : 
   11660                 : 
   11661              22 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11662              22 :   PyObject *resultobj = 0;
   11663              22 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11664              22 :   void *argp1 = 0 ;
   11665              22 :   int res1 = 0 ;
   11666              22 :   PyObject * obj0 = 0 ;
   11667              22 :   char *result = 0 ;
   11668                 :   
   11669              22 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPProjection",&obj0)) SWIG_fail;
   11670              22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11671              22 :   if (!SWIG_IsOK(res1)) {
   11672               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11673                 :   }
   11674              22 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11675                 :   {
   11676              22 :     if ( bUseExceptions ) {
   11677               0 :       CPLErrorReset();
   11678                 :     }
   11679              22 :     result = (char *)GDALDatasetShadow_GetGCPProjection(arg1);
   11680              22 :     if ( bUseExceptions ) {
   11681               0 :       CPLErr eclass = CPLGetLastErrorType();
   11682               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11683               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11684                 :       }
   11685                 :     }
   11686                 :   }
   11687              22 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11688              22 :   return resultobj;
   11689                 : fail:
   11690               0 :   return NULL;
   11691                 : }
   11692                 : 
   11693                 : 
   11694              43 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11695              43 :   PyObject *resultobj = 0;
   11696              43 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11697              43 :   int *arg2 = (int *) 0 ;
   11698              43 :   GDAL_GCP **arg3 = (GDAL_GCP **) 0 ;
   11699              43 :   void *argp1 = 0 ;
   11700              43 :   int res1 = 0 ;
   11701              43 :   int nGCPs2 = 0 ;
   11702              43 :   GDAL_GCP *pGCPs2 = 0 ;
   11703              43 :   PyObject * obj0 = 0 ;
   11704                 :   
   11705                 :   {
   11706                 :     /* %typemap(in,numinputs=0) (int *nGCPs2, GDAL_GCP const **pGCPs2 ) */
   11707              43 :     arg2 = &nGCPs2;
   11708              43 :     arg3 = &pGCPs2;
   11709                 :   }
   11710              43 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPs",&obj0)) SWIG_fail;
   11711              43 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11712              43 :   if (!SWIG_IsOK(res1)) {
   11713               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11714                 :   }
   11715              43 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11716                 :   {
   11717              43 :     if ( bUseExceptions ) {
   11718               0 :       CPLErrorReset();
   11719                 :     }
   11720                 :     GDALDatasetShadow_GetGCPs(arg1,arg2,(GDAL_GCP const **)arg3);
   11721              43 :     if ( bUseExceptions ) {
   11722               0 :       CPLErr eclass = CPLGetLastErrorType();
   11723               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11724               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11725                 :       }
   11726                 :     }
   11727                 :   }
   11728              43 :   resultobj = SWIG_Py_Void();
   11729                 :   {
   11730                 :     /* %typemap(argout) (int *nGCPs, GDAL_GCP const **pGCPs ) */
   11731              43 :     PyObject *dict = PyTuple_New( *arg2 );
   11732            5589 :     for( int i = 0; i < *arg2; i++ ) {
   11733            5546 :       GDAL_GCP *o = new_GDAL_GCP( (*arg3)[i].dfGCPX,
   11734            5546 :         (*arg3)[i].dfGCPY,
   11735            5546 :         (*arg3)[i].dfGCPZ,
   11736            5546 :         (*arg3)[i].dfGCPPixel,
   11737            5546 :         (*arg3)[i].dfGCPLine,
   11738            5546 :         (*arg3)[i].pszInfo,
   11739           38822 :         (*arg3)[i].pszId );
   11740                 :       
   11741                 :       PyTuple_SetItem(dict, i, 
   11742            5546 :         SWIG_NewPointerObj((void*)o,SWIGTYPE_p_GDAL_GCP,1) );
   11743                 :     }
   11744              43 :     Py_DECREF(resultobj);
   11745              43 :     resultobj = dict;
   11746                 :   }
   11747              43 :   return resultobj;
   11748                 : fail:
   11749               0 :   return NULL;
   11750                 : }
   11751                 : 
   11752                 : 
   11753              11 : SWIGINTERN PyObject *_wrap_Dataset_SetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11754              11 :   PyObject *resultobj = 0;
   11755              11 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11756                 :   int arg2 ;
   11757              11 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   11758              11 :   char *arg4 = (char *) 0 ;
   11759              11 :   void *argp1 = 0 ;
   11760              11 :   int res1 = 0 ;
   11761                 :   GDAL_GCP *tmpGCPList2 ;
   11762                 :   int res4 ;
   11763              11 :   char *buf4 = 0 ;
   11764              11 :   int alloc4 = 0 ;
   11765              11 :   PyObject * obj0 = 0 ;
   11766              11 :   PyObject * obj1 = 0 ;
   11767              11 :   PyObject * obj2 = 0 ;
   11768                 :   CPLErr result;
   11769                 :   
   11770              11 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Dataset_SetGCPs",&obj0,&obj1,&obj2)) SWIG_fail;
   11771              11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11772              11 :   if (!SWIG_IsOK(res1)) {
   11773               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11774                 :   }
   11775              11 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11776                 :   {
   11777                 :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   11778                 :     /* check if is List */
   11779              11 :     if ( !PySequence_Check(obj1) ) {
   11780               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   11781               0 :       SWIG_fail;
   11782                 :     }
   11783              11 :     arg2 = PySequence_Size(obj1);
   11784              11 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   11785              11 :     arg3 = tmpGCPList2;
   11786              42 :     for( int i = 0; i<arg2; i++ ) {
   11787              31 :       PyObject *o = PySequence_GetItem(obj1,i);
   11788              31 :       GDAL_GCP *item = 0;
   11789              31 :       SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 );
   11790              31 :       if ( ! item ) {
   11791               0 :         Py_DECREF(o);
   11792                 :         SWIG_fail;
   11793                 :       }
   11794              31 :       memcpy( (void*) tmpGCPList2, (void*) item, sizeof( GDAL_GCP ) );
   11795              31 :       ++tmpGCPList2;
   11796              31 :       Py_DECREF(o);
   11797                 :     }
   11798                 :   }
   11799              11 :   res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
   11800              11 :   if (!SWIG_IsOK(res4)) {
   11801               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_SetGCPs" "', argument " "4"" of type '" "char const *""'");
   11802                 :   }
   11803              11 :   arg4 = reinterpret_cast< char * >(buf4);
   11804                 :   {
   11805              11 :     if ( bUseExceptions ) {
   11806               0 :       CPLErrorReset();
   11807                 :     }
   11808              11 :     result = (CPLErr)GDALDatasetShadow_SetGCPs(arg1,arg2,(GDAL_GCP const *)arg3,(char const *)arg4);
   11809              11 :     if ( bUseExceptions ) {
   11810               0 :       CPLErr eclass = CPLGetLastErrorType();
   11811               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11812               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11813                 :       }
   11814                 :     }
   11815                 :   }
   11816              22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11817                 :   {
   11818                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   11819              11 :     if (arg3) {
   11820              11 :       free( (void*) arg3 );
   11821                 :     }
   11822                 :   }
   11823              11 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   11824                 :   {
   11825                 :     /* %typemap(ret) CPLErr */
   11826              11 :     if ( bUseExceptions == 0 ) {
   11827                 :       /* We're not using exceptions.  And no error has occurred */
   11828              11 :       if ( resultobj == 0 ) {
   11829                 :         /* No other return values set so return ErrorCode */
   11830               0 :         resultobj = PyInt_FromLong(result);
   11831                 :       }
   11832                 :     }
   11833                 :   }
   11834              11 :   return resultobj;
   11835                 : fail:
   11836                 :   {
   11837                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   11838               0 :     if (arg3) {
   11839               0 :       free( (void*) arg3 );
   11840                 :     }
   11841                 :   }
   11842               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   11843               0 :   return NULL;
   11844                 : }
   11845                 : 
   11846                 : 
   11847              17 : SWIGINTERN PyObject *_wrap_Dataset_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11848              17 :   PyObject *resultobj = 0;
   11849              17 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11850              17 :   void *argp1 = 0 ;
   11851              17 :   int res1 = 0 ;
   11852              17 :   PyObject * obj0 = 0 ;
   11853                 :   
   11854              17 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_FlushCache",&obj0)) SWIG_fail;
   11855              17 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11856              17 :   if (!SWIG_IsOK(res1)) {
   11857               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_FlushCache" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11858                 :   }
   11859              17 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11860                 :   {
   11861              17 :     if ( bUseExceptions ) {
   11862               0 :       CPLErrorReset();
   11863                 :     }
   11864                 :     GDALDatasetShadow_FlushCache(arg1);
   11865              17 :     if ( bUseExceptions ) {
   11866               0 :       CPLErr eclass = CPLGetLastErrorType();
   11867               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11868               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11869                 :       }
   11870                 :     }
   11871                 :   }
   11872              17 :   resultobj = SWIG_Py_Void();
   11873              17 :   return resultobj;
   11874                 : fail:
   11875               0 :   return NULL;
   11876                 : }
   11877                 : 
   11878                 : 
   11879               7 : SWIGINTERN PyObject *_wrap_Dataset_AddBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11880               7 :   PyObject *resultobj = 0;
   11881               7 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11882               7 :   GDALDataType arg2 = (GDALDataType) GDT_Byte ;
   11883               7 :   char **arg3 = (char **) 0 ;
   11884               7 :   void *argp1 = 0 ;
   11885               7 :   int res1 = 0 ;
   11886                 :   int val2 ;
   11887               7 :   int ecode2 = 0 ;
   11888               7 :   PyObject * obj0 = 0 ;
   11889               7 :   PyObject * obj1 = 0 ;
   11890               7 :   PyObject * obj2 = 0 ;
   11891                 :   char *  kwnames[] = {
   11892                 :     (char *) "self",(char *) "datatype",(char *) "options", NULL 
   11893               7 :   };
   11894                 :   CPLErr result;
   11895                 :   
   11896               7 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Dataset_AddBand",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   11897               7 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11898               7 :   if (!SWIG_IsOK(res1)) {
   11899               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11900                 :   }
   11901               7 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11902               7 :   if (obj1) {
   11903               7 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   11904               7 :     if (!SWIG_IsOK(ecode2)) {
   11905               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_AddBand" "', argument " "2"" of type '" "GDALDataType""'");
   11906                 :     } 
   11907               7 :     arg2 = static_cast< GDALDataType >(val2);
   11908                 :   }
   11909               7 :   if (obj2) {
   11910                 :     {
   11911                 :       /* %typemap(in) char **options */
   11912                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   11913               7 :       if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
   11914                 :   #if PY_VERSION_HEX < 0x03000000
   11915                 :         || PyString_Check(obj2)
   11916                 :   #endif
   11917                 :         ) {
   11918               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   11919               0 :         SWIG_fail;
   11920                 :       }
   11921                 :       
   11922               7 :       int size = PySequence_Size(obj2);
   11923              25 :       for (int i = 0; i < size; i++) {
   11924              18 :         PyObject* pyObj = PySequence_GetItem(obj2,i);
   11925              18 :         if (PyUnicode_Check(pyObj))
   11926                 :         {
   11927                 :           char *pszStr;
   11928                 :           Py_ssize_t nLen;
   11929               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   11930                 : #if PY_VERSION_HEX >= 0x03000000
   11931                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   11932                 : #else
   11933               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   11934                 : #endif
   11935               0 :           arg3 = CSLAddString( arg3, pszStr );
   11936               0 :           Py_XDECREF(pyUTF8Str);
   11937                 :         }
   11938                 : #if PY_VERSION_HEX >= 0x03000000
   11939                 :         else if (PyBytes_Check(pyObj))
   11940                 :         arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
   11941                 : #else
   11942              18 :         else if (PyString_Check(pyObj))
   11943              18 :         arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
   11944                 : #endif
   11945                 :         else
   11946                 :         {
   11947               0 :           Py_DECREF(pyObj);
   11948               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   11949               0 :           SWIG_fail;
   11950                 :         }
   11951              18 :         Py_DECREF(pyObj);
   11952                 :       }
   11953                 :     }
   11954                 :   }
   11955                 :   {
   11956               7 :     if ( bUseExceptions ) {
   11957               0 :       CPLErrorReset();
   11958                 :     }
   11959               7 :     result = (CPLErr)GDALDatasetShadow_AddBand(arg1,arg2,arg3);
   11960               7 :     if ( bUseExceptions ) {
   11961               0 :       CPLErr eclass = CPLGetLastErrorType();
   11962               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11963               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11964                 :       }
   11965                 :     }
   11966                 :   }
   11967              14 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11968                 :   {
   11969                 :     /* %typemap(freearg) char **options */
   11970               7 :     CSLDestroy( arg3 );
   11971                 :   }
   11972                 :   {
   11973                 :     /* %typemap(ret) CPLErr */
   11974               7 :     if ( bUseExceptions == 0 ) {
   11975                 :       /* We're not using exceptions.  And no error has occurred */
   11976               7 :       if ( resultobj == 0 ) {
   11977                 :         /* No other return values set so return ErrorCode */
   11978               0 :         resultobj = PyInt_FromLong(result);
   11979                 :       }
   11980                 :     }
   11981                 :   }
   11982               7 :   return resultobj;
   11983                 : fail:
   11984                 :   {
   11985                 :     /* %typemap(freearg) char **options */
   11986               0 :     CSLDestroy( arg3 );
   11987                 :   }
   11988               0 :   return NULL;
   11989                 : }
   11990                 : 
   11991                 : 
   11992              17 : SWIGINTERN PyObject *_wrap_Dataset_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11993              17 :   PyObject *resultobj = 0;
   11994              17 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11995                 :   int arg2 ;
   11996              17 :   void *argp1 = 0 ;
   11997              17 :   int res1 = 0 ;
   11998                 :   int val2 ;
   11999              17 :   int ecode2 = 0 ;
   12000              17 :   PyObject * obj0 = 0 ;
   12001              17 :   PyObject * obj1 = 0 ;
   12002                 :   CPLErr result;
   12003                 :   
   12004              17 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_CreateMaskBand",&obj0,&obj1)) SWIG_fail;
   12005              17 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12006              17 :   if (!SWIG_IsOK(res1)) {
   12007               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateMaskBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12008                 :   }
   12009              17 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12010              17 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12011              17 :   if (!SWIG_IsOK(ecode2)) {
   12012               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   12013                 :   } 
   12014              17 :   arg2 = static_cast< int >(val2);
   12015                 :   {
   12016              17 :     if ( bUseExceptions ) {
   12017               0 :       CPLErrorReset();
   12018                 :     }
   12019              17 :     result = (CPLErr)GDALDatasetShadow_CreateMaskBand(arg1,arg2);
   12020              17 :     if ( bUseExceptions ) {
   12021               0 :       CPLErr eclass = CPLGetLastErrorType();
   12022               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12023               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12024                 :       }
   12025                 :     }
   12026                 :   }
   12027              34 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12028                 :   {
   12029                 :     /* %typemap(ret) CPLErr */
   12030              17 :     if ( bUseExceptions == 0 ) {
   12031                 :       /* We're not using exceptions.  And no error has occurred */
   12032              17 :       if ( resultobj == 0 ) {
   12033                 :         /* No other return values set so return ErrorCode */
   12034               0 :         resultobj = PyInt_FromLong(result);
   12035                 :       }
   12036                 :     }
   12037                 :   }
   12038              17 :   return resultobj;
   12039                 : fail:
   12040               0 :   return NULL;
   12041                 : }
   12042                 : 
   12043                 : 
   12044              35 : SWIGINTERN PyObject *_wrap_Dataset_GetFileList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12045              35 :   PyObject *resultobj = 0;
   12046              35 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12047              35 :   void *argp1 = 0 ;
   12048              35 :   int res1 = 0 ;
   12049              35 :   PyObject * obj0 = 0 ;
   12050              35 :   char **result = 0 ;
   12051                 :   
   12052              35 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetFileList",&obj0)) SWIG_fail;
   12053              35 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12054              35 :   if (!SWIG_IsOK(res1)) {
   12055               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFileList" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12056                 :   }
   12057              35 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12058                 :   {
   12059              35 :     if ( bUseExceptions ) {
   12060               0 :       CPLErrorReset();
   12061                 :     }
   12062              35 :     result = (char **)GDALDatasetShadow_GetFileList(arg1);
   12063              35 :     if ( bUseExceptions ) {
   12064               0 :       CPLErr eclass = CPLGetLastErrorType();
   12065               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12066               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12067                 :       }
   12068                 :     }
   12069                 :   }
   12070                 :   {
   12071                 :     /* %typemap(out) char **CSL -> ( string ) */
   12072              35 :     char **stringarray = result;
   12073              35 :     if ( stringarray == NULL ) {
   12074               0 :       resultobj = Py_None;
   12075               0 :       Py_INCREF( resultobj );
   12076                 :     }
   12077                 :     else {
   12078              35 :       int len = CSLCount( stringarray );
   12079              35 :       resultobj = PyList_New( len );
   12080             103 :       for ( int i = 0; i < len; ++i ) {
   12081              68 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   12082              68 :         PyList_SetItem(resultobj, i, o );
   12083                 :       }
   12084                 :     }
   12085              35 :     CSLDestroy(result);
   12086                 :   }
   12087              35 :   return resultobj;
   12088                 : fail:
   12089               0 :   return NULL;
   12090                 : }
   12091                 : 
   12092                 : 
   12093          169078 : SWIGINTERN PyObject *_wrap_Dataset_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12094          169078 :   PyObject *resultobj = 0;
   12095          169078 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12096                 :   int arg2 ;
   12097                 :   int arg3 ;
   12098                 :   int arg4 ;
   12099                 :   int arg5 ;
   12100                 :   GIntBig arg6 ;
   12101          169078 :   char *arg7 = (char *) 0 ;
   12102          169078 :   int *arg8 = (int *) 0 ;
   12103          169078 :   int *arg9 = (int *) 0 ;
   12104          169078 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   12105          169078 :   int arg11 = (int) 0 ;
   12106          169078 :   int *arg12 = (int *) 0 ;
   12107          169078 :   int *arg13 = (int *) 0 ;
   12108          169078 :   int *arg14 = (int *) 0 ;
   12109          169078 :   int *arg15 = (int *) 0 ;
   12110          169078 :   void *argp1 = 0 ;
   12111          169078 :   int res1 = 0 ;
   12112                 :   int val2 ;
   12113          169078 :   int ecode2 = 0 ;
   12114                 :   int val3 ;
   12115          169078 :   int ecode3 = 0 ;
   12116                 :   int val4 ;
   12117          169078 :   int ecode4 = 0 ;
   12118                 :   int val5 ;
   12119          169078 :   int ecode5 = 0 ;
   12120          169078 :   int alloc6 = 0 ;
   12121                 :   int val8 ;
   12122                 :   int val9 ;
   12123                 :   int val10 ;
   12124                 :   int val13 ;
   12125                 :   int val14 ;
   12126                 :   int val15 ;
   12127          169078 :   PyObject * obj0 = 0 ;
   12128          169078 :   PyObject * obj1 = 0 ;
   12129          169078 :   PyObject * obj2 = 0 ;
   12130          169078 :   PyObject * obj3 = 0 ;
   12131          169078 :   PyObject * obj4 = 0 ;
   12132          169078 :   PyObject * obj5 = 0 ;
   12133          169078 :   PyObject * obj6 = 0 ;
   12134          169078 :   PyObject * obj7 = 0 ;
   12135          169078 :   PyObject * obj8 = 0 ;
   12136          169078 :   PyObject * obj9 = 0 ;
   12137          169078 :   PyObject * obj10 = 0 ;
   12138          169078 :   PyObject * obj11 = 0 ;
   12139          169078 :   PyObject * obj12 = 0 ;
   12140                 :   char *  kwnames[] = {
   12141                 :     (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 
   12142          169078 :   };
   12143                 :   CPLErr result;
   12144                 :   
   12145          169078 :   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;
   12146          169078 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12147          169078 :   if (!SWIG_IsOK(res1)) {
   12148               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_WriteRaster" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12149                 :   }
   12150          169078 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12151          169078 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12152          169078 :   if (!SWIG_IsOK(ecode2)) {
   12153               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_WriteRaster" "', argument " "2"" of type '" "int""'");
   12154                 :   } 
   12155          169078 :   arg2 = static_cast< int >(val2);
   12156          169078 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   12157          169078 :   if (!SWIG_IsOK(ecode3)) {
   12158               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_WriteRaster" "', argument " "3"" of type '" "int""'");
   12159                 :   } 
   12160          169078 :   arg3 = static_cast< int >(val3);
   12161          169078 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   12162          169078 :   if (!SWIG_IsOK(ecode4)) {
   12163               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_WriteRaster" "', argument " "4"" of type '" "int""'");
   12164                 :   } 
   12165          169078 :   arg4 = static_cast< int >(val4);
   12166          169078 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   12167          169078 :   if (!SWIG_IsOK(ecode5)) {
   12168               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_WriteRaster" "', argument " "5"" of type '" "int""'");
   12169                 :   } 
   12170          169078 :   arg5 = static_cast< int >(val5);
   12171                 :   {
   12172                 :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   12173                 : #if PY_VERSION_HEX>=0x03000000
   12174                 :     if (PyUnicode_Check(obj5))
   12175                 :     {
   12176                 :       size_t safeLen = 0;
   12177                 :       int ret = SWIG_AsCharPtrAndSize(obj5, (char**) &arg7, &safeLen, &alloc6);
   12178                 :       if (!SWIG_IsOK(ret)) {
   12179                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
   12180                 :       }
   12181                 :       
   12182                 :       if (safeLen) safeLen--;
   12183                 :       arg6 = (GIntBig) safeLen;
   12184                 :     }
   12185                 :     else if (PyBytes_Check(obj5))
   12186                 :     {
   12187                 :       Py_ssize_t safeLen = 0;
   12188                 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12189                 :       arg6 = (GIntBig) safeLen;
   12190                 :     }
   12191                 :     else
   12192                 :     {
   12193                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
   12194                 :       SWIG_fail;
   12195                 :     }
   12196                 : #else
   12197          169078 :     if (PyString_Check(obj5))
   12198                 :     {
   12199          169077 :       Py_ssize_t safeLen = 0;
   12200          169077 :       PyString_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12201          169077 :       arg6 = (GIntBig) safeLen;
   12202                 :     }
   12203                 :     else
   12204                 :     {
   12205               1 :       PyErr_SetString(PyExc_TypeError, "not a string");
   12206               1 :       SWIG_fail;
   12207                 :     }
   12208                 : #endif
   12209                 :   }
   12210          169077 :   if (obj6) {
   12211                 :     {
   12212                 :       /* %typemap(in) (int *optional_##int) */
   12213          169077 :       if ( obj6 == Py_None ) {
   12214               0 :         arg8 = 0;
   12215                 :       }
   12216          169077 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   12217          169077 :         arg8 = (int *) &val8;
   12218                 :       }
   12219                 :       else {
   12220               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12221               0 :         SWIG_fail;
   12222                 :       }
   12223                 :     }
   12224                 :   }
   12225          169077 :   if (obj7) {
   12226                 :     {
   12227                 :       /* %typemap(in) (int *optional_##int) */
   12228          169077 :       if ( obj7 == Py_None ) {
   12229               0 :         arg9 = 0;
   12230                 :       }
   12231          169077 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   12232          169077 :         arg9 = (int *) &val9;
   12233                 :       }
   12234                 :       else {
   12235               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12236               0 :         SWIG_fail;
   12237                 :       }
   12238                 :     }
   12239                 :   }
   12240          169077 :   if (obj8) {
   12241                 :     {
   12242                 :       /* %typemap(in) (int *optional_##int) */
   12243          169077 :       if ( obj8 == Py_None ) {
   12244               0 :         arg10 = 0;
   12245                 :       }
   12246          169077 :       else if ( PyArg_Parse( obj8,"i" ,&val10 ) ) {
   12247          169077 :         arg10 = (GDALDataType *) &val10;
   12248                 :       }
   12249                 :       else {
   12250               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12251               0 :         SWIG_fail;
   12252                 :       }
   12253                 :     }
   12254                 :   }
   12255          169077 :   if (obj9) {
   12256                 :     {
   12257                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   12258                 :       /* check if is List */
   12259          169077 :       if ( !PySequence_Check(obj9) ) {
   12260               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   12261               0 :         SWIG_fail;
   12262                 :       }
   12263          169077 :       arg11 = PySequence_Size(obj9);
   12264          169077 :       arg12 = (int*) malloc(arg11*sizeof(int));
   12265          339563 :       for( int i = 0; i<arg11; i++ ) {
   12266          170486 :         PyObject *o = PySequence_GetItem(obj9,i);
   12267          170486 :         if ( !PyArg_Parse(o,"i",&arg12[i]) ) {
   12268               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   12269               0 :           Py_DECREF(o);
   12270                 :           SWIG_fail;
   12271                 :         }
   12272          170486 :         Py_DECREF(o);
   12273                 :       }
   12274                 :     }
   12275                 :   }
   12276          169077 :   if (obj10) {
   12277                 :     {
   12278                 :       /* %typemap(in) (int *optional_##int) */
   12279          169077 :       if ( obj10 == Py_None ) {
   12280          169077 :         arg13 = 0;
   12281                 :       }
   12282               0 :       else if ( PyArg_Parse( obj10,"i" ,&val13 ) ) {
   12283               0 :         arg13 = (int *) &val13;
   12284                 :       }
   12285                 :       else {
   12286               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12287               0 :         SWIG_fail;
   12288                 :       }
   12289                 :     }
   12290                 :   }
   12291          169077 :   if (obj11) {
   12292                 :     {
   12293                 :       /* %typemap(in) (int *optional_##int) */
   12294          169077 :       if ( obj11 == Py_None ) {
   12295          169077 :         arg14 = 0;
   12296                 :       }
   12297               0 :       else if ( PyArg_Parse( obj11,"i" ,&val14 ) ) {
   12298               0 :         arg14 = (int *) &val14;
   12299                 :       }
   12300                 :       else {
   12301               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12302               0 :         SWIG_fail;
   12303                 :       }
   12304                 :     }
   12305                 :   }
   12306          169077 :   if (obj12) {
   12307                 :     {
   12308                 :       /* %typemap(in) (int *optional_##int) */
   12309          169077 :       if ( obj12 == Py_None ) {
   12310          169077 :         arg15 = 0;
   12311                 :       }
   12312               0 :       else if ( PyArg_Parse( obj12,"i" ,&val15 ) ) {
   12313               0 :         arg15 = (int *) &val15;
   12314                 :       }
   12315                 :       else {
   12316               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12317               0 :         SWIG_fail;
   12318                 :       }
   12319                 :     }
   12320                 :   }
   12321                 :   {
   12322          169077 :     if ( bUseExceptions ) {
   12323               0 :       CPLErrorReset();
   12324                 :     }
   12325          169077 :     result = (CPLErr)GDALDatasetShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   12326          169077 :     if ( bUseExceptions ) {
   12327               0 :       CPLErr eclass = CPLGetLastErrorType();
   12328               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12329               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12330                 :       }
   12331                 :     }
   12332                 :   }
   12333          338154 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12334                 :   {
   12335                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   12336          169077 :     if( alloc6 == SWIG_NEWOBJ ) {
   12337               0 :       delete[] arg7;
   12338                 :     }
   12339                 :   }
   12340                 :   {
   12341                 :     /* %typemap(freearg) (int nList, int* pList) */
   12342          169077 :     if (arg12) {
   12343          169077 :       free((void*) arg12);
   12344                 :     }
   12345                 :   }
   12346                 :   {
   12347                 :     /* %typemap(ret) CPLErr */
   12348          169077 :     if ( bUseExceptions == 0 ) {
   12349                 :       /* We're not using exceptions.  And no error has occurred */
   12350          169077 :       if ( resultobj == 0 ) {
   12351                 :         /* No other return values set so return ErrorCode */
   12352               0 :         resultobj = PyInt_FromLong(result);
   12353                 :       }
   12354                 :     }
   12355                 :   }
   12356          169077 :   return resultobj;
   12357                 : fail:
   12358                 :   {
   12359                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   12360               1 :     if( alloc6 == SWIG_NEWOBJ ) {
   12361               0 :       delete[] arg7;
   12362                 :     }
   12363                 :   }
   12364                 :   {
   12365                 :     /* %typemap(freearg) (int nList, int* pList) */
   12366               1 :     if (arg12) {
   12367               0 :       free((void*) arg12);
   12368                 :     }
   12369                 :   }
   12370               1 :   return NULL;
   12371                 : }
   12372                 : 
   12373                 : 
   12374               1 : SWIGINTERN PyObject *_wrap_Dataset_BeginAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12375               1 :   PyObject *resultobj = 0;
   12376               1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12377                 :   int arg2 ;
   12378                 :   int arg3 ;
   12379                 :   int arg4 ;
   12380                 :   int arg5 ;
   12381                 :   int arg6 ;
   12382               1 :   char *arg7 = (char *) 0 ;
   12383               1 :   void *arg8 = (void *) 0 ;
   12384                 :   int arg9 ;
   12385                 :   int arg10 ;
   12386               1 :   GDALDataType arg11 = (GDALDataType) (GDALDataType) 0 ;
   12387               1 :   int arg12 = (int) 0 ;
   12388               1 :   int *arg13 = (int *) 0 ;
   12389               1 :   int arg14 = (int) 0 ;
   12390               1 :   int arg15 = (int) 0 ;
   12391               1 :   int arg16 = (int) 0 ;
   12392               1 :   char **arg17 = (char **) 0 ;
   12393               1 :   void *argp1 = 0 ;
   12394               1 :   int res1 = 0 ;
   12395                 :   int val2 ;
   12396               1 :   int ecode2 = 0 ;
   12397                 :   int val3 ;
   12398               1 :   int ecode3 = 0 ;
   12399                 :   int val4 ;
   12400               1 :   int ecode4 = 0 ;
   12401                 :   int val5 ;
   12402               1 :   int ecode5 = 0 ;
   12403                 :   int val9 ;
   12404               1 :   int ecode9 = 0 ;
   12405                 :   int val10 ;
   12406               1 :   int ecode10 = 0 ;
   12407                 :   int val11 ;
   12408               1 :   int ecode11 = 0 ;
   12409                 :   int val14 ;
   12410               1 :   int ecode14 = 0 ;
   12411                 :   int val15 ;
   12412               1 :   int ecode15 = 0 ;
   12413                 :   int val16 ;
   12414               1 :   int ecode16 = 0 ;
   12415               1 :   PyObject * obj0 = 0 ;
   12416               1 :   PyObject * obj1 = 0 ;
   12417               1 :   PyObject * obj2 = 0 ;
   12418               1 :   PyObject * obj3 = 0 ;
   12419               1 :   PyObject * obj4 = 0 ;
   12420               1 :   PyObject * obj5 = 0 ;
   12421               1 :   PyObject * obj6 = 0 ;
   12422               1 :   PyObject * obj7 = 0 ;
   12423               1 :   PyObject * obj8 = 0 ;
   12424               1 :   PyObject * obj9 = 0 ;
   12425               1 :   PyObject * obj10 = 0 ;
   12426               1 :   PyObject * obj11 = 0 ;
   12427               1 :   PyObject * obj12 = 0 ;
   12428               1 :   PyObject * obj13 = 0 ;
   12429                 :   char *  kwnames[] = {
   12430                 :     (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 
   12431               1 :   };
   12432               1 :   GDALAsyncReaderShadow *result = 0 ;
   12433                 :   
   12434               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;
   12435               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12436               1 :   if (!SWIG_IsOK(res1)) {
   12437               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BeginAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12438                 :   }
   12439               1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12440               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12441               1 :   if (!SWIG_IsOK(ecode2)) {
   12442               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_BeginAsyncReader" "', argument " "2"" of type '" "int""'");
   12443                 :   } 
   12444               1 :   arg2 = static_cast< int >(val2);
   12445               1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   12446               1 :   if (!SWIG_IsOK(ecode3)) {
   12447               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_BeginAsyncReader" "', argument " "3"" of type '" "int""'");
   12448                 :   } 
   12449               1 :   arg3 = static_cast< int >(val3);
   12450               1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   12451               1 :   if (!SWIG_IsOK(ecode4)) {
   12452               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_BeginAsyncReader" "', argument " "4"" of type '" "int""'");
   12453                 :   } 
   12454               1 :   arg4 = static_cast< int >(val4);
   12455               1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   12456               1 :   if (!SWIG_IsOK(ecode5)) {
   12457               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_BeginAsyncReader" "', argument " "5"" of type '" "int""'");
   12458                 :   } 
   12459               1 :   arg5 = static_cast< int >(val5);
   12460                 :   {
   12461                 :     /* %typemap(in,numinputs=1) (int nLenKeepObject, char *pBufKeepObject, void* pyObject) */
   12462                 : #if PY_VERSION_HEX>=0x03000000
   12463                 :     if (PyBytes_Check(obj5))
   12464                 :     {
   12465                 :       Py_ssize_t safeLen = 0;
   12466                 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12467                 :       arg6 = (int) safeLen;
   12468                 :       arg8 = obj5;
   12469                 :     }
   12470                 :     else
   12471                 :     {
   12472                 :       PyErr_SetString(PyExc_TypeError, "not a bytes");
   12473                 :       SWIG_fail;
   12474                 :     }
   12475                 : #else
   12476               1 :     if (PyString_Check(obj5))
   12477                 :     {
   12478               1 :       Py_ssize_t safeLen = 0;
   12479               1 :       PyString_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12480               1 :       arg6 = (int) safeLen;
   12481               1 :       arg8 = obj5;
   12482                 :     }
   12483                 :     else
   12484                 :     {
   12485               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
   12486               0 :       SWIG_fail;
   12487                 :     }
   12488                 : #endif
   12489                 :   }
   12490               1 :   ecode9 = SWIG_AsVal_int(obj6, &val9);
   12491               1 :   if (!SWIG_IsOK(ecode9)) {
   12492               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Dataset_BeginAsyncReader" "', argument " "9"" of type '" "int""'");
   12493                 :   } 
   12494               1 :   arg9 = static_cast< int >(val9);
   12495               1 :   ecode10 = SWIG_AsVal_int(obj7, &val10);
   12496               1 :   if (!SWIG_IsOK(ecode10)) {
   12497               0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Dataset_BeginAsyncReader" "', argument " "10"" of type '" "int""'");
   12498                 :   } 
   12499               1 :   arg10 = static_cast< int >(val10);
   12500               1 :   if (obj8) {
   12501               1 :     ecode11 = SWIG_AsVal_int(obj8, &val11);
   12502               1 :     if (!SWIG_IsOK(ecode11)) {
   12503               0 :       SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Dataset_BeginAsyncReader" "', argument " "11"" of type '" "GDALDataType""'");
   12504                 :     } 
   12505               1 :     arg11 = static_cast< GDALDataType >(val11);
   12506                 :   }
   12507               1 :   if (obj9) {
   12508                 :     {
   12509                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   12510                 :       /* check if is List */
   12511               1 :       if ( !PySequence_Check(obj9) ) {
   12512               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   12513               0 :         SWIG_fail;
   12514                 :       }
   12515               1 :       arg12 = PySequence_Size(obj9);
   12516               1 :       arg13 = (int*) malloc(arg12*sizeof(int));
   12517               4 :       for( int i = 0; i<arg12; i++ ) {
   12518               3 :         PyObject *o = PySequence_GetItem(obj9,i);
   12519               3 :         if ( !PyArg_Parse(o,"i",&arg13[i]) ) {
   12520               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   12521               0 :           Py_DECREF(o);
   12522                 :           SWIG_fail;
   12523                 :         }
   12524               3 :         Py_DECREF(o);
   12525                 :       }
   12526                 :     }
   12527                 :   }
   12528               1 :   if (obj10) {
   12529               1 :     ecode14 = SWIG_AsVal_int(obj10, &val14);
   12530               1 :     if (!SWIG_IsOK(ecode14)) {
   12531               0 :       SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_BeginAsyncReader" "', argument " "14"" of type '" "int""'");
   12532                 :     } 
   12533               1 :     arg14 = static_cast< int >(val14);
   12534                 :   }
   12535               1 :   if (obj11) {
   12536               1 :     ecode15 = SWIG_AsVal_int(obj11, &val15);
   12537               1 :     if (!SWIG_IsOK(ecode15)) {
   12538               0 :       SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "Dataset_BeginAsyncReader" "', argument " "15"" of type '" "int""'");
   12539                 :     } 
   12540               1 :     arg15 = static_cast< int >(val15);
   12541                 :   }
   12542               1 :   if (obj12) {
   12543               1 :     ecode16 = SWIG_AsVal_int(obj12, &val16);
   12544               1 :     if (!SWIG_IsOK(ecode16)) {
   12545               0 :       SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "Dataset_BeginAsyncReader" "', argument " "16"" of type '" "int""'");
   12546                 :     } 
   12547               1 :     arg16 = static_cast< int >(val16);
   12548                 :   }
   12549               1 :   if (obj13) {
   12550                 :     {
   12551                 :       /* %typemap(in) char **options */
   12552                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   12553               1 :       if ( ! PySequence_Check(obj13) || PyUnicode_Check(obj13)
   12554                 :   #if PY_VERSION_HEX < 0x03000000
   12555                 :         || PyString_Check(obj13)
   12556                 :   #endif
   12557                 :         ) {
   12558               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   12559               0 :         SWIG_fail;
   12560                 :       }
   12561                 :       
   12562               1 :       int size = PySequence_Size(obj13);
   12563               1 :       for (int i = 0; i < size; i++) {
   12564               0 :         PyObject* pyObj = PySequence_GetItem(obj13,i);
   12565               0 :         if (PyUnicode_Check(pyObj))
   12566                 :         {
   12567                 :           char *pszStr;
   12568                 :           Py_ssize_t nLen;
   12569               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   12570                 : #if PY_VERSION_HEX >= 0x03000000
   12571                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12572                 : #else
   12573               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12574                 : #endif
   12575               0 :           arg17 = CSLAddString( arg17, pszStr );
   12576               0 :           Py_XDECREF(pyUTF8Str);
   12577                 :         }
   12578                 : #if PY_VERSION_HEX >= 0x03000000
   12579                 :         else if (PyBytes_Check(pyObj))
   12580                 :         arg17 = CSLAddString( arg17, PyBytes_AsString(pyObj) );
   12581                 : #else
   12582               0 :         else if (PyString_Check(pyObj))
   12583               0 :         arg17 = CSLAddString( arg17, PyString_AsString(pyObj) );
   12584                 : #endif
   12585                 :         else
   12586                 :         {
   12587               0 :           Py_DECREF(pyObj);
   12588               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   12589               0 :           SWIG_fail;
   12590                 :         }
   12591               0 :         Py_DECREF(pyObj);
   12592                 :       }
   12593                 :     }
   12594                 :   }
   12595                 :   {
   12596               1 :     if ( bUseExceptions ) {
   12597               0 :       CPLErrorReset();
   12598                 :     }
   12599               1 :     result = (GDALAsyncReaderShadow *)GDALDatasetShadow_BeginAsyncReader(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
   12600               1 :     if ( bUseExceptions ) {
   12601               0 :       CPLErr eclass = CPLGetLastErrorType();
   12602               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12603               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12604                 :       }
   12605                 :     }
   12606                 :   }
   12607               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_OWN |  0 );
   12608                 :   {
   12609                 :     /* %typemap(freearg) (int nList, int* pList) */
   12610               1 :     if (arg13) {
   12611               1 :       free((void*) arg13);
   12612                 :     }
   12613                 :   }
   12614                 :   {
   12615                 :     /* %typemap(freearg) char **options */
   12616               1 :     CSLDestroy( arg17 );
   12617                 :   }
   12618               1 :   return resultobj;
   12619                 : fail:
   12620                 :   {
   12621                 :     /* %typemap(freearg) (int nList, int* pList) */
   12622               0 :     if (arg13) {
   12623               0 :       free((void*) arg13);
   12624                 :     }
   12625                 :   }
   12626                 :   {
   12627                 :     /* %typemap(freearg) char **options */
   12628               0 :     CSLDestroy( arg17 );
   12629                 :   }
   12630               0 :   return NULL;
   12631                 : }
   12632                 : 
   12633                 : 
   12634               1 : SWIGINTERN PyObject *_wrap_Dataset_EndAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12635               1 :   PyObject *resultobj = 0;
   12636               1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12637               1 :   GDALAsyncReaderShadow *arg2 = (GDALAsyncReaderShadow *) 0 ;
   12638               1 :   void *argp1 = 0 ;
   12639               1 :   int res1 = 0 ;
   12640               1 :   void *argp2 = 0 ;
   12641               1 :   int res2 = 0 ;
   12642               1 :   PyObject * obj0 = 0 ;
   12643               1 :   PyObject * obj1 = 0 ;
   12644                 :   
   12645               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_EndAsyncReader",&obj0,&obj1)) SWIG_fail;
   12646               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12647               1 :   if (!SWIG_IsOK(res1)) {
   12648               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_EndAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12649                 :   }
   12650               1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12651               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   12652               1 :   if (!SWIG_IsOK(res2)) {
   12653               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_EndAsyncReader" "', argument " "2"" of type '" "GDALAsyncReaderShadow *""'"); 
   12654                 :   }
   12655               1 :   arg2 = reinterpret_cast< GDALAsyncReaderShadow * >(argp2);
   12656                 :   {
   12657               1 :     if ( bUseExceptions ) {
   12658               0 :       CPLErrorReset();
   12659                 :     }
   12660                 :     GDALDatasetShadow_EndAsyncReader(arg1,arg2);
   12661               1 :     if ( bUseExceptions ) {
   12662               0 :       CPLErr eclass = CPLGetLastErrorType();
   12663               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12664               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12665                 :       }
   12666                 :     }
   12667                 :   }
   12668               1 :   resultobj = SWIG_Py_Void();
   12669               1 :   return resultobj;
   12670                 : fail:
   12671               0 :   return NULL;
   12672                 : }
   12673                 : 
   12674                 : 
   12675          167641 : SWIGINTERN PyObject *_wrap_Dataset_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12676          167641 :   PyObject *resultobj = 0;
   12677          167641 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12678                 :   int arg2 ;
   12679                 :   int arg3 ;
   12680                 :   int arg4 ;
   12681                 :   int arg5 ;
   12682          167641 :   void **arg6 = (void **) 0 ;
   12683          167641 :   int *arg7 = (int *) 0 ;
   12684          167641 :   int *arg8 = (int *) 0 ;
   12685          167641 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   12686          167641 :   int arg10 = (int) 0 ;
   12687          167641 :   int *arg11 = (int *) 0 ;
   12688          167641 :   int *arg12 = (int *) 0 ;
   12689          167641 :   int *arg13 = (int *) 0 ;
   12690          167641 :   int *arg14 = (int *) 0 ;
   12691          167641 :   void *argp1 = 0 ;
   12692          167641 :   int res1 = 0 ;
   12693                 :   int val2 ;
   12694          167641 :   int ecode2 = 0 ;
   12695                 :   int val3 ;
   12696          167641 :   int ecode3 = 0 ;
   12697                 :   int val4 ;
   12698          167641 :   int ecode4 = 0 ;
   12699                 :   int val5 ;
   12700          167641 :   int ecode5 = 0 ;
   12701          167641 :   void *pyObject6 = NULL ;
   12702                 :   int val7 ;
   12703                 :   int val8 ;
   12704                 :   int val9 ;
   12705                 :   int val12 ;
   12706                 :   int val13 ;
   12707                 :   int val14 ;
   12708          167641 :   PyObject * obj0 = 0 ;
   12709          167641 :   PyObject * obj1 = 0 ;
   12710          167641 :   PyObject * obj2 = 0 ;
   12711          167641 :   PyObject * obj3 = 0 ;
   12712          167641 :   PyObject * obj4 = 0 ;
   12713          167641 :   PyObject * obj5 = 0 ;
   12714          167641 :   PyObject * obj6 = 0 ;
   12715          167641 :   PyObject * obj7 = 0 ;
   12716          167641 :   PyObject * obj8 = 0 ;
   12717          167641 :   PyObject * obj9 = 0 ;
   12718          167641 :   PyObject * obj10 = 0 ;
   12719          167641 :   PyObject * obj11 = 0 ;
   12720                 :   char *  kwnames[] = {
   12721                 :     (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 
   12722          167641 :   };
   12723                 :   CPLErr result;
   12724                 :   
   12725                 :   {
   12726                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   12727          167641 :     arg6 = &pyObject6;
   12728                 :   }
   12729          167641 :   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;
   12730          167641 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12731          167641 :   if (!SWIG_IsOK(res1)) {
   12732               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReadRaster1" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12733                 :   }
   12734          167641 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12735          167641 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12736          167641 :   if (!SWIG_IsOK(ecode2)) {
   12737               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_ReadRaster1" "', argument " "2"" of type '" "int""'");
   12738                 :   } 
   12739          167641 :   arg2 = static_cast< int >(val2);
   12740          167641 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   12741          167641 :   if (!SWIG_IsOK(ecode3)) {
   12742               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_ReadRaster1" "', argument " "3"" of type '" "int""'");
   12743                 :   } 
   12744          167641 :   arg3 = static_cast< int >(val3);
   12745          167641 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   12746          167641 :   if (!SWIG_IsOK(ecode4)) {
   12747               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_ReadRaster1" "', argument " "4"" of type '" "int""'");
   12748                 :   } 
   12749          167641 :   arg4 = static_cast< int >(val4);
   12750          167641 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   12751          167641 :   if (!SWIG_IsOK(ecode5)) {
   12752               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_ReadRaster1" "', argument " "5"" of type '" "int""'");
   12753                 :   } 
   12754          167641 :   arg5 = static_cast< int >(val5);
   12755          167641 :   if (obj5) {
   12756                 :     {
   12757                 :       /* %typemap(in) (int *optional_##int) */
   12758          167641 :       if ( obj5 == Py_None ) {
   12759               0 :         arg7 = 0;
   12760                 :       }
   12761          167641 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   12762          167641 :         arg7 = (int *) &val7;
   12763                 :       }
   12764                 :       else {
   12765               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12766               0 :         SWIG_fail;
   12767                 :       }
   12768                 :     }
   12769                 :   }
   12770          167641 :   if (obj6) {
   12771                 :     {
   12772                 :       /* %typemap(in) (int *optional_##int) */
   12773          167641 :       if ( obj6 == Py_None ) {
   12774               0 :         arg8 = 0;
   12775                 :       }
   12776          167641 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   12777          167641 :         arg8 = (int *) &val8;
   12778                 :       }
   12779                 :       else {
   12780               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12781               0 :         SWIG_fail;
   12782                 :       }
   12783                 :     }
   12784                 :   }
   12785          167641 :   if (obj7) {
   12786                 :     {
   12787                 :       /* %typemap(in) (int *optional_##int) */
   12788          167641 :       if ( obj7 == Py_None ) {
   12789               0 :         arg9 = 0;
   12790                 :       }
   12791          167641 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   12792          167641 :         arg9 = (GDALDataType *) &val9;
   12793                 :       }
   12794                 :       else {
   12795               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12796               0 :         SWIG_fail;
   12797                 :       }
   12798                 :     }
   12799                 :   }
   12800          167641 :   if (obj8) {
   12801                 :     {
   12802                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   12803                 :       /* check if is List */
   12804          167641 :       if ( !PySequence_Check(obj8) ) {
   12805               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   12806               0 :         SWIG_fail;
   12807                 :       }
   12808          167641 :       arg10 = PySequence_Size(obj8);
   12809          167641 :       arg11 = (int*) malloc(arg10*sizeof(int));
   12810          335297 :       for( int i = 0; i<arg10; i++ ) {
   12811          167656 :         PyObject *o = PySequence_GetItem(obj8,i);
   12812          167656 :         if ( !PyArg_Parse(o,"i",&arg11[i]) ) {
   12813               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   12814               0 :           Py_DECREF(o);
   12815                 :           SWIG_fail;
   12816                 :         }
   12817          167656 :         Py_DECREF(o);
   12818                 :       }
   12819                 :     }
   12820                 :   }
   12821          167641 :   if (obj9) {
   12822                 :     {
   12823                 :       /* %typemap(in) (int *optional_##int) */
   12824          167641 :       if ( obj9 == Py_None ) {
   12825          167641 :         arg12 = 0;
   12826                 :       }
   12827               0 :       else if ( PyArg_Parse( obj9,"i" ,&val12 ) ) {
   12828               0 :         arg12 = (int *) &val12;
   12829                 :       }
   12830                 :       else {
   12831               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12832               0 :         SWIG_fail;
   12833                 :       }
   12834                 :     }
   12835                 :   }
   12836          167641 :   if (obj10) {
   12837                 :     {
   12838                 :       /* %typemap(in) (int *optional_##int) */
   12839          167641 :       if ( obj10 == Py_None ) {
   12840          167641 :         arg13 = 0;
   12841                 :       }
   12842               0 :       else if ( PyArg_Parse( obj10,"i" ,&val13 ) ) {
   12843               0 :         arg13 = (int *) &val13;
   12844                 :       }
   12845                 :       else {
   12846               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12847               0 :         SWIG_fail;
   12848                 :       }
   12849                 :     }
   12850                 :   }
   12851          167641 :   if (obj11) {
   12852                 :     {
   12853                 :       /* %typemap(in) (int *optional_##int) */
   12854          167641 :       if ( obj11 == Py_None ) {
   12855          167641 :         arg14 = 0;
   12856                 :       }
   12857               0 :       else if ( PyArg_Parse( obj11,"i" ,&val14 ) ) {
   12858               0 :         arg14 = (int *) &val14;
   12859                 :       }
   12860                 :       else {
   12861               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12862               0 :         SWIG_fail;
   12863                 :       }
   12864                 :     }
   12865                 :   }
   12866                 :   {
   12867          167641 :     if ( bUseExceptions ) {
   12868               0 :       CPLErrorReset();
   12869                 :     }
   12870          167641 :     result = (CPLErr)GDALDatasetShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
   12871          167641 :     if ( bUseExceptions ) {
   12872               0 :       CPLErr eclass = CPLGetLastErrorType();
   12873               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12874               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12875                 :       }
   12876                 :     }
   12877                 :   }
   12878          335282 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12879                 :   {
   12880                 :     /* %typemap(argout) ( void **outPythonObject ) */
   12881          167641 :     Py_XDECREF(resultobj);
   12882          167641 :     if (*arg6)
   12883                 :     {
   12884          167638 :       resultobj = (PyObject*)*arg6;
   12885                 :     }
   12886                 :     else
   12887                 :     {
   12888               3 :       resultobj = Py_None;
   12889               3 :       Py_INCREF(resultobj);
   12890                 :     }
   12891                 :   }
   12892                 :   {
   12893                 :     /* %typemap(freearg) (int nList, int* pList) */
   12894          167641 :     if (arg11) {
   12895          167641 :       free((void*) arg11);
   12896                 :     }
   12897                 :   }
   12898                 :   {
   12899                 :     /* %typemap(ret) CPLErr */
   12900          167641 :     if ( bUseExceptions == 0 ) {
   12901                 :       /* We're not using exceptions.  And no error has occurred */
   12902          167641 :       if ( resultobj == 0 ) {
   12903                 :         /* No other return values set so return ErrorCode */
   12904               0 :         resultobj = PyInt_FromLong(result);
   12905                 :       }
   12906                 :     }
   12907                 :   }
   12908          167641 :   return resultobj;
   12909                 : fail:
   12910                 :   {
   12911                 :     /* %typemap(freearg) (int nList, int* pList) */
   12912               0 :     if (arg11) {
   12913               0 :       free((void*) arg11);
   12914                 :     }
   12915                 :   }
   12916               0 :   return NULL;
   12917                 : }
   12918                 : 
   12919                 : 
   12920               6 : SWIGINTERN PyObject *Dataset_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12921                 :   PyObject *obj;
   12922               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   12923               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDatasetShadow, SWIG_NewClientData(obj));
   12924               6 :   return SWIG_Py_Void();
   12925                 : }
   12926                 : 
   12927             306 : SWIGINTERN PyObject *_wrap_Band_XSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12928             306 :   PyObject *resultobj = 0;
   12929             306 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   12930             306 :   void *argp1 = 0 ;
   12931             306 :   int res1 = 0 ;
   12932             306 :   PyObject * obj0 = 0 ;
   12933                 :   int result;
   12934                 :   
   12935             306 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_XSize_get",&obj0)) SWIG_fail;
   12936             306 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   12937             306 :   if (!SWIG_IsOK(res1)) {
   12938               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_XSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   12939                 :   }
   12940             306 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   12941                 :   {
   12942             306 :     if ( bUseExceptions ) {
   12943               0 :       CPLErrorReset();
   12944                 :     }
   12945             306 :     result = (int)GDALRasterBandShadow_XSize_get(arg1);
   12946             306 :     if ( bUseExceptions ) {
   12947               0 :       CPLErr eclass = CPLGetLastErrorType();
   12948               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12949               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12950                 :       }
   12951                 :     }
   12952                 :   }
   12953             306 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12954             306 :   return resultobj;
   12955                 : fail:
   12956               0 :   return NULL;
   12957                 : }
   12958                 : 
   12959                 : 
   12960             267 : SWIGINTERN PyObject *_wrap_Band_YSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12961             267 :   PyObject *resultobj = 0;
   12962             267 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   12963             267 :   void *argp1 = 0 ;
   12964             267 :   int res1 = 0 ;
   12965             267 :   PyObject * obj0 = 0 ;
   12966                 :   int result;
   12967                 :   
   12968             267 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_YSize_get",&obj0)) SWIG_fail;
   12969             267 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   12970             267 :   if (!SWIG_IsOK(res1)) {
   12971               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_YSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   12972                 :   }
   12973             267 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   12974                 :   {
   12975             267 :     if ( bUseExceptions ) {
   12976               0 :       CPLErrorReset();
   12977                 :     }
   12978             267 :     result = (int)GDALRasterBandShadow_YSize_get(arg1);
   12979             267 :     if ( bUseExceptions ) {
   12980               0 :       CPLErr eclass = CPLGetLastErrorType();
   12981               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12982               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12983                 :       }
   12984                 :     }
   12985                 :   }
   12986             267 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12987             267 :   return resultobj;
   12988                 : fail:
   12989               0 :   return NULL;
   12990                 : }
   12991                 : 
   12992                 : 
   12993             598 : SWIGINTERN PyObject *_wrap_Band_DataType_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12994             598 :   PyObject *resultobj = 0;
   12995             598 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   12996             598 :   void *argp1 = 0 ;
   12997             598 :   int res1 = 0 ;
   12998             598 :   PyObject * obj0 = 0 ;
   12999                 :   GDALDataType result;
   13000                 :   
   13001             598 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_DataType_get",&obj0)) SWIG_fail;
   13002             598 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13003             598 :   if (!SWIG_IsOK(res1)) {
   13004               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DataType_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13005                 :   }
   13006             598 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13007                 :   {
   13008             598 :     if ( bUseExceptions ) {
   13009               0 :       CPLErrorReset();
   13010                 :     }
   13011             598 :     result = (GDALDataType)GDALRasterBandShadow_DataType_get(arg1);
   13012             598 :     if ( bUseExceptions ) {
   13013               0 :       CPLErr eclass = CPLGetLastErrorType();
   13014               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13015               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13016                 :       }
   13017                 :     }
   13018                 :   }
   13019            1196 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13020             598 :   return resultobj;
   13021                 : fail:
   13022               0 :   return NULL;
   13023                 : }
   13024                 : 
   13025                 : 
   13026               0 : SWIGINTERN PyObject *_wrap_Band_GetBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13027               0 :   PyObject *resultobj = 0;
   13028               0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13029               0 :   void *argp1 = 0 ;
   13030               0 :   int res1 = 0 ;
   13031               0 :   PyObject * obj0 = 0 ;
   13032                 :   int result;
   13033                 :   
   13034               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetBand",&obj0)) SWIG_fail;
   13035               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13036               0 :   if (!SWIG_IsOK(res1)) {
   13037               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13038                 :   }
   13039               0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13040                 :   {
   13041               0 :     if ( bUseExceptions ) {
   13042               0 :       CPLErrorReset();
   13043                 :     }
   13044               0 :     result = (int)GDALRasterBandShadow_GetBand(arg1);
   13045               0 :     if ( bUseExceptions ) {
   13046               0 :       CPLErr eclass = CPLGetLastErrorType();
   13047               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13048               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13049                 :       }
   13050                 :     }
   13051                 :   }
   13052               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13053               0 :   return resultobj;
   13054                 : fail:
   13055               0 :   return NULL;
   13056                 : }
   13057                 : 
   13058                 : 
   13059              33 : SWIGINTERN PyObject *_wrap_Band_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13060              33 :   PyObject *resultobj = 0;
   13061              33 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13062              33 :   int *arg2 = (int *) 0 ;
   13063              33 :   int *arg3 = (int *) 0 ;
   13064              33 :   void *argp1 = 0 ;
   13065              33 :   int res1 = 0 ;
   13066                 :   int temp2 ;
   13067              33 :   int res2 = SWIG_TMPOBJ ;
   13068                 :   int temp3 ;
   13069              33 :   int res3 = SWIG_TMPOBJ ;
   13070              33 :   PyObject * obj0 = 0 ;
   13071                 :   
   13072              33 :   arg2 = &temp2;
   13073              33 :   arg3 = &temp3;
   13074              33 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetBlockSize",&obj0)) SWIG_fail;
   13075              33 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13076              33 :   if (!SWIG_IsOK(res1)) {
   13077               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13078                 :   }
   13079              33 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13080                 :   {
   13081              33 :     if ( bUseExceptions ) {
   13082               0 :       CPLErrorReset();
   13083                 :     }
   13084                 :     GDALRasterBandShadow_GetBlockSize(arg1,arg2,arg3);
   13085              33 :     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              33 :   resultobj = SWIG_Py_Void();
   13093              66 :   if (SWIG_IsTmpObj(res2)) {
   13094              66 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
   13095                 :   } else {
   13096               0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   13097               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
   13098                 :   }
   13099              66 :   if (SWIG_IsTmpObj(res3)) {
   13100              66 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   13101                 :   } else {
   13102               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   13103               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   13104                 :   }
   13105              33 :   return resultobj;
   13106                 : fail:
   13107               0 :   return NULL;
   13108                 : }
   13109                 : 
   13110                 : 
   13111              24 : SWIGINTERN PyObject *_wrap_Band_GetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13112              24 :   PyObject *resultobj = 0;
   13113              24 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13114              24 :   void *argp1 = 0 ;
   13115              24 :   int res1 = 0 ;
   13116              24 :   PyObject * obj0 = 0 ;
   13117                 :   GDALColorInterp result;
   13118                 :   
   13119              24 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetColorInterpretation",&obj0)) SWIG_fail;
   13120              24 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13121              24 :   if (!SWIG_IsOK(res1)) {
   13122               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13123                 :   }
   13124              24 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13125                 :   {
   13126              24 :     if ( bUseExceptions ) {
   13127               0 :       CPLErrorReset();
   13128                 :     }
   13129              24 :     result = (GDALColorInterp)GDALRasterBandShadow_GetColorInterpretation(arg1);
   13130              24 :     if ( bUseExceptions ) {
   13131               0 :       CPLErr eclass = CPLGetLastErrorType();
   13132               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13133               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13134                 :       }
   13135                 :     }
   13136                 :   }
   13137              48 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13138              24 :   return resultobj;
   13139                 : fail:
   13140               0 :   return NULL;
   13141                 : }
   13142                 : 
   13143                 : 
   13144             170 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13145             170 :   PyObject *resultobj = 0;
   13146             170 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13147             170 :   void *argp1 = 0 ;
   13148             170 :   int res1 = 0 ;
   13149             170 :   PyObject * obj0 = 0 ;
   13150                 :   GDALColorInterp result;
   13151                 :   
   13152             170 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetRasterColorInterpretation",&obj0)) SWIG_fail;
   13153             170 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13154             170 :   if (!SWIG_IsOK(res1)) {
   13155               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13156                 :   }
   13157             170 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13158                 :   {
   13159             170 :     if ( bUseExceptions ) {
   13160               0 :       CPLErrorReset();
   13161                 :     }
   13162             170 :     result = (GDALColorInterp)GDALRasterBandShadow_GetRasterColorInterpretation(arg1);
   13163             170 :     if ( bUseExceptions ) {
   13164               0 :       CPLErr eclass = CPLGetLastErrorType();
   13165               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13166               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13167                 :       }
   13168                 :     }
   13169                 :   }
   13170             340 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13171             170 :   return resultobj;
   13172                 : fail:
   13173               0 :   return NULL;
   13174                 : }
   13175                 : 
   13176                 : 
   13177              16 : SWIGINTERN PyObject *_wrap_Band_SetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13178              16 :   PyObject *resultobj = 0;
   13179              16 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13180                 :   GDALColorInterp arg2 ;
   13181              16 :   void *argp1 = 0 ;
   13182              16 :   int res1 = 0 ;
   13183                 :   int val2 ;
   13184              16 :   int ecode2 = 0 ;
   13185              16 :   PyObject * obj0 = 0 ;
   13186              16 :   PyObject * obj1 = 0 ;
   13187                 :   CPLErr result;
   13188                 :   
   13189              16 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetColorInterpretation",&obj0,&obj1)) SWIG_fail;
   13190              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13191              16 :   if (!SWIG_IsOK(res1)) {
   13192               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13193                 :   }
   13194              16 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13195              16 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13196              16 :   if (!SWIG_IsOK(ecode2)) {
   13197               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   13198                 :   } 
   13199              16 :   arg2 = static_cast< GDALColorInterp >(val2);
   13200                 :   {
   13201              16 :     if ( bUseExceptions ) {
   13202               0 :       CPLErrorReset();
   13203                 :     }
   13204              16 :     result = (CPLErr)GDALRasterBandShadow_SetColorInterpretation(arg1,arg2);
   13205              16 :     if ( bUseExceptions ) {
   13206               0 :       CPLErr eclass = CPLGetLastErrorType();
   13207               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13208               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13209                 :       }
   13210                 :     }
   13211                 :   }
   13212              32 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13213                 :   {
   13214                 :     /* %typemap(ret) CPLErr */
   13215              16 :     if ( bUseExceptions == 0 ) {
   13216                 :       /* We're not using exceptions.  And no error has occurred */
   13217              16 :       if ( resultobj == 0 ) {
   13218                 :         /* No other return values set so return ErrorCode */
   13219               0 :         resultobj = PyInt_FromLong(result);
   13220                 :       }
   13221                 :     }
   13222                 :   }
   13223              16 :   return resultobj;
   13224                 : fail:
   13225               0 :   return NULL;
   13226                 : }
   13227                 : 
   13228                 : 
   13229              57 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13230              57 :   PyObject *resultobj = 0;
   13231              57 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13232                 :   GDALColorInterp arg2 ;
   13233              57 :   void *argp1 = 0 ;
   13234              57 :   int res1 = 0 ;
   13235                 :   int val2 ;
   13236              57 :   int ecode2 = 0 ;
   13237              57 :   PyObject * obj0 = 0 ;
   13238              57 :   PyObject * obj1 = 0 ;
   13239                 :   CPLErr result;
   13240                 :   
   13241              57 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetRasterColorInterpretation",&obj0,&obj1)) SWIG_fail;
   13242              57 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13243              57 :   if (!SWIG_IsOK(res1)) {
   13244               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13245                 :   }
   13246              57 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13247              57 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13248              57 :   if (!SWIG_IsOK(ecode2)) {
   13249               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetRasterColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   13250                 :   } 
   13251              57 :   arg2 = static_cast< GDALColorInterp >(val2);
   13252                 :   {
   13253              57 :     if ( bUseExceptions ) {
   13254               0 :       CPLErrorReset();
   13255                 :     }
   13256              57 :     result = (CPLErr)GDALRasterBandShadow_SetRasterColorInterpretation(arg1,arg2);
   13257              57 :     if ( bUseExceptions ) {
   13258               0 :       CPLErr eclass = CPLGetLastErrorType();
   13259               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13260               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13261                 :       }
   13262                 :     }
   13263                 :   }
   13264             114 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13265                 :   {
   13266                 :     /* %typemap(ret) CPLErr */
   13267              57 :     if ( bUseExceptions == 0 ) {
   13268                 :       /* We're not using exceptions.  And no error has occurred */
   13269              57 :       if ( resultobj == 0 ) {
   13270                 :         /* No other return values set so return ErrorCode */
   13271               0 :         resultobj = PyInt_FromLong(result);
   13272                 :       }
   13273                 :     }
   13274                 :   }
   13275              57 :   return resultobj;
   13276                 : fail:
   13277               0 :   return NULL;
   13278                 : }
   13279                 : 
   13280                 : 
   13281             116 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13282             116 :   PyObject *resultobj = 0;
   13283             116 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13284             116 :   double *arg2 = (double *) 0 ;
   13285             116 :   int *arg3 = (int *) 0 ;
   13286             116 :   void *argp1 = 0 ;
   13287             116 :   int res1 = 0 ;
   13288                 :   double tmpval2 ;
   13289                 :   int tmphasval2 ;
   13290             116 :   PyObject * obj0 = 0 ;
   13291                 :   
   13292                 :   {
   13293                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13294             116 :     arg2 = &tmpval2;
   13295             116 :     arg3 = &tmphasval2;
   13296                 :   }
   13297             116 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetNoDataValue",&obj0)) SWIG_fail;
   13298             116 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13299             116 :   if (!SWIG_IsOK(res1)) {
   13300               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13301                 :   }
   13302             116 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13303                 :   {
   13304             116 :     if ( bUseExceptions ) {
   13305               0 :       CPLErrorReset();
   13306                 :     }
   13307                 :     GDALRasterBandShadow_GetNoDataValue(arg1,arg2,arg3);
   13308             116 :     if ( bUseExceptions ) {
   13309               0 :       CPLErr eclass = CPLGetLastErrorType();
   13310               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13311               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13312                 :       }
   13313                 :     }
   13314                 :   }
   13315             116 :   resultobj = SWIG_Py_Void();
   13316                 :   {
   13317                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13318                 :     PyObject *r;
   13319             116 :     if ( !*arg3 ) {
   13320              20 :       Py_INCREF(Py_None);
   13321              20 :       r = Py_None;
   13322              20 :       resultobj = t_output_helper(resultobj,r);
   13323                 :     }
   13324                 :     else {
   13325              96 :       r = PyFloat_FromDouble( *arg2 );
   13326              96 :       resultobj = t_output_helper(resultobj,r);
   13327                 :     }
   13328                 :   }
   13329             116 :   return resultobj;
   13330                 : fail:
   13331               0 :   return NULL;
   13332                 : }
   13333                 : 
   13334                 : 
   13335              54 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13336              54 :   PyObject *resultobj = 0;
   13337              54 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13338                 :   double arg2 ;
   13339              54 :   void *argp1 = 0 ;
   13340              54 :   int res1 = 0 ;
   13341                 :   double val2 ;
   13342              54 :   int ecode2 = 0 ;
   13343              54 :   PyObject * obj0 = 0 ;
   13344              54 :   PyObject * obj1 = 0 ;
   13345                 :   CPLErr result;
   13346                 :   
   13347              54 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetNoDataValue",&obj0,&obj1)) SWIG_fail;
   13348              54 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13349              54 :   if (!SWIG_IsOK(res1)) {
   13350               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13351                 :   }
   13352              54 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13353              54 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   13354              54 :   if (!SWIG_IsOK(ecode2)) {
   13355               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetNoDataValue" "', argument " "2"" of type '" "double""'");
   13356                 :   } 
   13357              54 :   arg2 = static_cast< double >(val2);
   13358                 :   {
   13359              54 :     if ( bUseExceptions ) {
   13360               0 :       CPLErrorReset();
   13361                 :     }
   13362              54 :     result = (CPLErr)GDALRasterBandShadow_SetNoDataValue(arg1,arg2);
   13363              54 :     if ( bUseExceptions ) {
   13364               0 :       CPLErr eclass = CPLGetLastErrorType();
   13365               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13366               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13367                 :       }
   13368                 :     }
   13369                 :   }
   13370             108 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13371                 :   {
   13372                 :     /* %typemap(ret) CPLErr */
   13373              54 :     if ( bUseExceptions == 0 ) {
   13374                 :       /* We're not using exceptions.  And no error has occurred */
   13375              54 :       if ( resultobj == 0 ) {
   13376                 :         /* No other return values set so return ErrorCode */
   13377               0 :         resultobj = PyInt_FromLong(result);
   13378                 :       }
   13379                 :     }
   13380                 :   }
   13381              54 :   return resultobj;
   13382                 : fail:
   13383               0 :   return NULL;
   13384                 : }
   13385                 : 
   13386                 : 
   13387              27 : SWIGINTERN PyObject *_wrap_Band_GetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13388              27 :   PyObject *resultobj = 0;
   13389              27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13390              27 :   void *argp1 = 0 ;
   13391              27 :   int res1 = 0 ;
   13392              27 :   PyObject * obj0 = 0 ;
   13393              27 :   char *result = 0 ;
   13394                 :   
   13395              27 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetUnitType",&obj0)) SWIG_fail;
   13396              27 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13397              27 :   if (!SWIG_IsOK(res1)) {
   13398               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13399                 :   }
   13400              27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13401                 :   {
   13402              27 :     if ( bUseExceptions ) {
   13403               0 :       CPLErrorReset();
   13404                 :     }
   13405              27 :     result = (char *)GDALRasterBandShadow_GetUnitType(arg1);
   13406              27 :     if ( bUseExceptions ) {
   13407               0 :       CPLErr eclass = CPLGetLastErrorType();
   13408               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13409               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13410                 :       }
   13411                 :     }
   13412                 :   }
   13413              27 :   resultobj = SWIG_FromCharPtr((const char *)result);
   13414              27 :   return resultobj;
   13415                 : fail:
   13416               0 :   return NULL;
   13417                 : }
   13418                 : 
   13419                 : 
   13420               5 : SWIGINTERN PyObject *_wrap_Band_SetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13421               5 :   PyObject *resultobj = 0;
   13422               5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13423               5 :   char *arg2 = (char *) 0 ;
   13424               5 :   void *argp1 = 0 ;
   13425               5 :   int res1 = 0 ;
   13426                 :   int res2 ;
   13427               5 :   char *buf2 = 0 ;
   13428               5 :   int alloc2 = 0 ;
   13429               5 :   PyObject * obj0 = 0 ;
   13430               5 :   PyObject * obj1 = 0 ;
   13431                 :   CPLErr result;
   13432                 :   
   13433               5 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetUnitType",&obj0,&obj1)) SWIG_fail;
   13434               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13435               5 :   if (!SWIG_IsOK(res1)) {
   13436               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13437                 :   }
   13438               5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13439               5 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   13440               5 :   if (!SWIG_IsOK(res2)) {
   13441               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetUnitType" "', argument " "2"" of type '" "char const *""'");
   13442                 :   }
   13443               5 :   arg2 = reinterpret_cast< char * >(buf2);
   13444                 :   {
   13445               5 :     if ( bUseExceptions ) {
   13446               0 :       CPLErrorReset();
   13447                 :     }
   13448               5 :     result = (CPLErr)GDALRasterBandShadow_SetUnitType(arg1,(char const *)arg2);
   13449               5 :     if ( bUseExceptions ) {
   13450               0 :       CPLErr eclass = CPLGetLastErrorType();
   13451               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13452               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13453                 :       }
   13454                 :     }
   13455                 :   }
   13456              10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13457               5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   13458                 :   {
   13459                 :     /* %typemap(ret) CPLErr */
   13460               5 :     if ( bUseExceptions == 0 ) {
   13461                 :       /* We're not using exceptions.  And no error has occurred */
   13462               5 :       if ( resultobj == 0 ) {
   13463                 :         /* No other return values set so return ErrorCode */
   13464               0 :         resultobj = PyInt_FromLong(result);
   13465                 :       }
   13466                 :     }
   13467                 :   }
   13468               5 :   return resultobj;
   13469                 : fail:
   13470               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   13471               0 :   return NULL;
   13472                 : }
   13473                 : 
   13474                 : 
   13475              18 : SWIGINTERN PyObject *_wrap_Band_GetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13476              18 :   PyObject *resultobj = 0;
   13477              18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13478              18 :   void *argp1 = 0 ;
   13479              18 :   int res1 = 0 ;
   13480              18 :   PyObject * obj0 = 0 ;
   13481              18 :   char **result = 0 ;
   13482                 :   
   13483              18 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetRasterCategoryNames",&obj0)) SWIG_fail;
   13484              18 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13485              18 :   if (!SWIG_IsOK(res1)) {
   13486               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13487                 :   }
   13488              18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13489                 :   {
   13490              18 :     if ( bUseExceptions ) {
   13491               0 :       CPLErrorReset();
   13492                 :     }
   13493              18 :     result = (char **)GDALRasterBandShadow_GetRasterCategoryNames(arg1);
   13494              18 :     if ( bUseExceptions ) {
   13495               0 :       CPLErr eclass = CPLGetLastErrorType();
   13496               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13497               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13498                 :       }
   13499                 :     }
   13500                 :   }
   13501                 :   {
   13502                 :     /* %typemap(out) char **options -> ( string ) */
   13503              18 :     char **stringarray = result;
   13504              18 :     if ( stringarray == NULL ) {
   13505              17 :       resultobj = Py_None;
   13506              17 :       Py_INCREF( resultobj );
   13507                 :     }
   13508                 :     else {
   13509               1 :       int len = CSLCount( stringarray );
   13510               1 :       resultobj = PyList_New( len );
   13511              94 :       for ( int i = 0; i < len; ++i ) {
   13512              93 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   13513              93 :         PyList_SetItem(resultobj, i, o );
   13514                 :       }
   13515                 :     }
   13516                 :   }
   13517              18 :   return resultobj;
   13518                 : fail:
   13519               0 :   return NULL;
   13520                 : }
   13521                 : 
   13522                 : 
   13523               0 : SWIGINTERN PyObject *_wrap_Band_SetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13524               0 :   PyObject *resultobj = 0;
   13525               0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13526               0 :   char **arg2 = (char **) 0 ;
   13527               0 :   void *argp1 = 0 ;
   13528               0 :   int res1 = 0 ;
   13529               0 :   PyObject * obj0 = 0 ;
   13530               0 :   PyObject * obj1 = 0 ;
   13531                 :   CPLErr result;
   13532                 :   
   13533               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetRasterCategoryNames",&obj0,&obj1)) SWIG_fail;
   13534               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13535               0 :   if (!SWIG_IsOK(res1)) {
   13536               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13537                 :   }
   13538               0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13539                 :   {
   13540                 :     /* %typemap(in) char **options */
   13541                 :     /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   13542               0 :     if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
   13543                 :   #if PY_VERSION_HEX < 0x03000000
   13544                 :       || PyString_Check(obj1)
   13545                 :   #endif
   13546                 :       ) {
   13547               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   13548               0 :       SWIG_fail;
   13549                 :     }
   13550                 :     
   13551               0 :     int size = PySequence_Size(obj1);
   13552               0 :     for (int i = 0; i < size; i++) {
   13553               0 :       PyObject* pyObj = PySequence_GetItem(obj1,i);
   13554               0 :       if (PyUnicode_Check(pyObj))
   13555                 :       {
   13556                 :         char *pszStr;
   13557                 :         Py_ssize_t nLen;
   13558               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   13559                 : #if PY_VERSION_HEX >= 0x03000000
   13560                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   13561                 : #else
   13562               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   13563                 : #endif
   13564               0 :         arg2 = CSLAddString( arg2, pszStr );
   13565               0 :         Py_XDECREF(pyUTF8Str);
   13566                 :       }
   13567                 : #if PY_VERSION_HEX >= 0x03000000
   13568                 :       else if (PyBytes_Check(pyObj))
   13569                 :       arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   13570                 : #else
   13571               0 :       else if (PyString_Check(pyObj))
   13572               0 :       arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   13573                 : #endif
   13574                 :       else
   13575                 :       {
   13576               0 :         Py_DECREF(pyObj);
   13577               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   13578               0 :         SWIG_fail;
   13579                 :       }
   13580               0 :       Py_DECREF(pyObj);
   13581                 :     }
   13582                 :   }
   13583                 :   {
   13584               0 :     if ( bUseExceptions ) {
   13585               0 :       CPLErrorReset();
   13586                 :     }
   13587               0 :     result = (CPLErr)GDALRasterBandShadow_SetRasterCategoryNames(arg1,arg2);
   13588               0 :     if ( bUseExceptions ) {
   13589               0 :       CPLErr eclass = CPLGetLastErrorType();
   13590               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13591               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13592                 :       }
   13593                 :     }
   13594                 :   }
   13595               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13596                 :   {
   13597                 :     /* %typemap(freearg) char **options */
   13598               0 :     CSLDestroy( arg2 );
   13599                 :   }
   13600                 :   {
   13601                 :     /* %typemap(ret) CPLErr */
   13602               0 :     if ( bUseExceptions == 0 ) {
   13603                 :       /* We're not using exceptions.  And no error has occurred */
   13604               0 :       if ( resultobj == 0 ) {
   13605                 :         /* No other return values set so return ErrorCode */
   13606               0 :         resultobj = PyInt_FromLong(result);
   13607                 :       }
   13608                 :     }
   13609                 :   }
   13610               0 :   return resultobj;
   13611                 : fail:
   13612                 :   {
   13613                 :     /* %typemap(freearg) char **options */
   13614               0 :     CSLDestroy( arg2 );
   13615                 :   }
   13616               0 :   return NULL;
   13617                 : }
   13618                 : 
   13619                 : 
   13620              31 : SWIGINTERN PyObject *_wrap_Band_GetMinimum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13621              31 :   PyObject *resultobj = 0;
   13622              31 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13623              31 :   double *arg2 = (double *) 0 ;
   13624              31 :   int *arg3 = (int *) 0 ;
   13625              31 :   void *argp1 = 0 ;
   13626              31 :   int res1 = 0 ;
   13627                 :   double tmpval2 ;
   13628                 :   int tmphasval2 ;
   13629              31 :   PyObject * obj0 = 0 ;
   13630                 :   
   13631                 :   {
   13632                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13633              31 :     arg2 = &tmpval2;
   13634              31 :     arg3 = &tmphasval2;
   13635                 :   }
   13636              31 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMinimum",&obj0)) SWIG_fail;
   13637              31 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13638              31 :   if (!SWIG_IsOK(res1)) {
   13639               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMinimum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13640                 :   }
   13641              31 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13642                 :   {
   13643              31 :     if ( bUseExceptions ) {
   13644               0 :       CPLErrorReset();
   13645                 :     }
   13646                 :     GDALRasterBandShadow_GetMinimum(arg1,arg2,arg3);
   13647              31 :     if ( bUseExceptions ) {
   13648               0 :       CPLErr eclass = CPLGetLastErrorType();
   13649               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13650               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13651                 :       }
   13652                 :     }
   13653                 :   }
   13654              31 :   resultobj = SWIG_Py_Void();
   13655                 :   {
   13656                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13657                 :     PyObject *r;
   13658              31 :     if ( !*arg3 ) {
   13659              19 :       Py_INCREF(Py_None);
   13660              19 :       r = Py_None;
   13661              19 :       resultobj = t_output_helper(resultobj,r);
   13662                 :     }
   13663                 :     else {
   13664              12 :       r = PyFloat_FromDouble( *arg2 );
   13665              12 :       resultobj = t_output_helper(resultobj,r);
   13666                 :     }
   13667                 :   }
   13668              31 :   return resultobj;
   13669                 : fail:
   13670               0 :   return NULL;
   13671                 : }
   13672                 : 
   13673                 : 
   13674              28 : SWIGINTERN PyObject *_wrap_Band_GetMaximum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13675              28 :   PyObject *resultobj = 0;
   13676              28 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13677              28 :   double *arg2 = (double *) 0 ;
   13678              28 :   int *arg3 = (int *) 0 ;
   13679              28 :   void *argp1 = 0 ;
   13680              28 :   int res1 = 0 ;
   13681                 :   double tmpval2 ;
   13682                 :   int tmphasval2 ;
   13683              28 :   PyObject * obj0 = 0 ;
   13684                 :   
   13685                 :   {
   13686                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13687              28 :     arg2 = &tmpval2;
   13688              28 :     arg3 = &tmphasval2;
   13689                 :   }
   13690              28 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMaximum",&obj0)) SWIG_fail;
   13691              28 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13692              28 :   if (!SWIG_IsOK(res1)) {
   13693               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaximum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13694                 :   }
   13695              28 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13696                 :   {
   13697              28 :     if ( bUseExceptions ) {
   13698               0 :       CPLErrorReset();
   13699                 :     }
   13700                 :     GDALRasterBandShadow_GetMaximum(arg1,arg2,arg3);
   13701              28 :     if ( bUseExceptions ) {
   13702               0 :       CPLErr eclass = CPLGetLastErrorType();
   13703               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13704               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13705                 :       }
   13706                 :     }
   13707                 :   }
   13708              28 :   resultobj = SWIG_Py_Void();
   13709                 :   {
   13710                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13711                 :     PyObject *r;
   13712              28 :     if ( !*arg3 ) {
   13713              18 :       Py_INCREF(Py_None);
   13714              18 :       r = Py_None;
   13715              18 :       resultobj = t_output_helper(resultobj,r);
   13716                 :     }
   13717                 :     else {
   13718              10 :       r = PyFloat_FromDouble( *arg2 );
   13719              10 :       resultobj = t_output_helper(resultobj,r);
   13720                 :     }
   13721                 :   }
   13722              28 :   return resultobj;
   13723                 : fail:
   13724               0 :   return NULL;
   13725                 : }
   13726                 : 
   13727                 : 
   13728              32 : SWIGINTERN PyObject *_wrap_Band_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13729              32 :   PyObject *resultobj = 0;
   13730              32 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13731              32 :   double *arg2 = (double *) 0 ;
   13732              32 :   int *arg3 = (int *) 0 ;
   13733              32 :   void *argp1 = 0 ;
   13734              32 :   int res1 = 0 ;
   13735                 :   double tmpval2 ;
   13736                 :   int tmphasval2 ;
   13737              32 :   PyObject * obj0 = 0 ;
   13738                 :   
   13739                 :   {
   13740                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13741              32 :     arg2 = &tmpval2;
   13742              32 :     arg3 = &tmphasval2;
   13743                 :   }
   13744              32 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetOffset",&obj0)) SWIG_fail;
   13745              32 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13746              32 :   if (!SWIG_IsOK(res1)) {
   13747               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13748                 :   }
   13749              32 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13750                 :   {
   13751              32 :     if ( bUseExceptions ) {
   13752               0 :       CPLErrorReset();
   13753                 :     }
   13754                 :     GDALRasterBandShadow_GetOffset(arg1,arg2,arg3);
   13755              32 :     if ( bUseExceptions ) {
   13756               0 :       CPLErr eclass = CPLGetLastErrorType();
   13757               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13758               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13759                 :       }
   13760                 :     }
   13761                 :   }
   13762              32 :   resultobj = SWIG_Py_Void();
   13763                 :   {
   13764                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13765                 :     PyObject *r;
   13766              32 :     if ( !*arg3 ) {
   13767               1 :       Py_INCREF(Py_None);
   13768               1 :       r = Py_None;
   13769               1 :       resultobj = t_output_helper(resultobj,r);
   13770                 :     }
   13771                 :     else {
   13772              31 :       r = PyFloat_FromDouble( *arg2 );
   13773              31 :       resultobj = t_output_helper(resultobj,r);
   13774                 :     }
   13775                 :   }
   13776              32 :   return resultobj;
   13777                 : fail:
   13778               0 :   return NULL;
   13779                 : }
   13780                 : 
   13781                 : 
   13782              32 : SWIGINTERN PyObject *_wrap_Band_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13783              32 :   PyObject *resultobj = 0;
   13784              32 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13785              32 :   double *arg2 = (double *) 0 ;
   13786              32 :   int *arg3 = (int *) 0 ;
   13787              32 :   void *argp1 = 0 ;
   13788              32 :   int res1 = 0 ;
   13789                 :   double tmpval2 ;
   13790                 :   int tmphasval2 ;
   13791              32 :   PyObject * obj0 = 0 ;
   13792                 :   
   13793                 :   {
   13794                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13795              32 :     arg2 = &tmpval2;
   13796              32 :     arg3 = &tmphasval2;
   13797                 :   }
   13798              32 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetScale",&obj0)) SWIG_fail;
   13799              32 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13800              32 :   if (!SWIG_IsOK(res1)) {
   13801               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13802                 :   }
   13803              32 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13804                 :   {
   13805              32 :     if ( bUseExceptions ) {
   13806               0 :       CPLErrorReset();
   13807                 :     }
   13808                 :     GDALRasterBandShadow_GetScale(arg1,arg2,arg3);
   13809              32 :     if ( bUseExceptions ) {
   13810               0 :       CPLErr eclass = CPLGetLastErrorType();
   13811               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13812               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13813                 :       }
   13814                 :     }
   13815                 :   }
   13816              32 :   resultobj = SWIG_Py_Void();
   13817                 :   {
   13818                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13819                 :     PyObject *r;
   13820              32 :     if ( !*arg3 ) {
   13821               1 :       Py_INCREF(Py_None);
   13822               1 :       r = Py_None;
   13823               1 :       resultobj = t_output_helper(resultobj,r);
   13824                 :     }
   13825                 :     else {
   13826              31 :       r = PyFloat_FromDouble( *arg2 );
   13827              31 :       resultobj = t_output_helper(resultobj,r);
   13828                 :     }
   13829                 :   }
   13830              32 :   return resultobj;
   13831                 : fail:
   13832               0 :   return NULL;
   13833                 : }
   13834                 : 
   13835                 : 
   13836               5 : SWIGINTERN PyObject *_wrap_Band_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13837               5 :   PyObject *resultobj = 0;
   13838               5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13839                 :   double arg2 ;
   13840               5 :   void *argp1 = 0 ;
   13841               5 :   int res1 = 0 ;
   13842                 :   double val2 ;
   13843               5 :   int ecode2 = 0 ;
   13844               5 :   PyObject * obj0 = 0 ;
   13845               5 :   PyObject * obj1 = 0 ;
   13846                 :   CPLErr result;
   13847                 :   
   13848               5 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetOffset",&obj0,&obj1)) SWIG_fail;
   13849               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13850               5 :   if (!SWIG_IsOK(res1)) {
   13851               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13852                 :   }
   13853               5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13854               5 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   13855               5 :   if (!SWIG_IsOK(ecode2)) {
   13856               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetOffset" "', argument " "2"" of type '" "double""'");
   13857                 :   } 
   13858               5 :   arg2 = static_cast< double >(val2);
   13859                 :   {
   13860               5 :     if ( bUseExceptions ) {
   13861               0 :       CPLErrorReset();
   13862                 :     }
   13863               5 :     result = (CPLErr)GDALRasterBandShadow_SetOffset(arg1,arg2);
   13864               5 :     if ( bUseExceptions ) {
   13865               0 :       CPLErr eclass = CPLGetLastErrorType();
   13866               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13867               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13868                 :       }
   13869                 :     }
   13870                 :   }
   13871              10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13872                 :   {
   13873                 :     /* %typemap(ret) CPLErr */
   13874               5 :     if ( bUseExceptions == 0 ) {
   13875                 :       /* We're not using exceptions.  And no error has occurred */
   13876               5 :       if ( resultobj == 0 ) {
   13877                 :         /* No other return values set so return ErrorCode */
   13878               0 :         resultobj = PyInt_FromLong(result);
   13879                 :       }
   13880                 :     }
   13881                 :   }
   13882               5 :   return resultobj;
   13883                 : fail:
   13884               0 :   return NULL;
   13885                 : }
   13886                 : 
   13887                 : 
   13888               5 : SWIGINTERN PyObject *_wrap_Band_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13889               5 :   PyObject *resultobj = 0;
   13890               5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13891                 :   double arg2 ;
   13892               5 :   void *argp1 = 0 ;
   13893               5 :   int res1 = 0 ;
   13894                 :   double val2 ;
   13895               5 :   int ecode2 = 0 ;
   13896               5 :   PyObject * obj0 = 0 ;
   13897               5 :   PyObject * obj1 = 0 ;
   13898                 :   CPLErr result;
   13899                 :   
   13900               5 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetScale",&obj0,&obj1)) SWIG_fail;
   13901               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13902               5 :   if (!SWIG_IsOK(res1)) {
   13903               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13904                 :   }
   13905               5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13906               5 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   13907               5 :   if (!SWIG_IsOK(ecode2)) {
   13908               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetScale" "', argument " "2"" of type '" "double""'");
   13909                 :   } 
   13910               5 :   arg2 = static_cast< double >(val2);
   13911                 :   {
   13912               5 :     if ( bUseExceptions ) {
   13913               0 :       CPLErrorReset();
   13914                 :     }
   13915               5 :     result = (CPLErr)GDALRasterBandShadow_SetScale(arg1,arg2);
   13916               5 :     if ( bUseExceptions ) {
   13917               0 :       CPLErr eclass = CPLGetLastErrorType();
   13918               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13919               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13920                 :       }
   13921                 :     }
   13922                 :   }
   13923              10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13924                 :   {
   13925                 :     /* %typemap(ret) CPLErr */
   13926               5 :     if ( bUseExceptions == 0 ) {
   13927                 :       /* We're not using exceptions.  And no error has occurred */
   13928               5 :       if ( resultobj == 0 ) {
   13929                 :         /* No other return values set so return ErrorCode */
   13930               0 :         resultobj = PyInt_FromLong(result);
   13931                 :       }
   13932                 :     }
   13933                 :   }
   13934               5 :   return resultobj;
   13935                 : fail:
   13936               0 :   return NULL;
   13937                 : }
   13938                 : 
   13939                 : 
   13940              60 : SWIGINTERN PyObject *_wrap_Band_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13941              60 :   PyObject *resultobj = 0;
   13942              60 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13943                 :   int arg2 ;
   13944                 :   int arg3 ;
   13945              60 :   double *arg4 = (double *) 0 ;
   13946              60 :   double *arg5 = (double *) 0 ;
   13947              60 :   double *arg6 = (double *) 0 ;
   13948              60 :   double *arg7 = (double *) 0 ;
   13949              60 :   void *argp1 = 0 ;
   13950              60 :   int res1 = 0 ;
   13951                 :   int val2 ;
   13952              60 :   int ecode2 = 0 ;
   13953                 :   int val3 ;
   13954              60 :   int ecode3 = 0 ;
   13955                 :   double temp4 ;
   13956              60 :   int res4 = SWIG_TMPOBJ ;
   13957                 :   double temp5 ;
   13958              60 :   int res5 = SWIG_TMPOBJ ;
   13959                 :   double temp6 ;
   13960              60 :   int res6 = SWIG_TMPOBJ ;
   13961                 :   double temp7 ;
   13962              60 :   int res7 = SWIG_TMPOBJ ;
   13963              60 :   PyObject * obj0 = 0 ;
   13964              60 :   PyObject * obj1 = 0 ;
   13965              60 :   PyObject * obj2 = 0 ;
   13966                 :   CPLErr result;
   13967                 :   
   13968              60 :   arg4 = &temp4;
   13969              60 :   arg5 = &temp5;
   13970              60 :   arg6 = &temp6;
   13971              60 :   arg7 = &temp7;
   13972              60 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Band_GetStatistics",&obj0,&obj1,&obj2)) SWIG_fail;
   13973              60 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13974              60 :   if (!SWIG_IsOK(res1)) {
   13975               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13976                 :   }
   13977              60 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13978              60 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13979              60 :   if (!SWIG_IsOK(ecode2)) {
   13980               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetStatistics" "', argument " "2"" of type '" "int""'");
   13981                 :   } 
   13982              60 :   arg2 = static_cast< int >(val2);
   13983              60 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   13984              60 :   if (!SWIG_IsOK(ecode3)) {
   13985               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetStatistics" "', argument " "3"" of type '" "int""'");
   13986                 :   } 
   13987              60 :   arg3 = static_cast< int >(val3);
   13988                 :   {
   13989              60 :     if ( bUseExceptions ) {
   13990               0 :       CPLErrorReset();
   13991                 :     }
   13992              60 :     result = (CPLErr)GDALRasterBandShadow_GetStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   13993              60 :     if ( bUseExceptions ) {
   13994               0 :       CPLErr eclass = CPLGetLastErrorType();
   13995               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13996               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13997                 :       }
   13998                 :     }
   13999                 :   }
   14000                 :   {
   14001                 :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   14002                 :   }
   14003             120 :   if (SWIG_IsTmpObj(res4)) {
   14004              60 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   14005                 :   } else {
   14006               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14007               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   14008                 :   }
   14009             120 :   if (SWIG_IsTmpObj(res5)) {
   14010              60 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   14011                 :   } else {
   14012               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14013               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   14014                 :   }
   14015             120 :   if (SWIG_IsTmpObj(res6)) {
   14016              60 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   14017                 :   } else {
   14018               0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14019               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   14020                 :   }
   14021             120 :   if (SWIG_IsTmpObj(res7)) {
   14022              60 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   14023                 :   } else {
   14024               0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14025               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   14026                 :   }
   14027                 :   {
   14028                 :     /* %typemap(ret) CPLErr */
   14029              60 :     if ( bUseExceptions == 0 ) {
   14030                 :       /* We're not using exceptions.  And no error has occurred */
   14031              60 :       if ( resultobj == 0 ) {
   14032                 :         /* No other return values set so return ErrorCode */
   14033               0 :         resultobj = PyInt_FromLong(result);
   14034                 :       }
   14035                 :     }
   14036                 :   }
   14037              60 :   return resultobj;
   14038                 : fail:
   14039               0 :   return NULL;
   14040                 : }
   14041                 : 
   14042                 : 
   14043               7 : SWIGINTERN PyObject *_wrap_Band_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14044               7 :   PyObject *resultobj = 0;
   14045               7 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14046                 :   bool arg2 ;
   14047               7 :   double *arg3 = (double *) NULL ;
   14048               7 :   double *arg4 = (double *) NULL ;
   14049               7 :   double *arg5 = (double *) NULL ;
   14050               7 :   double *arg6 = (double *) NULL ;
   14051               7 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   14052               7 :   void *arg8 = (void *) NULL ;
   14053               7 :   void *argp1 = 0 ;
   14054               7 :   int res1 = 0 ;
   14055                 :   bool val2 ;
   14056               7 :   int ecode2 = 0 ;
   14057                 :   double temp3 ;
   14058               7 :   int res3 = SWIG_TMPOBJ ;
   14059                 :   double temp4 ;
   14060               7 :   int res4 = SWIG_TMPOBJ ;
   14061                 :   double temp5 ;
   14062               7 :   int res5 = SWIG_TMPOBJ ;
   14063                 :   double temp6 ;
   14064               7 :   int res6 = SWIG_TMPOBJ ;
   14065               7 :   PyObject * obj0 = 0 ;
   14066               7 :   PyObject * obj1 = 0 ;
   14067               7 :   PyObject * obj2 = 0 ;
   14068               7 :   PyObject * obj3 = 0 ;
   14069                 :   CPLErr result;
   14070                 :   
   14071                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14072                 :   PyProgressData *psProgressInfo;
   14073               7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14074               7 :   psProgressInfo->nLastReported = -1;
   14075               7 :   psProgressInfo->psPyCallback = NULL;
   14076               7 :   psProgressInfo->psPyCallbackData = NULL;
   14077               7 :   arg8 = psProgressInfo;
   14078               7 :   arg3 = &temp3;
   14079               7 :   arg4 = &temp4;
   14080               7 :   arg5 = &temp5;
   14081               7 :   arg6 = &temp6;
   14082               7 :   if (!PyArg_ParseTuple(args,(char *)"OO|OO:Band_ComputeStatistics",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   14083               7 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14084               7 :   if (!SWIG_IsOK(res1)) {
   14085               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14086                 :   }
   14087               7 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14088              14 :   ecode2 = SWIG_AsVal_bool(obj1, &val2);
   14089               7 :   if (!SWIG_IsOK(ecode2)) {
   14090               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   14091                 :   } 
   14092               7 :   arg2 = static_cast< bool >(val2);
   14093               7 :   if (obj2) {
   14094                 :     {
   14095                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14096                 :       /* callback_func typemap */
   14097               0 :       if (obj2 && obj2 != Py_None ) {
   14098               0 :         void* cbfunction = NULL;
   14099                 :         SWIG_ConvertPtr( obj2, 
   14100                 :           (void**)&cbfunction,
   14101                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14102               0 :           SWIG_POINTER_EXCEPTION | 0 );
   14103                 :         
   14104               0 :         if ( cbfunction == GDALTermProgress ) {
   14105               0 :           arg7 = GDALTermProgress;
   14106                 :         } else {
   14107               0 :           if (!PyCallable_Check(obj2)) {
   14108                 :             PyErr_SetString( PyExc_RuntimeError, 
   14109               0 :               "Object given is not a Python function" );
   14110               0 :             SWIG_fail;
   14111                 :           }
   14112               0 :           psProgressInfo->psPyCallback = obj2;
   14113               0 :           arg7 = PyProgressProxy;
   14114                 :         }
   14115                 :         
   14116                 :       }
   14117                 :       
   14118                 :     }
   14119                 :   }
   14120               7 :   if (obj3) {
   14121                 :     {
   14122                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   14123               0 :       psProgressInfo->psPyCallbackData = obj3 ;
   14124                 :     }
   14125                 :   }
   14126                 :   {
   14127               7 :     if ( bUseExceptions ) {
   14128               0 :       CPLErrorReset();
   14129                 :     }
   14130              14 :     result = (CPLErr)GDALRasterBandShadow_ComputeStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   14131               7 :     if ( bUseExceptions ) {
   14132               0 :       CPLErr eclass = CPLGetLastErrorType();
   14133               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14134               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14135                 :       }
   14136                 :     }
   14137                 :   }
   14138                 :   {
   14139                 :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   14140                 :   }
   14141              14 :   if (SWIG_IsTmpObj(res3)) {
   14142               7 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   14143                 :   } else {
   14144               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14145               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   14146                 :   }
   14147              14 :   if (SWIG_IsTmpObj(res4)) {
   14148               7 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   14149                 :   } else {
   14150               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14151               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   14152                 :   }
   14153              14 :   if (SWIG_IsTmpObj(res5)) {
   14154               7 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   14155                 :   } else {
   14156               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14157               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   14158                 :   }
   14159              14 :   if (SWIG_IsTmpObj(res6)) {
   14160               7 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   14161                 :   } else {
   14162               0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14163               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   14164                 :   }
   14165                 :   {
   14166                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14167                 :     
   14168               7 :     CPLFree(psProgressInfo);
   14169                 :     
   14170                 :   }
   14171               7 :   return resultobj;
   14172                 : fail:
   14173                 :   {
   14174                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14175                 :     
   14176               0 :     CPLFree(psProgressInfo);
   14177                 :     
   14178                 :   }
   14179               0 :   return NULL;
   14180                 : }
   14181                 : 
   14182                 : 
   14183               0 : SWIGINTERN PyObject *_wrap_Band_SetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14184               0 :   PyObject *resultobj = 0;
   14185               0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14186                 :   double arg2 ;
   14187                 :   double arg3 ;
   14188                 :   double arg4 ;
   14189                 :   double arg5 ;
   14190               0 :   void *argp1 = 0 ;
   14191               0 :   int res1 = 0 ;
   14192                 :   double val2 ;
   14193               0 :   int ecode2 = 0 ;
   14194                 :   double val3 ;
   14195               0 :   int ecode3 = 0 ;
   14196                 :   double val4 ;
   14197               0 :   int ecode4 = 0 ;
   14198                 :   double val5 ;
   14199               0 :   int ecode5 = 0 ;
   14200               0 :   PyObject * obj0 = 0 ;
   14201               0 :   PyObject * obj1 = 0 ;
   14202               0 :   PyObject * obj2 = 0 ;
   14203               0 :   PyObject * obj3 = 0 ;
   14204               0 :   PyObject * obj4 = 0 ;
   14205                 :   CPLErr result;
   14206                 :   
   14207               0 :   if (!PyArg_ParseTuple(args,(char *)"OOOOO:Band_SetStatistics",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   14208               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14209               0 :   if (!SWIG_IsOK(res1)) {
   14210               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14211                 :   }
   14212               0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14213               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   14214               0 :   if (!SWIG_IsOK(ecode2)) {
   14215               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetStatistics" "', argument " "2"" of type '" "double""'");
   14216                 :   } 
   14217               0 :   arg2 = static_cast< double >(val2);
   14218               0 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   14219               0 :   if (!SWIG_IsOK(ecode3)) {
   14220               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetStatistics" "', argument " "3"" of type '" "double""'");
   14221                 :   } 
   14222               0 :   arg3 = static_cast< double >(val3);
   14223               0 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   14224               0 :   if (!SWIG_IsOK(ecode4)) {
   14225               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_SetStatistics" "', argument " "4"" of type '" "double""'");
   14226                 :   } 
   14227               0 :   arg4 = static_cast< double >(val4);
   14228               0 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   14229               0 :   if (!SWIG_IsOK(ecode5)) {
   14230               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_SetStatistics" "', argument " "5"" of type '" "double""'");
   14231                 :   } 
   14232               0 :   arg5 = static_cast< double >(val5);
   14233                 :   {
   14234               0 :     if ( bUseExceptions ) {
   14235               0 :       CPLErrorReset();
   14236                 :     }
   14237               0 :     result = (CPLErr)GDALRasterBandShadow_SetStatistics(arg1,arg2,arg3,arg4,arg5);
   14238               0 :     if ( bUseExceptions ) {
   14239               0 :       CPLErr eclass = CPLGetLastErrorType();
   14240               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14241               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14242                 :       }
   14243                 :     }
   14244                 :   }
   14245               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14246               0 :   return resultobj;
   14247                 : fail:
   14248               0 :   return NULL;
   14249                 : }
   14250                 : 
   14251                 : 
   14252              91 : SWIGINTERN PyObject *_wrap_Band_GetOverviewCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14253              91 :   PyObject *resultobj = 0;
   14254              91 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14255              91 :   void *argp1 = 0 ;
   14256              91 :   int res1 = 0 ;
   14257              91 :   PyObject * obj0 = 0 ;
   14258                 :   int result;
   14259                 :   
   14260              91 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetOverviewCount",&obj0)) SWIG_fail;
   14261              91 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14262              91 :   if (!SWIG_IsOK(res1)) {
   14263               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverviewCount" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14264                 :   }
   14265              91 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14266                 :   {
   14267              91 :     if ( bUseExceptions ) {
   14268               0 :       CPLErrorReset();
   14269                 :     }
   14270              91 :     result = (int)GDALRasterBandShadow_GetOverviewCount(arg1);
   14271              91 :     if ( bUseExceptions ) {
   14272               0 :       CPLErr eclass = CPLGetLastErrorType();
   14273               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14274               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14275                 :       }
   14276                 :     }
   14277                 :   }
   14278              91 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14279              91 :   return resultobj;
   14280                 : fail:
   14281               0 :   return NULL;
   14282                 : }
   14283                 : 
   14284                 : 
   14285             280 : SWIGINTERN PyObject *_wrap_Band_GetOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14286             280 :   PyObject *resultobj = 0;
   14287             280 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14288                 :   int arg2 ;
   14289             280 :   void *argp1 = 0 ;
   14290             280 :   int res1 = 0 ;
   14291                 :   int val2 ;
   14292             280 :   int ecode2 = 0 ;
   14293             280 :   PyObject * obj0 = 0 ;
   14294             280 :   PyObject * obj1 = 0 ;
   14295             280 :   GDALRasterBandShadow *result = 0 ;
   14296                 :   
   14297             280 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_GetOverview",&obj0,&obj1)) SWIG_fail;
   14298             280 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14299             280 :   if (!SWIG_IsOK(res1)) {
   14300               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14301                 :   }
   14302             280 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14303             280 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   14304             280 :   if (!SWIG_IsOK(ecode2)) {
   14305               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetOverview" "', argument " "2"" of type '" "int""'");
   14306                 :   } 
   14307             280 :   arg2 = static_cast< int >(val2);
   14308                 :   {
   14309             280 :     if ( bUseExceptions ) {
   14310               0 :       CPLErrorReset();
   14311                 :     }
   14312             280 :     result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetOverview(arg1,arg2);
   14313             280 :     if ( bUseExceptions ) {
   14314               0 :       CPLErr eclass = CPLGetLastErrorType();
   14315               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14316               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14317                 :       }
   14318                 :     }
   14319                 :   }
   14320             280 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14321             280 :   return resultobj;
   14322                 : fail:
   14323               0 :   return NULL;
   14324                 : }
   14325                 : 
   14326                 : 
   14327            2411 : SWIGINTERN PyObject *_wrap_Band_Checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14328            2411 :   PyObject *resultobj = 0;
   14329            2411 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14330            2411 :   int arg2 = (int) 0 ;
   14331            2411 :   int arg3 = (int) 0 ;
   14332            2411 :   int *arg4 = (int *) 0 ;
   14333            2411 :   int *arg5 = (int *) 0 ;
   14334            2411 :   void *argp1 = 0 ;
   14335            2411 :   int res1 = 0 ;
   14336                 :   int val2 ;
   14337            2411 :   int ecode2 = 0 ;
   14338                 :   int val3 ;
   14339            2411 :   int ecode3 = 0 ;
   14340                 :   int val4 ;
   14341                 :   int val5 ;
   14342            2411 :   PyObject * obj0 = 0 ;
   14343            2411 :   PyObject * obj1 = 0 ;
   14344            2411 :   PyObject * obj2 = 0 ;
   14345            2411 :   PyObject * obj3 = 0 ;
   14346            2411 :   PyObject * obj4 = 0 ;
   14347                 :   char *  kwnames[] = {
   14348                 :     (char *) "self",(char *) "xoff",(char *) "yoff",(char *) "xsize",(char *) "ysize", NULL 
   14349            2411 :   };
   14350                 :   int result;
   14351                 :   
   14352            2411 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOO:Band_Checksum",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   14353            2411 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14354            2411 :   if (!SWIG_IsOK(res1)) {
   14355               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Checksum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14356                 :   }
   14357            2411 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14358            2411 :   if (obj1) {
   14359             366 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   14360             366 :     if (!SWIG_IsOK(ecode2)) {
   14361               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Checksum" "', argument " "2"" of type '" "int""'");
   14362                 :     } 
   14363             366 :     arg2 = static_cast< int >(val2);
   14364                 :   }
   14365            2411 :   if (obj2) {
   14366             366 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   14367             366 :     if (!SWIG_IsOK(ecode3)) {
   14368               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Checksum" "', argument " "3"" of type '" "int""'");
   14369                 :     } 
   14370             366 :     arg3 = static_cast< int >(val3);
   14371                 :   }
   14372            2411 :   if (obj3) {
   14373                 :     {
   14374                 :       /* %typemap(in) (int *optional_##int) */
   14375             366 :       if ( obj3 == Py_None ) {
   14376               0 :         arg4 = 0;
   14377                 :       }
   14378             366 :       else if ( PyArg_Parse( obj3,"i" ,&val4 ) ) {
   14379             366 :         arg4 = (int *) &val4;
   14380                 :       }
   14381                 :       else {
   14382               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14383               0 :         SWIG_fail;
   14384                 :       }
   14385                 :     }
   14386                 :   }
   14387            2411 :   if (obj4) {
   14388                 :     {
   14389                 :       /* %typemap(in) (int *optional_##int) */
   14390             366 :       if ( obj4 == Py_None ) {
   14391               0 :         arg5 = 0;
   14392                 :       }
   14393             366 :       else if ( PyArg_Parse( obj4,"i" ,&val5 ) ) {
   14394             366 :         arg5 = (int *) &val5;
   14395                 :       }
   14396                 :       else {
   14397               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14398               0 :         SWIG_fail;
   14399                 :       }
   14400                 :     }
   14401                 :   }
   14402                 :   {
   14403            2411 :     if ( bUseExceptions ) {
   14404               0 :       CPLErrorReset();
   14405                 :     }
   14406            2411 :     result = (int)GDALRasterBandShadow_Checksum(arg1,arg2,arg3,arg4,arg5);
   14407            2411 :     if ( bUseExceptions ) {
   14408               0 :       CPLErr eclass = CPLGetLastErrorType();
   14409               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14410               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14411                 :       }
   14412                 :     }
   14413                 :   }
   14414            2411 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14415            2411 :   return resultobj;
   14416                 : fail:
   14417               0 :   return NULL;
   14418                 : }
   14419                 : 
   14420                 : 
   14421             749 : SWIGINTERN PyObject *_wrap_Band_ComputeRasterMinMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14422             749 :   PyObject *resultobj = 0;
   14423             749 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14424                 :   double *arg2 ;
   14425             749 :   int arg3 = (int) 0 ;
   14426             749 :   void *argp1 = 0 ;
   14427             749 :   int res1 = 0 ;
   14428                 :   double argout2[2] ;
   14429                 :   int val3 ;
   14430             749 :   int ecode3 = 0 ;
   14431             749 :   PyObject * obj0 = 0 ;
   14432             749 :   PyObject * obj1 = 0 ;
   14433                 :   
   14434                 :   {
   14435                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   14436             749 :     arg2 = argout2;
   14437                 :   }
   14438             749 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Band_ComputeRasterMinMax",&obj0,&obj1)) SWIG_fail;
   14439             749 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14440             749 :   if (!SWIG_IsOK(res1)) {
   14441               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeRasterMinMax" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14442                 :   }
   14443             749 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14444             749 :   if (obj1) {
   14445               1 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
   14446               1 :     if (!SWIG_IsOK(ecode3)) {
   14447               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeRasterMinMax" "', argument " "3"" of type '" "int""'");
   14448                 :     } 
   14449               1 :     arg3 = static_cast< int >(val3);
   14450                 :   }
   14451                 :   {
   14452             749 :     if ( bUseExceptions ) {
   14453               0 :       CPLErrorReset();
   14454                 :     }
   14455                 :     GDALRasterBandShadow_ComputeRasterMinMax(arg1,arg2,arg3);
   14456             749 :     if ( bUseExceptions ) {
   14457               0 :       CPLErr eclass = CPLGetLastErrorType();
   14458               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14459               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14460                 :       }
   14461                 :     }
   14462                 :   }
   14463             749 :   resultobj = SWIG_Py_Void();
   14464                 :   {
   14465                 :     /* %typemap(argout) (double argout[ANY]) */
   14466             749 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
   14467             749 :     resultobj = t_output_helper(resultobj,out);
   14468                 :   }
   14469             749 :   return resultobj;
   14470                 : fail:
   14471               0 :   return NULL;
   14472                 : }
   14473                 : 
   14474                 : 
   14475              12 : SWIGINTERN PyObject *_wrap_Band_ComputeBandStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14476              12 :   PyObject *resultobj = 0;
   14477              12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14478                 :   double *arg2 ;
   14479              12 :   int arg3 = (int) 1 ;
   14480              12 :   void *argp1 = 0 ;
   14481              12 :   int res1 = 0 ;
   14482                 :   double argout2[2] ;
   14483                 :   int val3 ;
   14484              12 :   int ecode3 = 0 ;
   14485              12 :   PyObject * obj0 = 0 ;
   14486              12 :   PyObject * obj1 = 0 ;
   14487                 :   
   14488                 :   {
   14489                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   14490              12 :     arg2 = argout2;
   14491                 :   }
   14492              12 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Band_ComputeBandStats",&obj0,&obj1)) SWIG_fail;
   14493              12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14494              12 :   if (!SWIG_IsOK(res1)) {
   14495               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeBandStats" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14496                 :   }
   14497              12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14498              12 :   if (obj1) {
   14499               0 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
   14500               0 :     if (!SWIG_IsOK(ecode3)) {
   14501               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeBandStats" "', argument " "3"" of type '" "int""'");
   14502                 :     } 
   14503               0 :     arg3 = static_cast< int >(val3);
   14504                 :   }
   14505                 :   {
   14506              12 :     if ( bUseExceptions ) {
   14507               0 :       CPLErrorReset();
   14508                 :     }
   14509                 :     GDALRasterBandShadow_ComputeBandStats(arg1,arg2,arg3);
   14510              12 :     if ( bUseExceptions ) {
   14511               0 :       CPLErr eclass = CPLGetLastErrorType();
   14512               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14513               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14514                 :       }
   14515                 :     }
   14516                 :   }
   14517              12 :   resultobj = SWIG_Py_Void();
   14518                 :   {
   14519                 :     /* %typemap(argout) (double argout[ANY]) */
   14520              12 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
   14521              12 :     resultobj = t_output_helper(resultobj,out);
   14522                 :   }
   14523              12 :   return resultobj;
   14524                 : fail:
   14525               0 :   return NULL;
   14526                 : }
   14527                 : 
   14528                 : 
   14529          168026 : SWIGINTERN PyObject *_wrap_Band_Fill(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14530          168026 :   PyObject *resultobj = 0;
   14531          168026 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14532                 :   double arg2 ;
   14533          168026 :   double arg3 = (double) 0.0 ;
   14534          168026 :   void *argp1 = 0 ;
   14535          168026 :   int res1 = 0 ;
   14536                 :   double val2 ;
   14537          168026 :   int ecode2 = 0 ;
   14538                 :   double val3 ;
   14539          168026 :   int ecode3 = 0 ;
   14540          168026 :   PyObject * obj0 = 0 ;
   14541          168026 :   PyObject * obj1 = 0 ;
   14542          168026 :   PyObject * obj2 = 0 ;
   14543                 :   CPLErr result;
   14544                 :   
   14545          168026 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:Band_Fill",&obj0,&obj1,&obj2)) SWIG_fail;
   14546          168026 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14547          168026 :   if (!SWIG_IsOK(res1)) {
   14548               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Fill" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14549                 :   }
   14550          168026 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14551          168026 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   14552          168026 :   if (!SWIG_IsOK(ecode2)) {
   14553               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Fill" "', argument " "2"" of type '" "double""'");
   14554                 :   } 
   14555          168026 :   arg2 = static_cast< double >(val2);
   14556          168026 :   if (obj2) {
   14557             220 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
   14558             220 :     if (!SWIG_IsOK(ecode3)) {
   14559               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Fill" "', argument " "3"" of type '" "double""'");
   14560                 :     } 
   14561             220 :     arg3 = static_cast< double >(val3);
   14562                 :   }
   14563                 :   {
   14564          168026 :     if ( bUseExceptions ) {
   14565               0 :       CPLErrorReset();
   14566                 :     }
   14567          168026 :     result = (CPLErr)GDALRasterBandShadow_Fill(arg1,arg2,arg3);
   14568          168026 :     if ( bUseExceptions ) {
   14569               0 :       CPLErr eclass = CPLGetLastErrorType();
   14570               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14571               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14572                 :       }
   14573                 :     }
   14574                 :   }
   14575          336052 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14576          168026 :   return resultobj;
   14577                 : fail:
   14578               0 :   return NULL;
   14579                 : }
   14580                 : 
   14581                 : 
   14582            1378 : SWIGINTERN PyObject *_wrap_Band_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14583            1378 :   PyObject *resultobj = 0;
   14584            1378 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14585                 :   int arg2 ;
   14586                 :   int arg3 ;
   14587                 :   int arg4 ;
   14588                 :   int arg5 ;
   14589                 :   GIntBig arg6 ;
   14590            1378 :   char *arg7 = (char *) 0 ;
   14591            1378 :   int *arg8 = (int *) 0 ;
   14592            1378 :   int *arg9 = (int *) 0 ;
   14593            1378 :   int *arg10 = (int *) 0 ;
   14594            1378 :   int *arg11 = (int *) 0 ;
   14595            1378 :   int *arg12 = (int *) 0 ;
   14596            1378 :   void *argp1 = 0 ;
   14597            1378 :   int res1 = 0 ;
   14598                 :   int val2 ;
   14599            1378 :   int ecode2 = 0 ;
   14600                 :   int val3 ;
   14601            1378 :   int ecode3 = 0 ;
   14602                 :   int val4 ;
   14603            1378 :   int ecode4 = 0 ;
   14604                 :   int val5 ;
   14605            1378 :   int ecode5 = 0 ;
   14606            1378 :   int alloc6 = 0 ;
   14607                 :   int val8 ;
   14608                 :   int val9 ;
   14609                 :   int val10 ;
   14610                 :   int val11 ;
   14611                 :   int val12 ;
   14612            1378 :   PyObject * obj0 = 0 ;
   14613            1378 :   PyObject * obj1 = 0 ;
   14614            1378 :   PyObject * obj2 = 0 ;
   14615            1378 :   PyObject * obj3 = 0 ;
   14616            1378 :   PyObject * obj4 = 0 ;
   14617            1378 :   PyObject * obj5 = 0 ;
   14618            1378 :   PyObject * obj6 = 0 ;
   14619            1378 :   PyObject * obj7 = 0 ;
   14620            1378 :   PyObject * obj8 = 0 ;
   14621            1378 :   PyObject * obj9 = 0 ;
   14622            1378 :   PyObject * obj10 = 0 ;
   14623                 :   char *  kwnames[] = {
   14624                 :     (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 
   14625            1378 :   };
   14626                 :   CPLErr result;
   14627                 :   
   14628            1378 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|OOOOO:Band_WriteRaster",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
   14629            1378 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14630            1378 :   if (!SWIG_IsOK(res1)) {
   14631               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_WriteRaster" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14632                 :   }
   14633            1378 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14634            1378 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   14635            1378 :   if (!SWIG_IsOK(ecode2)) {
   14636               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_WriteRaster" "', argument " "2"" of type '" "int""'");
   14637                 :   } 
   14638            1378 :   arg2 = static_cast< int >(val2);
   14639            1378 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   14640            1378 :   if (!SWIG_IsOK(ecode3)) {
   14641               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_WriteRaster" "', argument " "3"" of type '" "int""'");
   14642                 :   } 
   14643            1378 :   arg3 = static_cast< int >(val3);
   14644            1378 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   14645            1378 :   if (!SWIG_IsOK(ecode4)) {
   14646               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_WriteRaster" "', argument " "4"" of type '" "int""'");
   14647                 :   } 
   14648            1378 :   arg4 = static_cast< int >(val4);
   14649            1378 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   14650            1378 :   if (!SWIG_IsOK(ecode5)) {
   14651               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_WriteRaster" "', argument " "5"" of type '" "int""'");
   14652                 :   } 
   14653            1378 :   arg5 = static_cast< int >(val5);
   14654                 :   {
   14655                 :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   14656                 : #if PY_VERSION_HEX>=0x03000000
   14657                 :     if (PyUnicode_Check(obj5))
   14658                 :     {
   14659                 :       size_t safeLen = 0;
   14660                 :       int ret = SWIG_AsCharPtrAndSize(obj5, (char**) &arg7, &safeLen, &alloc6);
   14661                 :       if (!SWIG_IsOK(ret)) {
   14662                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
   14663                 :       }
   14664                 :       
   14665                 :       if (safeLen) safeLen--;
   14666                 :       arg6 = (GIntBig) safeLen;
   14667                 :     }
   14668                 :     else if (PyBytes_Check(obj5))
   14669                 :     {
   14670                 :       Py_ssize_t safeLen = 0;
   14671                 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   14672                 :       arg6 = (GIntBig) safeLen;
   14673                 :     }
   14674                 :     else
   14675                 :     {
   14676                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
   14677                 :       SWIG_fail;
   14678                 :     }
   14679                 : #else
   14680            1378 :     if (PyString_Check(obj5))
   14681                 :     {
   14682            1377 :       Py_ssize_t safeLen = 0;
   14683            1377 :       PyString_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   14684            1377 :       arg6 = (GIntBig) safeLen;
   14685                 :     }
   14686                 :     else
   14687                 :     {
   14688               1 :       PyErr_SetString(PyExc_TypeError, "not a string");
   14689               1 :       SWIG_fail;
   14690                 :     }
   14691                 : #endif
   14692                 :   }
   14693            1377 :   if (obj6) {
   14694                 :     {
   14695                 :       /* %typemap(in) (int *optional_##int) */
   14696              29 :       if ( obj6 == Py_None ) {
   14697               0 :         arg8 = 0;
   14698                 :       }
   14699              29 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   14700              29 :         arg8 = (int *) &val8;
   14701                 :       }
   14702                 :       else {
   14703               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14704               0 :         SWIG_fail;
   14705                 :       }
   14706                 :     }
   14707                 :   }
   14708            1377 :   if (obj7) {
   14709                 :     {
   14710                 :       /* %typemap(in) (int *optional_##int) */
   14711              29 :       if ( obj7 == Py_None ) {
   14712               0 :         arg9 = 0;
   14713                 :       }
   14714              29 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   14715              29 :         arg9 = (int *) &val9;
   14716                 :       }
   14717                 :       else {
   14718               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14719               0 :         SWIG_fail;
   14720                 :       }
   14721                 :     }
   14722                 :   }
   14723            1377 :   if (obj8) {
   14724                 :     {
   14725                 :       /* %typemap(in) (int *optional_##int) */
   14726              50 :       if ( obj8 == Py_None ) {
   14727               0 :         arg10 = 0;
   14728                 :       }
   14729              50 :       else if ( PyArg_Parse( obj8,"i" ,&val10 ) ) {
   14730              50 :         arg10 = (int *) &val10;
   14731                 :       }
   14732                 :       else {
   14733               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14734               0 :         SWIG_fail;
   14735                 :       }
   14736                 :     }
   14737                 :   }
   14738            1377 :   if (obj9) {
   14739                 :     {
   14740                 :       /* %typemap(in) (int *optional_##int) */
   14741               0 :       if ( obj9 == Py_None ) {
   14742               0 :         arg11 = 0;
   14743                 :       }
   14744               0 :       else if ( PyArg_Parse( obj9,"i" ,&val11 ) ) {
   14745               0 :         arg11 = (int *) &val11;
   14746                 :       }
   14747                 :       else {
   14748               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14749               0 :         SWIG_fail;
   14750                 :       }
   14751                 :     }
   14752                 :   }
   14753            1377 :   if (obj10) {
   14754                 :     {
   14755                 :       /* %typemap(in) (int *optional_##int) */
   14756               0 :       if ( obj10 == Py_None ) {
   14757               0 :         arg12 = 0;
   14758                 :       }
   14759               0 :       else if ( PyArg_Parse( obj10,"i" ,&val12 ) ) {
   14760               0 :         arg12 = (int *) &val12;
   14761                 :       }
   14762                 :       else {
   14763               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14764               0 :         SWIG_fail;
   14765                 :       }
   14766                 :     }
   14767                 :   }
   14768                 :   {
   14769            1377 :     if ( bUseExceptions ) {
   14770               0 :       CPLErrorReset();
   14771                 :     }
   14772            1377 :     result = (CPLErr)GDALRasterBandShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   14773            1377 :     if ( bUseExceptions ) {
   14774               0 :       CPLErr eclass = CPLGetLastErrorType();
   14775               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14776               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14777                 :       }
   14778                 :     }
   14779                 :   }
   14780            2754 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14781                 :   {
   14782                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   14783            1377 :     if( alloc6 == SWIG_NEWOBJ ) {
   14784               0 :       delete[] arg7;
   14785                 :     }
   14786                 :   }
   14787            1377 :   return resultobj;
   14788                 : fail:
   14789                 :   {
   14790                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   14791               1 :     if( alloc6 == SWIG_NEWOBJ ) {
   14792               0 :       delete[] arg7;
   14793                 :     }
   14794                 :   }
   14795               1 :   return NULL;
   14796                 : }
   14797                 : 
   14798                 : 
   14799               8 : SWIGINTERN PyObject *_wrap_Band_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14800               8 :   PyObject *resultobj = 0;
   14801               8 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14802               8 :   void *argp1 = 0 ;
   14803               8 :   int res1 = 0 ;
   14804               8 :   PyObject * obj0 = 0 ;
   14805                 :   
   14806               8 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_FlushCache",&obj0)) SWIG_fail;
   14807               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14808               8 :   if (!SWIG_IsOK(res1)) {
   14809               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_FlushCache" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14810                 :   }
   14811               8 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14812                 :   {
   14813               8 :     if ( bUseExceptions ) {
   14814               0 :       CPLErrorReset();
   14815                 :     }
   14816                 :     GDALRasterBandShadow_FlushCache(arg1);
   14817               8 :     if ( bUseExceptions ) {
   14818               0 :       CPLErr eclass = CPLGetLastErrorType();
   14819               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14820               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14821                 :       }
   14822                 :     }
   14823                 :   }
   14824               8 :   resultobj = SWIG_Py_Void();
   14825               8 :   return resultobj;
   14826                 : fail:
   14827               0 :   return NULL;
   14828                 : }
   14829                 : 
   14830                 : 
   14831              62 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14832              62 :   PyObject *resultobj = 0;
   14833              62 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14834              62 :   void *argp1 = 0 ;
   14835              62 :   int res1 = 0 ;
   14836              62 :   PyObject * obj0 = 0 ;
   14837              62 :   GDALColorTableShadow *result = 0 ;
   14838                 :   
   14839              62 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetRasterColorTable",&obj0)) SWIG_fail;
   14840              62 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14841              62 :   if (!SWIG_IsOK(res1)) {
   14842               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14843                 :   }
   14844              62 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14845                 :   {
   14846              62 :     if ( bUseExceptions ) {
   14847               0 :       CPLErrorReset();
   14848                 :     }
   14849              62 :     result = (GDALColorTableShadow *)GDALRasterBandShadow_GetRasterColorTable(arg1);
   14850              62 :     if ( bUseExceptions ) {
   14851               0 :       CPLErr eclass = CPLGetLastErrorType();
   14852               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14853               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14854                 :       }
   14855                 :     }
   14856                 :   }
   14857              62 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   14858              62 :   return resultobj;
   14859                 : fail:
   14860               0 :   return NULL;
   14861                 : }
   14862                 : 
   14863                 : 
   14864              13 : SWIGINTERN PyObject *_wrap_Band_GetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14865              13 :   PyObject *resultobj = 0;
   14866              13 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14867              13 :   void *argp1 = 0 ;
   14868              13 :   int res1 = 0 ;
   14869              13 :   PyObject * obj0 = 0 ;
   14870              13 :   GDALColorTableShadow *result = 0 ;
   14871                 :   
   14872              13 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetColorTable",&obj0)) SWIG_fail;
   14873              13 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14874              13 :   if (!SWIG_IsOK(res1)) {
   14875               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14876                 :   }
   14877              13 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14878                 :   {
   14879              13 :     if ( bUseExceptions ) {
   14880               0 :       CPLErrorReset();
   14881                 :     }
   14882              13 :     result = (GDALColorTableShadow *)GDALRasterBandShadow_GetColorTable(arg1);
   14883              13 :     if ( bUseExceptions ) {
   14884               0 :       CPLErr eclass = CPLGetLastErrorType();
   14885               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14886               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14887                 :       }
   14888                 :     }
   14889                 :   }
   14890              13 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   14891              13 :   return resultobj;
   14892                 : fail:
   14893               0 :   return NULL;
   14894                 : }
   14895                 : 
   14896                 : 
   14897              17 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14898              17 :   PyObject *resultobj = 0;
   14899              17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14900              17 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   14901              17 :   void *argp1 = 0 ;
   14902              17 :   int res1 = 0 ;
   14903              17 :   void *argp2 = 0 ;
   14904              17 :   int res2 = 0 ;
   14905              17 :   PyObject * obj0 = 0 ;
   14906              17 :   PyObject * obj1 = 0 ;
   14907                 :   int result;
   14908                 :   
   14909              17 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetRasterColorTable",&obj0,&obj1)) SWIG_fail;
   14910              17 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14911              17 :   if (!SWIG_IsOK(res1)) {
   14912               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14913                 :   }
   14914              17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14915              17 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   14916              17 :   if (!SWIG_IsOK(res2)) {
   14917               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetRasterColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   14918                 :   }
   14919              17 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   14920                 :   {
   14921              17 :     if ( bUseExceptions ) {
   14922               0 :       CPLErrorReset();
   14923                 :     }
   14924              17 :     result = (int)GDALRasterBandShadow_SetRasterColorTable(arg1,arg2);
   14925              17 :     if ( bUseExceptions ) {
   14926               0 :       CPLErr eclass = CPLGetLastErrorType();
   14927               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14928               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14929                 :       }
   14930                 :     }
   14931                 :   }
   14932              17 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14933              17 :   return resultobj;
   14934                 : fail:
   14935               0 :   return NULL;
   14936                 : }
   14937                 : 
   14938                 : 
   14939               4 : SWIGINTERN PyObject *_wrap_Band_SetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14940               4 :   PyObject *resultobj = 0;
   14941               4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14942               4 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   14943               4 :   void *argp1 = 0 ;
   14944               4 :   int res1 = 0 ;
   14945               4 :   void *argp2 = 0 ;
   14946               4 :   int res2 = 0 ;
   14947               4 :   PyObject * obj0 = 0 ;
   14948               4 :   PyObject * obj1 = 0 ;
   14949                 :   int result;
   14950                 :   
   14951               4 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetColorTable",&obj0,&obj1)) SWIG_fail;
   14952               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14953               4 :   if (!SWIG_IsOK(res1)) {
   14954               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14955                 :   }
   14956               4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14957               4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   14958               4 :   if (!SWIG_IsOK(res2)) {
   14959               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   14960                 :   }
   14961               4 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   14962                 :   {
   14963               4 :     if ( bUseExceptions ) {
   14964               0 :       CPLErrorReset();
   14965                 :     }
   14966               4 :     result = (int)GDALRasterBandShadow_SetColorTable(arg1,arg2);
   14967               4 :     if ( bUseExceptions ) {
   14968               0 :       CPLErr eclass = CPLGetLastErrorType();
   14969               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14970               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14971                 :       }
   14972                 :     }
   14973                 :   }
   14974               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14975               4 :   return resultobj;
   14976                 : fail:
   14977               0 :   return NULL;
   14978                 : }
   14979                 : 
   14980                 : 
   14981              22 : SWIGINTERN PyObject *_wrap_Band_GetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14982              22 :   PyObject *resultobj = 0;
   14983              22 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14984              22 :   void *argp1 = 0 ;
   14985              22 :   int res1 = 0 ;
   14986              22 :   PyObject * obj0 = 0 ;
   14987              22 :   GDALRasterAttributeTableShadow *result = 0 ;
   14988                 :   
   14989              22 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetDefaultRAT",&obj0)) SWIG_fail;
   14990              22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14991              22 :   if (!SWIG_IsOK(res1)) {
   14992               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14993                 :   }
   14994              22 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14995                 :   {
   14996              22 :     if ( bUseExceptions ) {
   14997               0 :       CPLErrorReset();
   14998                 :     }
   14999              22 :     result = (GDALRasterAttributeTableShadow *)GDALRasterBandShadow_GetDefaultRAT(arg1);
   15000              22 :     if ( bUseExceptions ) {
   15001               0 :       CPLErr eclass = CPLGetLastErrorType();
   15002               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15003               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15004                 :       }
   15005                 :     }
   15006                 :   }
   15007              22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   15008              22 :   return resultobj;
   15009                 : fail:
   15010               0 :   return NULL;
   15011                 : }
   15012                 : 
   15013                 : 
   15014               2 : SWIGINTERN PyObject *_wrap_Band_SetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15015               2 :   PyObject *resultobj = 0;
   15016               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15017               2 :   GDALRasterAttributeTableShadow *arg2 = (GDALRasterAttributeTableShadow *) 0 ;
   15018               2 :   void *argp1 = 0 ;
   15019               2 :   int res1 = 0 ;
   15020               2 :   void *argp2 = 0 ;
   15021               2 :   int res2 = 0 ;
   15022               2 :   PyObject * obj0 = 0 ;
   15023               2 :   PyObject * obj1 = 0 ;
   15024                 :   int result;
   15025                 :   
   15026               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetDefaultRAT",&obj0,&obj1)) SWIG_fail;
   15027               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15028               2 :   if (!SWIG_IsOK(res1)) {
   15029               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15030                 :   }
   15031               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15032               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   15033               2 :   if (!SWIG_IsOK(res2)) {
   15034               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetDefaultRAT" "', argument " "2"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   15035                 :   }
   15036               2 :   arg2 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp2);
   15037                 :   {
   15038               2 :     if ( bUseExceptions ) {
   15039               0 :       CPLErrorReset();
   15040                 :     }
   15041               2 :     result = (int)GDALRasterBandShadow_SetDefaultRAT(arg1,arg2);
   15042               2 :     if ( bUseExceptions ) {
   15043               0 :       CPLErr eclass = CPLGetLastErrorType();
   15044               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15045               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15046                 :       }
   15047                 :     }
   15048                 :   }
   15049               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15050               2 :   return resultobj;
   15051                 : fail:
   15052               0 :   return NULL;
   15053                 : }
   15054                 : 
   15055                 : 
   15056             126 : SWIGINTERN PyObject *_wrap_Band_GetMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15057             126 :   PyObject *resultobj = 0;
   15058             126 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15059             126 :   void *argp1 = 0 ;
   15060             126 :   int res1 = 0 ;
   15061             126 :   PyObject * obj0 = 0 ;
   15062             126 :   GDALRasterBandShadow *result = 0 ;
   15063                 :   
   15064             126 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMaskBand",&obj0)) SWIG_fail;
   15065             126 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15066             126 :   if (!SWIG_IsOK(res1)) {
   15067               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15068                 :   }
   15069             126 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15070                 :   {
   15071             126 :     if ( bUseExceptions ) {
   15072               0 :       CPLErrorReset();
   15073                 :     }
   15074             126 :     result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetMaskBand(arg1);
   15075             126 :     if ( bUseExceptions ) {
   15076               0 :       CPLErr eclass = CPLGetLastErrorType();
   15077               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15078               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15079                 :       }
   15080                 :     }
   15081                 :   }
   15082             126 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15083             126 :   return resultobj;
   15084                 : fail:
   15085               0 :   return NULL;
   15086                 : }
   15087                 : 
   15088                 : 
   15089              84 : SWIGINTERN PyObject *_wrap_Band_GetMaskFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15090              84 :   PyObject *resultobj = 0;
   15091              84 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15092              84 :   void *argp1 = 0 ;
   15093              84 :   int res1 = 0 ;
   15094              84 :   PyObject * obj0 = 0 ;
   15095                 :   int result;
   15096                 :   
   15097              84 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMaskFlags",&obj0)) SWIG_fail;
   15098              84 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15099              84 :   if (!SWIG_IsOK(res1)) {
   15100               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskFlags" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15101                 :   }
   15102              84 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15103                 :   {
   15104              84 :     if ( bUseExceptions ) {
   15105               0 :       CPLErrorReset();
   15106                 :     }
   15107              84 :     result = (int)GDALRasterBandShadow_GetMaskFlags(arg1);
   15108              84 :     if ( bUseExceptions ) {
   15109               0 :       CPLErr eclass = CPLGetLastErrorType();
   15110               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15111               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15112                 :       }
   15113                 :     }
   15114                 :   }
   15115              84 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15116              84 :   return resultobj;
   15117                 : fail:
   15118               0 :   return NULL;
   15119                 : }
   15120                 : 
   15121                 : 
   15122              12 : SWIGINTERN PyObject *_wrap_Band_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15123              12 :   PyObject *resultobj = 0;
   15124              12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15125                 :   int arg2 ;
   15126              12 :   void *argp1 = 0 ;
   15127              12 :   int res1 = 0 ;
   15128                 :   int val2 ;
   15129              12 :   int ecode2 = 0 ;
   15130              12 :   PyObject * obj0 = 0 ;
   15131              12 :   PyObject * obj1 = 0 ;
   15132                 :   CPLErr result;
   15133                 :   
   15134              12 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_CreateMaskBand",&obj0,&obj1)) SWIG_fail;
   15135              12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15136              12 :   if (!SWIG_IsOK(res1)) {
   15137               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_CreateMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15138                 :   }
   15139              12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15140              12 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   15141              12 :   if (!SWIG_IsOK(ecode2)) {
   15142               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   15143                 :   } 
   15144              12 :   arg2 = static_cast< int >(val2);
   15145                 :   {
   15146              12 :     if ( bUseExceptions ) {
   15147               0 :       CPLErrorReset();
   15148                 :     }
   15149              12 :     result = (CPLErr)GDALRasterBandShadow_CreateMaskBand(arg1,arg2);
   15150              12 :     if ( bUseExceptions ) {
   15151               0 :       CPLErr eclass = CPLGetLastErrorType();
   15152               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15153               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15154                 :       }
   15155                 :     }
   15156                 :   }
   15157              24 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15158              12 :   return resultobj;
   15159                 : fail:
   15160               0 :   return NULL;
   15161                 : }
   15162                 : 
   15163                 : 
   15164               6 : SWIGINTERN PyObject *_wrap_Band_GetHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15165               6 :   PyObject *resultobj = 0;
   15166               6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15167               6 :   double arg2 = (double) -0.5 ;
   15168               6 :   double arg3 = (double) 255.5 ;
   15169               6 :   int arg4 = (int) 256 ;
   15170               6 :   int *arg5 = (int *) NULL ;
   15171               6 :   int arg6 = (int) 0 ;
   15172               6 :   int arg7 = (int) 1 ;
   15173               6 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   15174               6 :   void *arg9 = (void *) NULL ;
   15175               6 :   void *argp1 = 0 ;
   15176               6 :   int res1 = 0 ;
   15177                 :   double val2 ;
   15178               6 :   int ecode2 = 0 ;
   15179                 :   double val3 ;
   15180               6 :   int ecode3 = 0 ;
   15181                 :   int val6 ;
   15182               6 :   int ecode6 = 0 ;
   15183                 :   int val7 ;
   15184               6 :   int ecode7 = 0 ;
   15185               6 :   PyObject * obj0 = 0 ;
   15186               6 :   PyObject * obj1 = 0 ;
   15187               6 :   PyObject * obj2 = 0 ;
   15188               6 :   PyObject * obj3 = 0 ;
   15189               6 :   PyObject * obj4 = 0 ;
   15190               6 :   PyObject * obj5 = 0 ;
   15191               6 :   PyObject * obj6 = 0 ;
   15192               6 :   PyObject * obj7 = 0 ;
   15193                 :   char *  kwnames[] = {
   15194                 :     (char *) "self",(char *) "min",(char *) "max",(char *) "buckets",(char *) "include_out_of_range",(char *) "approx_ok",(char *) "callback",(char *) "callback_data", NULL 
   15195               6 :   };
   15196                 :   CPLErr result;
   15197                 :   
   15198                 :   {
   15199                 :     /* %typemap(in) int buckets, int* panHistogram -> list */
   15200               6 :     arg5 = (int *) VSICalloc(sizeof(int),arg4);
   15201                 :   }
   15202                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   15203                 :   PyProgressData *psProgressInfo;
   15204               6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   15205               6 :   psProgressInfo->nLastReported = -1;
   15206               6 :   psProgressInfo->psPyCallback = NULL;
   15207               6 :   psProgressInfo->psPyCallbackData = NULL;
   15208               6 :   arg9 = psProgressInfo;
   15209               6 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:Band_GetHistogram",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   15210               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15211               6 :   if (!SWIG_IsOK(res1)) {
   15212               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15213                 :   }
   15214               6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15215               6 :   if (obj1) {
   15216               3 :     ecode2 = SWIG_AsVal_double(obj1, &val2);
   15217               3 :     if (!SWIG_IsOK(ecode2)) {
   15218               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetHistogram" "', argument " "2"" of type '" "double""'");
   15219                 :     } 
   15220               3 :     arg2 = static_cast< double >(val2);
   15221                 :   }
   15222               6 :   if (obj2) {
   15223               3 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
   15224               3 :     if (!SWIG_IsOK(ecode3)) {
   15225               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetHistogram" "', argument " "3"" of type '" "double""'");
   15226                 :     } 
   15227               3 :     arg3 = static_cast< double >(val3);
   15228                 :   }
   15229               6 :   if (obj3) {
   15230                 :     {
   15231                 :       /* %typemap(in) int buckets, int* panHistogram -> list */
   15232               3 :       int requested_buckets = 0;
   15233               3 :       SWIG_AsVal_int(obj3, &requested_buckets);
   15234               3 :       if( requested_buckets != arg4 )
   15235                 :       {
   15236               3 :         arg4 = requested_buckets;
   15237               3 :         if (requested_buckets <= 0 || requested_buckets > (int)(INT_MAX / sizeof(int)))
   15238                 :         {
   15239               0 :           PyErr_SetString( PyExc_RuntimeError, "Bad value for buckets" );
   15240               0 :           SWIG_fail;
   15241                 :         }
   15242               3 :         arg5 = (int *) VSIRealloc(arg5, sizeof(int) * requested_buckets);
   15243                 :       }
   15244               3 :       if (arg5 == NULL)
   15245                 :       {
   15246               0 :         PyErr_SetString( PyExc_RuntimeError, "Cannot allocate buckets" );
   15247               0 :         SWIG_fail;
   15248                 :       }
   15249                 :     }
   15250                 :   }
   15251               6 :   if (obj4) {
   15252               2 :     ecode6 = SWIG_AsVal_int(obj4, &val6);
   15253               2 :     if (!SWIG_IsOK(ecode6)) {
   15254               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetHistogram" "', argument " "6"" of type '" "int""'");
   15255                 :     } 
   15256               2 :     arg6 = static_cast< int >(val6);
   15257                 :   }
   15258               6 :   if (obj5) {
   15259               2 :     ecode7 = SWIG_AsVal_int(obj5, &val7);
   15260               2 :     if (!SWIG_IsOK(ecode7)) {
   15261               0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetHistogram" "', argument " "7"" of type '" "int""'");
   15262                 :     } 
   15263               2 :     arg7 = static_cast< int >(val7);
   15264                 :   }
   15265               6 :   if (obj6) {
   15266                 :     {
   15267                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   15268                 :       /* callback_func typemap */
   15269               0 :       if (obj6 && obj6 != Py_None ) {
   15270               0 :         void* cbfunction = NULL;
   15271                 :         SWIG_ConvertPtr( obj6, 
   15272                 :           (void**)&cbfunction,
   15273                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   15274               0 :           SWIG_POINTER_EXCEPTION | 0 );
   15275                 :         
   15276               0 :         if ( cbfunction == GDALTermProgress ) {
   15277               0 :           arg8 = GDALTermProgress;
   15278                 :         } else {
   15279               0 :           if (!PyCallable_Check(obj6)) {
   15280                 :             PyErr_SetString( PyExc_RuntimeError, 
   15281               0 :               "Object given is not a Python function" );
   15282               0 :             SWIG_fail;
   15283                 :           }
   15284               0 :           psProgressInfo->psPyCallback = obj6;
   15285               0 :           arg8 = PyProgressProxy;
   15286                 :         }
   15287                 :         
   15288                 :       }
   15289                 :       
   15290                 :     }
   15291                 :   }
   15292               6 :   if (obj7) {
   15293                 :     {
   15294                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   15295               0 :       psProgressInfo->psPyCallbackData = obj7 ;
   15296                 :     }
   15297                 :   }
   15298                 :   {
   15299               6 :     if ( bUseExceptions ) {
   15300               0 :       CPLErrorReset();
   15301                 :     }
   15302               6 :     result = (CPLErr)GDALRasterBandShadow_GetHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   15303               6 :     if ( bUseExceptions ) {
   15304               0 :       CPLErr eclass = CPLGetLastErrorType();
   15305               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15306               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15307                 :       }
   15308                 :     }
   15309                 :   }
   15310              12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15311                 :   {
   15312                 :     /* %typemap(out) int buckets, int* panHistogram -> list */
   15313               6 :     int *integerarray = arg5;
   15314               6 :     if ( integerarray == NULL ) {
   15315               0 :       resultobj = Py_None;
   15316               0 :       Py_INCREF( resultobj );
   15317                 :     }
   15318                 :     else {
   15319               6 :       resultobj = PyList_New( arg4 );
   15320             832 :       for ( int i = 0; i < arg4; ++i ) {
   15321             826 :         PyObject *o =  PyInt_FromLong( integerarray[i] );
   15322             826 :         PyList_SetItem(resultobj, i, o );
   15323                 :       }
   15324                 :     }
   15325                 :   }
   15326                 :   {
   15327                 :     /* %typemap(freearg) (int buckets, int* panHistogram)*/
   15328               6 :     if ( arg5 ) {
   15329               6 :       VSIFree( arg5 );
   15330                 :     }
   15331                 :   }
   15332                 :   {
   15333                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15334                 :     
   15335               6 :     CPLFree(psProgressInfo);
   15336                 :     
   15337                 :   }
   15338               6 :   return resultobj;
   15339                 : fail:
   15340                 :   {
   15341                 :     /* %typemap(freearg) (int buckets, int* panHistogram)*/
   15342               0 :     if ( arg5 ) {
   15343               0 :       VSIFree( arg5 );
   15344                 :     }
   15345                 :   }
   15346                 :   {
   15347                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15348                 :     
   15349               0 :     CPLFree(psProgressInfo);
   15350                 :     
   15351                 :   }
   15352               0 :   return NULL;
   15353                 : }
   15354                 : 
   15355                 : 
   15356               4 : SWIGINTERN PyObject *_wrap_Band_GetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15357               4 :   PyObject *resultobj = 0;
   15358               4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15359               4 :   double *arg2 = (double *) NULL ;
   15360               4 :   double *arg3 = (double *) NULL ;
   15361               4 :   int *arg4 = (int *) NULL ;
   15362               4 :   int **arg5 = (int **) NULL ;
   15363               4 :   int arg6 = (int) 1 ;
   15364               4 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   15365               4 :   void *arg8 = (void *) NULL ;
   15366               4 :   void *argp1 = 0 ;
   15367               4 :   int res1 = 0 ;
   15368               4 :   void *argp2 = 0 ;
   15369               4 :   int res2 = 0 ;
   15370               4 :   void *argp3 = 0 ;
   15371               4 :   int res3 = 0 ;
   15372               4 :   void *argp4 = 0 ;
   15373               4 :   int res4 = 0 ;
   15374               4 :   void *argp5 = 0 ;
   15375               4 :   int res5 = 0 ;
   15376                 :   int val6 ;
   15377               4 :   int ecode6 = 0 ;
   15378               4 :   PyObject * obj0 = 0 ;
   15379               4 :   PyObject * obj1 = 0 ;
   15380               4 :   PyObject * obj2 = 0 ;
   15381               4 :   PyObject * obj3 = 0 ;
   15382               4 :   PyObject * obj4 = 0 ;
   15383               4 :   PyObject * obj5 = 0 ;
   15384               4 :   PyObject * obj6 = 0 ;
   15385               4 :   PyObject * obj7 = 0 ;
   15386                 :   char *  kwnames[] = {
   15387                 :     (char *) "self",(char *) "min_ret",(char *) "max_ret",(char *) "buckets_ret",(char *) "ppanHistogram",(char *) "force",(char *) "callback",(char *) "callback_data", NULL 
   15388               4 :   };
   15389                 :   CPLErr result;
   15390                 :   
   15391                 :   double min_val, max_val;
   15392                 :   int buckets_val;
   15393                 :   int *panHistogram;
   15394                 :   
   15395               4 :   arg2 = &min_val;
   15396               4 :   arg3 = &max_val;
   15397               4 :   arg4 = &buckets_val;
   15398               4 :   arg5 = &panHistogram;
   15399                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   15400                 :   PyProgressData *psProgressInfo;
   15401               4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   15402               4 :   psProgressInfo->nLastReported = -1;
   15403               4 :   psProgressInfo->psPyCallback = NULL;
   15404               4 :   psProgressInfo->psPyCallbackData = NULL;
   15405               4 :   arg8 = psProgressInfo;
   15406               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:Band_GetDefaultHistogram",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   15407               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15408               4 :   if (!SWIG_IsOK(res1)) {
   15409               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15410                 :   }
   15411               4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15412               4 :   if (obj1) {
   15413               0 :     res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
   15414               0 :     if (!SWIG_IsOK(res2)) {
   15415               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_GetDefaultHistogram" "', argument " "2"" of type '" "double *""'"); 
   15416                 :     }
   15417               0 :     arg2 = reinterpret_cast< double * >(argp2);
   15418                 :   }
   15419               4 :   if (obj2) {
   15420               0 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
   15421               0 :     if (!SWIG_IsOK(res3)) {
   15422               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_GetDefaultHistogram" "', argument " "3"" of type '" "double *""'"); 
   15423                 :     }
   15424               0 :     arg3 = reinterpret_cast< double * >(argp3);
   15425                 :   }
   15426               4 :   if (obj3) {
   15427               0 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
   15428               0 :     if (!SWIG_IsOK(res4)) {
   15429               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_GetDefaultHistogram" "', argument " "4"" of type '" "int *""'"); 
   15430                 :     }
   15431               0 :     arg4 = reinterpret_cast< int * >(argp4);
   15432                 :   }
   15433               4 :   if (obj4) {
   15434               0 :     res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_int, 0 |  0 );
   15435               0 :     if (!SWIG_IsOK(res5)) {
   15436               0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Band_GetDefaultHistogram" "', argument " "5"" of type '" "int **""'"); 
   15437                 :     }
   15438               0 :     arg5 = reinterpret_cast< int ** >(argp5);
   15439                 :   }
   15440               4 :   if (obj5) {
   15441               4 :     ecode6 = SWIG_AsVal_int(obj5, &val6);
   15442               4 :     if (!SWIG_IsOK(ecode6)) {
   15443               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDefaultHistogram" "', argument " "6"" of type '" "int""'");
   15444                 :     } 
   15445               4 :     arg6 = static_cast< int >(val6);
   15446                 :   }
   15447               4 :   if (obj6) {
   15448                 :     {
   15449                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   15450                 :       /* callback_func typemap */
   15451               1 :       if (obj6 && obj6 != Py_None ) {
   15452               1 :         void* cbfunction = NULL;
   15453                 :         SWIG_ConvertPtr( obj6, 
   15454                 :           (void**)&cbfunction,
   15455                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   15456               1 :           SWIG_POINTER_EXCEPTION | 0 );
   15457                 :         
   15458               1 :         if ( cbfunction == GDALTermProgress ) {
   15459               1 :           arg7 = GDALTermProgress;
   15460                 :         } else {
   15461               0 :           if (!PyCallable_Check(obj6)) {
   15462                 :             PyErr_SetString( PyExc_RuntimeError, 
   15463               0 :               "Object given is not a Python function" );
   15464               0 :             SWIG_fail;
   15465                 :           }
   15466               0 :           psProgressInfo->psPyCallback = obj6;
   15467               0 :           arg7 = PyProgressProxy;
   15468                 :         }
   15469                 :         
   15470                 :       }
   15471                 :       
   15472                 :     }
   15473                 :   }
   15474               4 :   if (obj7) {
   15475                 :     {
   15476                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   15477               0 :       psProgressInfo->psPyCallbackData = obj7 ;
   15478                 :     }
   15479                 :   }
   15480                 :   {
   15481               4 :     if ( bUseExceptions ) {
   15482               0 :       CPLErrorReset();
   15483                 :     }
   15484               4 :     result = (CPLErr)GDALRasterBandShadow_GetDefaultHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   15485               4 :     if ( bUseExceptions ) {
   15486               0 :       CPLErr eclass = CPLGetLastErrorType();
   15487               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15488               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15489                 :       }
   15490                 :     }
   15491                 :   }
   15492               8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15493                 :   {
   15494                 :     int i;
   15495               4 :     PyObject *psList = NULL;
   15496                 :     
   15497               4 :     Py_XDECREF(resultobj);
   15498                 :     
   15499               4 :     if (panHistogram)
   15500                 :     {
   15501               3 :       psList = PyList_New(buckets_val);
   15502             517 :       for( i = 0; i < buckets_val; i++ )
   15503             514 :       PyList_SetItem(psList, i, Py_BuildValue("i", panHistogram[i] ));
   15504                 :       
   15505               3 :       CPLFree( panHistogram );
   15506                 :       
   15507               3 :       resultobj = Py_BuildValue( "(ddiO)", min_val, max_val, buckets_val, psList );
   15508               3 :       Py_XDECREF(psList);
   15509                 :     }
   15510                 :     else
   15511                 :     {
   15512               1 :       resultobj = Py_None;
   15513               1 :       Py_INCREF(resultobj);
   15514                 :     }
   15515                 :   }
   15516                 :   {
   15517                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15518                 :     
   15519               4 :     CPLFree(psProgressInfo);
   15520                 :     
   15521                 :   }
   15522               4 :   return resultobj;
   15523                 : fail:
   15524                 :   {
   15525                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15526                 :     
   15527               0 :     CPLFree(psProgressInfo);
   15528                 :     
   15529                 :   }
   15530               0 :   return NULL;
   15531                 : }
   15532                 : 
   15533                 : 
   15534               3 : SWIGINTERN PyObject *_wrap_Band_SetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15535               3 :   PyObject *resultobj = 0;
   15536               3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15537                 :   double arg2 ;
   15538                 :   double arg3 ;
   15539                 :   int arg4 ;
   15540               3 :   int *arg5 = (int *) 0 ;
   15541               3 :   void *argp1 = 0 ;
   15542               3 :   int res1 = 0 ;
   15543                 :   double val2 ;
   15544               3 :   int ecode2 = 0 ;
   15545                 :   double val3 ;
   15546               3 :   int ecode3 = 0 ;
   15547               3 :   PyObject * obj0 = 0 ;
   15548               3 :   PyObject * obj1 = 0 ;
   15549               3 :   PyObject * obj2 = 0 ;
   15550               3 :   PyObject * obj3 = 0 ;
   15551                 :   CPLErr result;
   15552                 :   
   15553               3 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:Band_SetDefaultHistogram",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   15554               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15555               3 :   if (!SWIG_IsOK(res1)) {
   15556               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15557                 :   }
   15558               3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15559               3 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   15560               3 :   if (!SWIG_IsOK(ecode2)) {
   15561               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetDefaultHistogram" "', argument " "2"" of type '" "double""'");
   15562                 :   } 
   15563               3 :   arg2 = static_cast< double >(val2);
   15564               3 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   15565               3 :   if (!SWIG_IsOK(ecode3)) {
   15566               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetDefaultHistogram" "', argument " "3"" of type '" "double""'");
   15567                 :   } 
   15568               3 :   arg3 = static_cast< double >(val3);
   15569                 :   {
   15570                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   15571                 :     /* check if is List */
   15572               3 :     if ( !PySequence_Check(obj3) ) {
   15573               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   15574               0 :       SWIG_fail;
   15575                 :     }
   15576               3 :     arg4 = PySequence_Size(obj3);
   15577               3 :     arg5 = (int*) malloc(arg4*sizeof(int));
   15578               7 :     for( int i = 0; i<arg4; i++ ) {
   15579               4 :       PyObject *o = PySequence_GetItem(obj3,i);
   15580               4 :       if ( !PyArg_Parse(o,"i",&arg5[i]) ) {
   15581               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
   15582               0 :         Py_DECREF(o);
   15583                 :         SWIG_fail;
   15584                 :       }
   15585               4 :       Py_DECREF(o);
   15586                 :     }
   15587                 :   }
   15588                 :   {
   15589               3 :     if ( bUseExceptions ) {
   15590               0 :       CPLErrorReset();
   15591                 :     }
   15592               3 :     result = (CPLErr)GDALRasterBandShadow_SetDefaultHistogram(arg1,arg2,arg3,arg4,arg5);
   15593               3 :     if ( bUseExceptions ) {
   15594               0 :       CPLErr eclass = CPLGetLastErrorType();
   15595               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15596               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15597                 :       }
   15598                 :     }
   15599                 :   }
   15600               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15601                 :   {
   15602                 :     /* %typemap(freearg) (int nList, int* pList) */
   15603               3 :     if (arg5) {
   15604               3 :       free((void*) arg5);
   15605                 :     }
   15606                 :   }
   15607               3 :   return resultobj;
   15608                 : fail:
   15609                 :   {
   15610                 :     /* %typemap(freearg) (int nList, int* pList) */
   15611               0 :     if (arg5) {
   15612               0 :       free((void*) arg5);
   15613                 :     }
   15614                 :   }
   15615               0 :   return NULL;
   15616                 : }
   15617                 : 
   15618                 : 
   15619              17 : SWIGINTERN PyObject *_wrap_Band_HasArbitraryOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15620              17 :   PyObject *resultobj = 0;
   15621              17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15622              17 :   void *argp1 = 0 ;
   15623              17 :   int res1 = 0 ;
   15624              17 :   PyObject * obj0 = 0 ;
   15625                 :   bool result;
   15626                 :   
   15627              17 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_HasArbitraryOverviews",&obj0)) SWIG_fail;
   15628              17 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15629              17 :   if (!SWIG_IsOK(res1)) {
   15630               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_HasArbitraryOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15631                 :   }
   15632              17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15633                 :   {
   15634              17 :     if ( bUseExceptions ) {
   15635               0 :       CPLErrorReset();
   15636                 :     }
   15637              17 :     result = (bool)GDALRasterBandShadow_HasArbitraryOverviews(arg1);
   15638              17 :     if ( bUseExceptions ) {
   15639               0 :       CPLErr eclass = CPLGetLastErrorType();
   15640               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15641               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15642                 :       }
   15643                 :     }
   15644                 :   }
   15645              34 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   15646              17 :   return resultobj;
   15647                 : fail:
   15648               0 :   return NULL;
   15649                 : }
   15650                 : 
   15651                 : 
   15652               6 : SWIGINTERN PyObject *_wrap_Band_GetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15653               6 :   PyObject *resultobj = 0;
   15654               6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15655               6 :   void *argp1 = 0 ;
   15656               6 :   int res1 = 0 ;
   15657               6 :   PyObject * obj0 = 0 ;
   15658               6 :   char **result = 0 ;
   15659                 :   
   15660               6 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetCategoryNames",&obj0)) SWIG_fail;
   15661               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15662               6 :   if (!SWIG_IsOK(res1)) {
   15663               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15664                 :   }
   15665               6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15666                 :   {
   15667               6 :     if ( bUseExceptions ) {
   15668               0 :       CPLErrorReset();
   15669                 :     }
   15670               6 :     result = (char **)GDALRasterBandShadow_GetCategoryNames(arg1);
   15671               6 :     if ( bUseExceptions ) {
   15672               0 :       CPLErr eclass = CPLGetLastErrorType();
   15673               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15674               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15675                 :       }
   15676                 :     }
   15677                 :   }
   15678                 :   {
   15679                 :     /* %typemap(out) char **options -> ( string ) */
   15680               6 :     char **stringarray = result;
   15681               6 :     if ( stringarray == NULL ) {
   15682               1 :       resultobj = Py_None;
   15683               1 :       Py_INCREF( resultobj );
   15684                 :     }
   15685                 :     else {
   15686               5 :       int len = CSLCount( stringarray );
   15687               5 :       resultobj = PyList_New( len );
   15688             106 :       for ( int i = 0; i < len; ++i ) {
   15689             101 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   15690             101 :         PyList_SetItem(resultobj, i, o );
   15691                 :       }
   15692                 :     }
   15693                 :   }
   15694               6 :   return resultobj;
   15695                 : fail:
   15696               0 :   return NULL;
   15697                 : }
   15698                 : 
   15699                 : 
   15700               1 : SWIGINTERN PyObject *_wrap_Band_SetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15701               1 :   PyObject *resultobj = 0;
   15702               1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15703               1 :   char **arg2 = (char **) 0 ;
   15704               1 :   void *argp1 = 0 ;
   15705               1 :   int res1 = 0 ;
   15706               1 :   PyObject * obj0 = 0 ;
   15707               1 :   PyObject * obj1 = 0 ;
   15708                 :   CPLErr result;
   15709                 :   
   15710               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetCategoryNames",&obj0,&obj1)) SWIG_fail;
   15711               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15712               1 :   if (!SWIG_IsOK(res1)) {
   15713               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15714                 :   }
   15715               1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15716                 :   {
   15717                 :     /* %typemap(in) char **options */
   15718                 :     /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   15719               1 :     if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
   15720                 :   #if PY_VERSION_HEX < 0x03000000
   15721                 :       || PyString_Check(obj1)
   15722                 :   #endif
   15723                 :       ) {
   15724               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   15725               0 :       SWIG_fail;
   15726                 :     }
   15727                 :     
   15728               1 :     int size = PySequence_Size(obj1);
   15729               3 :     for (int i = 0; i < size; i++) {
   15730               2 :       PyObject* pyObj = PySequence_GetItem(obj1,i);
   15731               2 :       if (PyUnicode_Check(pyObj))
   15732                 :       {
   15733                 :         char *pszStr;
   15734                 :         Py_ssize_t nLen;
   15735               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   15736                 : #if PY_VERSION_HEX >= 0x03000000
   15737                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   15738                 : #else
   15739               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   15740                 : #endif
   15741               0 :         arg2 = CSLAddString( arg2, pszStr );
   15742               0 :         Py_XDECREF(pyUTF8Str);
   15743                 :       }
   15744                 : #if PY_VERSION_HEX >= 0x03000000
   15745                 :       else if (PyBytes_Check(pyObj))
   15746                 :       arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   15747                 : #else
   15748               2 :       else if (PyString_Check(pyObj))
   15749               2 :       arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   15750                 : #endif
   15751                 :       else
   15752                 :       {
   15753               0 :         Py_DECREF(pyObj);
   15754               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   15755               0 :         SWIG_fail;
   15756                 :       }
   15757               2 :       Py_DECREF(pyObj);
   15758                 :     }
   15759                 :   }
   15760                 :   {
   15761               1 :     if ( bUseExceptions ) {
   15762               0 :       CPLErrorReset();
   15763                 :     }
   15764               1 :     result = (CPLErr)GDALRasterBandShadow_SetCategoryNames(arg1,arg2);
   15765               1 :     if ( bUseExceptions ) {
   15766               0 :       CPLErr eclass = CPLGetLastErrorType();
   15767               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15768               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15769                 :       }
   15770                 :     }
   15771                 :   }
   15772               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15773                 :   {
   15774                 :     /* %typemap(freearg) char **options */
   15775               1 :     CSLDestroy( arg2 );
   15776                 :   }
   15777               1 :   return resultobj;
   15778                 : fail:
   15779                 :   {
   15780                 :     /* %typemap(freearg) char **options */
   15781               0 :     CSLDestroy( arg2 );
   15782                 :   }
   15783               0 :   return NULL;
   15784                 : }
   15785                 : 
   15786                 : 
   15787             367 : SWIGINTERN PyObject *_wrap_Band_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15788             367 :   PyObject *resultobj = 0;
   15789             367 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15790                 :   int arg2 ;
   15791                 :   int arg3 ;
   15792                 :   int arg4 ;
   15793                 :   int arg5 ;
   15794             367 :   void **arg6 = (void **) 0 ;
   15795             367 :   int *arg7 = (int *) 0 ;
   15796             367 :   int *arg8 = (int *) 0 ;
   15797             367 :   int *arg9 = (int *) 0 ;
   15798             367 :   int *arg10 = (int *) 0 ;
   15799             367 :   int *arg11 = (int *) 0 ;
   15800             367 :   void *argp1 = 0 ;
   15801             367 :   int res1 = 0 ;
   15802                 :   int val2 ;
   15803             367 :   int ecode2 = 0 ;
   15804                 :   int val3 ;
   15805             367 :   int ecode3 = 0 ;
   15806                 :   int val4 ;
   15807             367 :   int ecode4 = 0 ;
   15808                 :   int val5 ;
   15809             367 :   int ecode5 = 0 ;
   15810             367 :   void *pyObject6 = NULL ;
   15811                 :   int val7 ;
   15812                 :   int val8 ;
   15813                 :   int val9 ;
   15814                 :   int val10 ;
   15815                 :   int val11 ;
   15816             367 :   PyObject * obj0 = 0 ;
   15817             367 :   PyObject * obj1 = 0 ;
   15818             367 :   PyObject * obj2 = 0 ;
   15819             367 :   PyObject * obj3 = 0 ;
   15820             367 :   PyObject * obj4 = 0 ;
   15821             367 :   PyObject * obj5 = 0 ;
   15822             367 :   PyObject * obj6 = 0 ;
   15823             367 :   PyObject * obj7 = 0 ;
   15824             367 :   PyObject * obj8 = 0 ;
   15825             367 :   PyObject * obj9 = 0 ;
   15826                 :   char *  kwnames[] = {
   15827                 :     (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 
   15828             367 :   };
   15829                 :   CPLErr result;
   15830                 :   
   15831                 :   {
   15832                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   15833             367 :     arg6 = &pyObject6;
   15834                 :   }
   15835             367 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OOOOO:Band_ReadRaster1",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
   15836             367 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15837             367 :   if (!SWIG_IsOK(res1)) {
   15838               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadRaster1" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15839                 :   }
   15840             367 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15841             367 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   15842             367 :   if (!SWIG_IsOK(ecode2)) {
   15843               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadRaster1" "', argument " "2"" of type '" "int""'");
   15844                 :   } 
   15845             367 :   arg2 = static_cast< int >(val2);
   15846             367 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   15847             367 :   if (!SWIG_IsOK(ecode3)) {
   15848               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadRaster1" "', argument " "3"" of type '" "int""'");
   15849                 :   } 
   15850             367 :   arg3 = static_cast< int >(val3);
   15851             367 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   15852             367 :   if (!SWIG_IsOK(ecode4)) {
   15853               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ReadRaster1" "', argument " "4"" of type '" "int""'");
   15854                 :   } 
   15855             367 :   arg4 = static_cast< int >(val4);
   15856             367 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   15857             367 :   if (!SWIG_IsOK(ecode5)) {
   15858               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ReadRaster1" "', argument " "5"" of type '" "int""'");
   15859                 :   } 
   15860             367 :   arg5 = static_cast< int >(val5);
   15861             367 :   if (obj5) {
   15862                 :     {
   15863                 :       /* %typemap(in) (int *optional_##int) */
   15864             367 :       if ( obj5 == Py_None ) {
   15865             313 :         arg7 = 0;
   15866                 :       }
   15867              54 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   15868              54 :         arg7 = (int *) &val7;
   15869                 :       }
   15870                 :       else {
   15871               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   15872               0 :         SWIG_fail;
   15873                 :       }
   15874                 :     }
   15875                 :   }
   15876             367 :   if (obj6) {
   15877                 :     {
   15878                 :       /* %typemap(in) (int *optional_##int) */
   15879             367 :       if ( obj6 == Py_None ) {
   15880             313 :         arg8 = 0;
   15881                 :       }
   15882              54 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   15883              54 :         arg8 = (int *) &val8;
   15884                 :       }
   15885                 :       else {
   15886               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   15887               0 :         SWIG_fail;
   15888                 :       }
   15889                 :     }
   15890                 :   }
   15891             367 :   if (obj7) {
   15892                 :     {
   15893                 :       /* %typemap(in) (int *optional_##int) */
   15894             367 :       if ( obj7 == Py_None ) {
   15895             319 :         arg9 = 0;
   15896                 :       }
   15897              48 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   15898              48 :         arg9 = (int *) &val9;
   15899                 :       }
   15900                 :       else {
   15901               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   15902               0 :         SWIG_fail;
   15903                 :       }
   15904                 :     }
   15905                 :   }
   15906             367 :   if (obj8) {
   15907                 :     {
   15908                 :       /* %typemap(in) (int *optional_##int) */
   15909             367 :       if ( obj8 == Py_None ) {
   15910             367 :         arg10 = 0;
   15911                 :       }
   15912               0 :       else if ( PyArg_Parse( obj8,"i" ,&val10 ) ) {
   15913               0 :         arg10 = (int *) &val10;
   15914                 :       }
   15915                 :       else {
   15916               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   15917               0 :         SWIG_fail;
   15918                 :       }
   15919                 :     }
   15920                 :   }
   15921             367 :   if (obj9) {
   15922                 :     {
   15923                 :       /* %typemap(in) (int *optional_##int) */
   15924             367 :       if ( obj9 == Py_None ) {
   15925             367 :         arg11 = 0;
   15926                 :       }
   15927               0 :       else if ( PyArg_Parse( obj9,"i" ,&val11 ) ) {
   15928               0 :         arg11 = (int *) &val11;
   15929                 :       }
   15930                 :       else {
   15931               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   15932               0 :         SWIG_fail;
   15933                 :       }
   15934                 :     }
   15935                 :   }
   15936                 :   {
   15937             367 :     if ( bUseExceptions ) {
   15938               0 :       CPLErrorReset();
   15939                 :     }
   15940             367 :     result = (CPLErr)GDALRasterBandShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   15941             367 :     if ( bUseExceptions ) {
   15942               0 :       CPLErr eclass = CPLGetLastErrorType();
   15943               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15944               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15945                 :       }
   15946                 :     }
   15947                 :   }
   15948             734 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15949                 :   {
   15950                 :     /* %typemap(argout) ( void **outPythonObject ) */
   15951             367 :     Py_XDECREF(resultobj);
   15952             367 :     if (*arg6)
   15953                 :     {
   15954             365 :       resultobj = (PyObject*)*arg6;
   15955                 :     }
   15956                 :     else
   15957                 :     {
   15958               2 :       resultobj = Py_None;
   15959               2 :       Py_INCREF(resultobj);
   15960                 :     }
   15961                 :   }
   15962             367 :   return resultobj;
   15963                 : fail:
   15964               0 :   return NULL;
   15965                 : }
   15966                 : 
   15967                 : 
   15968               1 : SWIGINTERN PyObject *_wrap_Band_ReadBlock(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15969               1 :   PyObject *resultobj = 0;
   15970               1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15971                 :   int arg2 ;
   15972                 :   int arg3 ;
   15973               1 :   void **arg4 = (void **) 0 ;
   15974               1 :   void *argp1 = 0 ;
   15975               1 :   int res1 = 0 ;
   15976                 :   int val2 ;
   15977               1 :   int ecode2 = 0 ;
   15978                 :   int val3 ;
   15979               1 :   int ecode3 = 0 ;
   15980               1 :   void *pyObject4 = NULL ;
   15981               1 :   PyObject * obj0 = 0 ;
   15982               1 :   PyObject * obj1 = 0 ;
   15983               1 :   PyObject * obj2 = 0 ;
   15984                 :   char *  kwnames[] = {
   15985                 :     (char *) "self",(char *) "xoff",(char *) "yoff", NULL 
   15986               1 :   };
   15987                 :   CPLErr result;
   15988                 :   
   15989                 :   {
   15990                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject4 = NULL ) */
   15991               1 :     arg4 = &pyObject4;
   15992                 :   }
   15993               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Band_ReadBlock",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   15994               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15995               1 :   if (!SWIG_IsOK(res1)) {
   15996               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadBlock" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15997                 :   }
   15998               1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15999               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16000               1 :   if (!SWIG_IsOK(ecode2)) {
   16001               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadBlock" "', argument " "2"" of type '" "int""'");
   16002                 :   } 
   16003               1 :   arg2 = static_cast< int >(val2);
   16004               1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16005               1 :   if (!SWIG_IsOK(ecode3)) {
   16006               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadBlock" "', argument " "3"" of type '" "int""'");
   16007                 :   } 
   16008               1 :   arg3 = static_cast< int >(val3);
   16009                 :   {
   16010               1 :     if ( bUseExceptions ) {
   16011               0 :       CPLErrorReset();
   16012                 :     }
   16013               1 :     result = (CPLErr)GDALRasterBandShadow_ReadBlock(arg1,arg2,arg3,arg4);
   16014               1 :     if ( bUseExceptions ) {
   16015               0 :       CPLErr eclass = CPLGetLastErrorType();
   16016               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16017               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16018                 :       }
   16019                 :     }
   16020                 :   }
   16021               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16022                 :   {
   16023                 :     /* %typemap(argout) ( void **outPythonObject ) */
   16024               1 :     Py_XDECREF(resultobj);
   16025               1 :     if (*arg4)
   16026                 :     {
   16027               1 :       resultobj = (PyObject*)*arg4;
   16028                 :     }
   16029                 :     else
   16030                 :     {
   16031               0 :       resultobj = Py_None;
   16032               0 :       Py_INCREF(resultobj);
   16033                 :     }
   16034                 :   }
   16035               1 :   return resultobj;
   16036                 : fail:
   16037               0 :   return NULL;
   16038                 : }
   16039                 : 
   16040                 : 
   16041               6 : SWIGINTERN PyObject *Band_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16042                 :   PyObject *obj;
   16043               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   16044               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterBandShadow, SWIG_NewClientData(obj));
   16045               6 :   return SWIG_Py_Void();
   16046                 : }
   16047                 : 
   16048              21 : SWIGINTERN PyObject *_wrap_new_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   16049              21 :   PyObject *resultobj = 0;
   16050              21 :   GDALPaletteInterp arg1 = (GDALPaletteInterp) GPI_RGB ;
   16051                 :   int val1 ;
   16052              21 :   int ecode1 = 0 ;
   16053              21 :   PyObject * obj0 = 0 ;
   16054                 :   char *  kwnames[] = {
   16055                 :     (char *) "palette", NULL 
   16056              21 :   };
   16057              21 :   GDALColorTableShadow *result = 0 ;
   16058                 :   
   16059              21 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_ColorTable",kwnames,&obj0)) SWIG_fail;
   16060              21 :   if (obj0) {
   16061               0 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
   16062               0 :     if (!SWIG_IsOK(ecode1)) {
   16063               0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ColorTable" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   16064                 :     } 
   16065               0 :     arg1 = static_cast< GDALPaletteInterp >(val1);
   16066                 :   }
   16067                 :   {
   16068              21 :     if ( bUseExceptions ) {
   16069               0 :       CPLErrorReset();
   16070                 :     }
   16071              21 :     result = (GDALColorTableShadow *)new_GDALColorTableShadow(arg1);
   16072              21 :     if ( bUseExceptions ) {
   16073               0 :       CPLErr eclass = CPLGetLastErrorType();
   16074               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16075               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16076                 :       }
   16077                 :     }
   16078                 :   }
   16079              21 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_NEW |  0 );
   16080              21 :   return resultobj;
   16081                 : fail:
   16082               0 :   return NULL;
   16083                 : }
   16084                 : 
   16085                 : 
   16086              22 : SWIGINTERN PyObject *_wrap_delete_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16087              22 :   PyObject *resultobj = 0;
   16088              22 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16089              22 :   void *argp1 = 0 ;
   16090              22 :   int res1 = 0 ;
   16091              22 :   PyObject * obj0 = 0 ;
   16092                 :   
   16093              22 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_ColorTable",&obj0)) SWIG_fail;
   16094              22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_DISOWN |  0 );
   16095              22 :   if (!SWIG_IsOK(res1)) {
   16096               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ColorTable" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16097                 :   }
   16098              22 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16099                 :   {
   16100              22 :     if ( bUseExceptions ) {
   16101               0 :       CPLErrorReset();
   16102                 :     }
   16103                 :     delete_GDALColorTableShadow(arg1);
   16104              22 :     if ( bUseExceptions ) {
   16105               0 :       CPLErr eclass = CPLGetLastErrorType();
   16106               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16107               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16108                 :       }
   16109                 :     }
   16110                 :   }
   16111              22 :   resultobj = SWIG_Py_Void();
   16112              22 :   return resultobj;
   16113                 : fail:
   16114               0 :   return NULL;
   16115                 : }
   16116                 : 
   16117                 : 
   16118               1 : SWIGINTERN PyObject *_wrap_ColorTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16119               1 :   PyObject *resultobj = 0;
   16120               1 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16121               1 :   void *argp1 = 0 ;
   16122               1 :   int res1 = 0 ;
   16123               1 :   PyObject * obj0 = 0 ;
   16124               1 :   GDALColorTableShadow *result = 0 ;
   16125                 :   
   16126               1 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorTable_Clone",&obj0)) SWIG_fail;
   16127               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16128               1 :   if (!SWIG_IsOK(res1)) {
   16129               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_Clone" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16130                 :   }
   16131               1 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16132                 :   {
   16133               1 :     if ( bUseExceptions ) {
   16134               0 :       CPLErrorReset();
   16135                 :     }
   16136               1 :     result = (GDALColorTableShadow *)GDALColorTableShadow_Clone(arg1);
   16137               1 :     if ( bUseExceptions ) {
   16138               0 :       CPLErr eclass = CPLGetLastErrorType();
   16139               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16140               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16141                 :       }
   16142                 :     }
   16143                 :   }
   16144               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_OWN |  0 );
   16145               1 :   return resultobj;
   16146                 : fail:
   16147               0 :   return NULL;
   16148                 : }
   16149                 : 
   16150                 : 
   16151               2 : SWIGINTERN PyObject *_wrap_ColorTable_GetPaletteInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16152               2 :   PyObject *resultobj = 0;
   16153               2 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16154               2 :   void *argp1 = 0 ;
   16155               2 :   int res1 = 0 ;
   16156               2 :   PyObject * obj0 = 0 ;
   16157                 :   GDALPaletteInterp result;
   16158                 :   
   16159               2 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorTable_GetPaletteInterpretation",&obj0)) SWIG_fail;
   16160               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16161               2 :   if (!SWIG_IsOK(res1)) {
   16162               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetPaletteInterpretation" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16163                 :   }
   16164               2 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16165                 :   {
   16166               2 :     if ( bUseExceptions ) {
   16167               0 :       CPLErrorReset();
   16168                 :     }
   16169               2 :     result = (GDALPaletteInterp)GDALColorTableShadow_GetPaletteInterpretation(arg1);
   16170               2 :     if ( bUseExceptions ) {
   16171               0 :       CPLErr eclass = CPLGetLastErrorType();
   16172               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16173               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16174                 :       }
   16175                 :     }
   16176                 :   }
   16177               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16178               2 :   return resultobj;
   16179                 : fail:
   16180               0 :   return NULL;
   16181                 : }
   16182                 : 
   16183                 : 
   16184              22 : SWIGINTERN PyObject *_wrap_ColorTable_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16185              22 :   PyObject *resultobj = 0;
   16186              22 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16187              22 :   void *argp1 = 0 ;
   16188              22 :   int res1 = 0 ;
   16189              22 :   PyObject * obj0 = 0 ;
   16190                 :   int result;
   16191                 :   
   16192              22 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorTable_GetCount",&obj0)) SWIG_fail;
   16193              22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16194              22 :   if (!SWIG_IsOK(res1)) {
   16195               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetCount" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16196                 :   }
   16197              22 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16198                 :   {
   16199              22 :     if ( bUseExceptions ) {
   16200               0 :       CPLErrorReset();
   16201                 :     }
   16202              22 :     result = (int)GDALColorTableShadow_GetColorEntryCount(arg1);
   16203              22 :     if ( bUseExceptions ) {
   16204               0 :       CPLErr eclass = CPLGetLastErrorType();
   16205               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16206               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16207                 :       }
   16208                 :     }
   16209                 :   }
   16210              22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16211              22 :   return resultobj;
   16212                 : fail:
   16213               0 :   return NULL;
   16214                 : }
   16215                 : 
   16216                 : 
   16217             818 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16218             818 :   PyObject *resultobj = 0;
   16219             818 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16220                 :   int arg2 ;
   16221             818 :   void *argp1 = 0 ;
   16222             818 :   int res1 = 0 ;
   16223                 :   int val2 ;
   16224             818 :   int ecode2 = 0 ;
   16225             818 :   PyObject * obj0 = 0 ;
   16226             818 :   PyObject * obj1 = 0 ;
   16227             818 :   GDALColorEntry *result = 0 ;
   16228                 :   
   16229             818 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorTable_GetColorEntry",&obj0,&obj1)) SWIG_fail;
   16230             818 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16231             818 :   if (!SWIG_IsOK(res1)) {
   16232               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16233                 :   }
   16234             818 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16235             818 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16236             818 :   if (!SWIG_IsOK(ecode2)) {
   16237               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntry" "', argument " "2"" of type '" "int""'");
   16238                 :   } 
   16239             818 :   arg2 = static_cast< int >(val2);
   16240                 :   {
   16241             818 :     if ( bUseExceptions ) {
   16242               0 :       CPLErrorReset();
   16243                 :     }
   16244             818 :     result = (GDALColorEntry *)GDALColorTableShadow_GetColorEntry(arg1,arg2);
   16245             818 :     if ( bUseExceptions ) {
   16246               0 :       CPLErr eclass = CPLGetLastErrorType();
   16247               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16248               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16249                 :       }
   16250                 :     }
   16251                 :   }
   16252                 :   {
   16253                 :     /* %typemap(out) GDALColorEntry* */
   16254             818 :     if ( result != NULL )
   16255             818 :     resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
   16256                 :     else
   16257               0 :     resultobj = NULL;
   16258                 :   }
   16259             818 :   return resultobj;
   16260                 : fail:
   16261               0 :   return NULL;
   16262                 : }
   16263                 : 
   16264                 : 
   16265               0 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntryAsRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16266               0 :   PyObject *resultobj = 0;
   16267               0 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16268                 :   int arg2 ;
   16269               0 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   16270               0 :   void *argp1 = 0 ;
   16271               0 :   int res1 = 0 ;
   16272                 :   int val2 ;
   16273               0 :   int ecode2 = 0 ;
   16274                 :   GDALColorEntry ce3 ;
   16275               0 :   PyObject * obj0 = 0 ;
   16276               0 :   PyObject * obj1 = 0 ;
   16277               0 :   PyObject * obj2 = 0 ;
   16278                 :   int result;
   16279                 :   
   16280               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:ColorTable_GetColorEntryAsRGB",&obj0,&obj1,&obj2)) SWIG_fail;
   16281               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16282               0 :   if (!SWIG_IsOK(res1)) {
   16283               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16284                 :   }
   16285               0 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16286               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16287               0 :   if (!SWIG_IsOK(ecode2)) {
   16288               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "2"" of type '" "int""'");
   16289                 :   } 
   16290               0 :   arg2 = static_cast< int >(val2);
   16291                 :   {
   16292                 :     /* %typemap(in) GDALColorEntry* */
   16293               0 :     ce3.c4 = 255;
   16294               0 :     if (! PySequence_Check(obj2) ) {
   16295               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16296               0 :       SWIG_fail;
   16297                 :     }
   16298               0 :     int size = PySequence_Size(obj2);
   16299               0 :     if ( size > 4 ) {
   16300               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16301               0 :       SWIG_fail;
   16302                 :     }
   16303               0 :     if ( size < 3 ) {
   16304               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16305               0 :       SWIG_fail;
   16306                 :     }
   16307               0 :     if ( !PyArg_ParseTuple( obj2,"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   16308               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16309               0 :       SWIG_fail;
   16310                 :     }
   16311               0 :     arg3 = &ce3;
   16312                 :   }
   16313                 :   {
   16314               0 :     if ( bUseExceptions ) {
   16315               0 :       CPLErrorReset();
   16316                 :     }
   16317               0 :     result = (int)GDALColorTableShadow_GetColorEntryAsRGB(arg1,arg2,arg3);
   16318               0 :     if ( bUseExceptions ) {
   16319               0 :       CPLErr eclass = CPLGetLastErrorType();
   16320               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16321               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16322                 :       }
   16323                 :     }
   16324                 :   }
   16325               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16326               0 :   return resultobj;
   16327                 : fail:
   16328               0 :   return NULL;
   16329                 : }
   16330                 : 
   16331                 : 
   16332              53 : SWIGINTERN PyObject *_wrap_ColorTable_SetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16333              53 :   PyObject *resultobj = 0;
   16334              53 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16335                 :   int arg2 ;
   16336              53 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   16337              53 :   void *argp1 = 0 ;
   16338              53 :   int res1 = 0 ;
   16339                 :   int val2 ;
   16340              53 :   int ecode2 = 0 ;
   16341                 :   GDALColorEntry ce3 ;
   16342              53 :   PyObject * obj0 = 0 ;
   16343              53 :   PyObject * obj1 = 0 ;
   16344              53 :   PyObject * obj2 = 0 ;
   16345                 :   
   16346              53 :   if (!PyArg_ParseTuple(args,(char *)"OOO:ColorTable_SetColorEntry",&obj0,&obj1,&obj2)) SWIG_fail;
   16347              53 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16348              53 :   if (!SWIG_IsOK(res1)) {
   16349               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_SetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16350                 :   }
   16351              53 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16352              53 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16353              53 :   if (!SWIG_IsOK(ecode2)) {
   16354               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_SetColorEntry" "', argument " "2"" of type '" "int""'");
   16355                 :   } 
   16356              53 :   arg2 = static_cast< int >(val2);
   16357                 :   {
   16358                 :     /* %typemap(in) GDALColorEntry* */
   16359              53 :     ce3.c4 = 255;
   16360              53 :     if (! PySequence_Check(obj2) ) {
   16361               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16362               0 :       SWIG_fail;
   16363                 :     }
   16364              53 :     int size = PySequence_Size(obj2);
   16365              53 :     if ( size > 4 ) {
   16366               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16367               0 :       SWIG_fail;
   16368                 :     }
   16369              53 :     if ( size < 3 ) {
   16370               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16371               0 :       SWIG_fail;
   16372                 :     }
   16373              53 :     if ( !PyArg_ParseTuple( obj2,"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   16374               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16375               0 :       SWIG_fail;
   16376                 :     }
   16377              53 :     arg3 = &ce3;
   16378                 :   }
   16379                 :   {
   16380              53 :     if ( bUseExceptions ) {
   16381               0 :       CPLErrorReset();
   16382                 :     }
   16383                 :     GDALColorTableShadow_SetColorEntry(arg1,arg2,(GDALColorEntry const *)arg3);
   16384              53 :     if ( bUseExceptions ) {
   16385               0 :       CPLErr eclass = CPLGetLastErrorType();
   16386               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16387               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16388                 :       }
   16389                 :     }
   16390                 :   }
   16391              53 :   resultobj = SWIG_Py_Void();
   16392              53 :   return resultobj;
   16393                 : fail:
   16394               0 :   return NULL;
   16395                 : }
   16396                 : 
   16397                 : 
   16398               1 : SWIGINTERN PyObject *_wrap_ColorTable_CreateColorRamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16399               1 :   PyObject *resultobj = 0;
   16400               1 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16401                 :   int arg2 ;
   16402               1 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   16403                 :   int arg4 ;
   16404               1 :   GDALColorEntry *arg5 = (GDALColorEntry *) 0 ;
   16405               1 :   void *argp1 = 0 ;
   16406               1 :   int res1 = 0 ;
   16407                 :   int val2 ;
   16408               1 :   int ecode2 = 0 ;
   16409                 :   GDALColorEntry ce3 ;
   16410                 :   int val4 ;
   16411               1 :   int ecode4 = 0 ;
   16412                 :   GDALColorEntry ce5 ;
   16413               1 :   PyObject * obj0 = 0 ;
   16414               1 :   PyObject * obj1 = 0 ;
   16415               1 :   PyObject * obj2 = 0 ;
   16416               1 :   PyObject * obj3 = 0 ;
   16417               1 :   PyObject * obj4 = 0 ;
   16418                 :   
   16419               1 :   if (!PyArg_ParseTuple(args,(char *)"OOOOO:ColorTable_CreateColorRamp",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   16420               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16421               1 :   if (!SWIG_IsOK(res1)) {
   16422               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_CreateColorRamp" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16423                 :   }
   16424               1 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16425               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16426               1 :   if (!SWIG_IsOK(ecode2)) {
   16427               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_CreateColorRamp" "', argument " "2"" of type '" "int""'");
   16428                 :   } 
   16429               1 :   arg2 = static_cast< int >(val2);
   16430                 :   {
   16431                 :     /* %typemap(in) GDALColorEntry* */
   16432               1 :     ce3.c4 = 255;
   16433               1 :     if (! PySequence_Check(obj2) ) {
   16434               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16435               0 :       SWIG_fail;
   16436                 :     }
   16437               1 :     int size = PySequence_Size(obj2);
   16438               1 :     if ( size > 4 ) {
   16439               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16440               0 :       SWIG_fail;
   16441                 :     }
   16442               1 :     if ( size < 3 ) {
   16443               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16444               0 :       SWIG_fail;
   16445                 :     }
   16446               1 :     if ( !PyArg_ParseTuple( obj2,"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   16447               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16448               0 :       SWIG_fail;
   16449                 :     }
   16450               1 :     arg3 = &ce3;
   16451                 :   }
   16452               1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   16453               1 :   if (!SWIG_IsOK(ecode4)) {
   16454               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ColorTable_CreateColorRamp" "', argument " "4"" of type '" "int""'");
   16455                 :   } 
   16456               1 :   arg4 = static_cast< int >(val4);
   16457                 :   {
   16458                 :     /* %typemap(in) GDALColorEntry* */
   16459               1 :     ce5.c4 = 255;
   16460               1 :     if (! PySequence_Check(obj4) ) {
   16461               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16462               0 :       SWIG_fail;
   16463                 :     }
   16464               1 :     int size = PySequence_Size(obj4);
   16465               1 :     if ( size > 4 ) {
   16466               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16467               0 :       SWIG_fail;
   16468                 :     }
   16469               1 :     if ( size < 3 ) {
   16470               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16471               0 :       SWIG_fail;
   16472                 :     }
   16473               1 :     if ( !PyArg_ParseTuple( obj4,"hhh|h", &ce5.c1, &ce5.c2, &ce5.c3, &ce5.c4 ) ) {
   16474               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16475               0 :       SWIG_fail;
   16476                 :     }
   16477               1 :     arg5 = &ce5;
   16478                 :   }
   16479                 :   {
   16480               1 :     if ( bUseExceptions ) {
   16481               0 :       CPLErrorReset();
   16482                 :     }
   16483                 :     GDALColorTableShadow_CreateColorRamp(arg1,arg2,(GDALColorEntry const *)arg3,arg4,(GDALColorEntry const *)arg5);
   16484               1 :     if ( bUseExceptions ) {
   16485               0 :       CPLErr eclass = CPLGetLastErrorType();
   16486               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16487               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16488                 :       }
   16489                 :     }
   16490                 :   }
   16491               1 :   resultobj = SWIG_Py_Void();
   16492               1 :   return resultobj;
   16493                 : fail:
   16494               0 :   return NULL;
   16495                 : }
   16496                 : 
   16497                 : 
   16498               6 : SWIGINTERN PyObject *ColorTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16499                 :   PyObject *obj;
   16500               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   16501               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorTableShadow, SWIG_NewClientData(obj));
   16502               6 :   return SWIG_Py_Void();
   16503                 : }
   16504                 : 
   16505               2 : SWIGINTERN PyObject *_wrap_new_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16506               2 :   PyObject *resultobj = 0;
   16507               2 :   GDALRasterAttributeTableShadow *result = 0 ;
   16508                 :   
   16509               2 :   if (!PyArg_ParseTuple(args,(char *)":new_RasterAttributeTable")) SWIG_fail;
   16510                 :   {
   16511               2 :     if ( bUseExceptions ) {
   16512               0 :       CPLErrorReset();
   16513                 :     }
   16514               2 :     result = (GDALRasterAttributeTableShadow *)new_GDALRasterAttributeTableShadow();
   16515               2 :     if ( bUseExceptions ) {
   16516               0 :       CPLErr eclass = CPLGetLastErrorType();
   16517               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16518               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16519                 :       }
   16520                 :     }
   16521                 :   }
   16522               2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_NEW |  0 );
   16523               2 :   return resultobj;
   16524                 : fail:
   16525               0 :   return NULL;
   16526                 : }
   16527                 : 
   16528                 : 
   16529               3 : SWIGINTERN PyObject *_wrap_delete_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16530               3 :   PyObject *resultobj = 0;
   16531               3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16532               3 :   void *argp1 = 0 ;
   16533               3 :   int res1 = 0 ;
   16534               3 :   PyObject * obj0 = 0 ;
   16535                 :   
   16536               3 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_RasterAttributeTable",&obj0)) SWIG_fail;
   16537               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_DISOWN |  0 );
   16538               3 :   if (!SWIG_IsOK(res1)) {
   16539               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RasterAttributeTable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16540                 :   }
   16541               3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16542                 :   {
   16543               3 :     if ( bUseExceptions ) {
   16544               0 :       CPLErrorReset();
   16545                 :     }
   16546                 :     delete_GDALRasterAttributeTableShadow(arg1);
   16547               3 :     if ( bUseExceptions ) {
   16548               0 :       CPLErr eclass = CPLGetLastErrorType();
   16549               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16550               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16551                 :       }
   16552                 :     }
   16553                 :   }
   16554               3 :   resultobj = SWIG_Py_Void();
   16555               3 :   return resultobj;
   16556                 : fail:
   16557               0 :   return NULL;
   16558                 : }
   16559                 : 
   16560                 : 
   16561               1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16562               1 :   PyObject *resultobj = 0;
   16563               1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16564               1 :   void *argp1 = 0 ;
   16565               1 :   int res1 = 0 ;
   16566               1 :   PyObject * obj0 = 0 ;
   16567               1 :   GDALRasterAttributeTableShadow *result = 0 ;
   16568                 :   
   16569               1 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_Clone",&obj0)) SWIG_fail;
   16570               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16571               1 :   if (!SWIG_IsOK(res1)) {
   16572               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_Clone" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16573                 :   }
   16574               1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16575                 :   {
   16576               1 :     if ( bUseExceptions ) {
   16577               0 :       CPLErrorReset();
   16578                 :     }
   16579               1 :     result = (GDALRasterAttributeTableShadow *)GDALRasterAttributeTableShadow_Clone(arg1);
   16580               1 :     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               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   16588               1 :   return resultobj;
   16589                 : fail:
   16590               0 :   return NULL;
   16591                 : }
   16592                 : 
   16593                 : 
   16594               5 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16595               5 :   PyObject *resultobj = 0;
   16596               5 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16597               5 :   void *argp1 = 0 ;
   16598               5 :   int res1 = 0 ;
   16599               5 :   PyObject * obj0 = 0 ;
   16600                 :   int result;
   16601                 :   
   16602               5 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_GetColumnCount",&obj0)) SWIG_fail;
   16603               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16604               5 :   if (!SWIG_IsOK(res1)) {
   16605               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColumnCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16606                 :   }
   16607               5 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16608                 :   {
   16609               5 :     if ( bUseExceptions ) {
   16610               0 :       CPLErrorReset();
   16611                 :     }
   16612               5 :     result = (int)GDALRasterAttributeTableShadow_GetColumnCount(arg1);
   16613               5 :     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               5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16621               5 :   return resultobj;
   16622                 : fail:
   16623               0 :   return NULL;
   16624                 : }
   16625                 : 
   16626                 : 
   16627               4 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetNameOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16628               4 :   PyObject *resultobj = 0;
   16629               4 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16630                 :   int arg2 ;
   16631               4 :   void *argp1 = 0 ;
   16632               4 :   int res1 = 0 ;
   16633                 :   int val2 ;
   16634               4 :   int ecode2 = 0 ;
   16635               4 :   PyObject * obj0 = 0 ;
   16636               4 :   PyObject * obj1 = 0 ;
   16637               4 :   char *result = 0 ;
   16638                 :   
   16639               4 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetNameOfCol",&obj0,&obj1)) SWIG_fail;
   16640               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16641               4 :   if (!SWIG_IsOK(res1)) {
   16642               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16643                 :   }
   16644               4 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16645               4 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16646               4 :   if (!SWIG_IsOK(ecode2)) {
   16647               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "2"" of type '" "int""'");
   16648                 :   } 
   16649               4 :   arg2 = static_cast< int >(val2);
   16650                 :   {
   16651               4 :     if ( bUseExceptions ) {
   16652               0 :       CPLErrorReset();
   16653                 :     }
   16654               4 :     result = (char *)GDALRasterAttributeTableShadow_GetNameOfCol(arg1,arg2);
   16655               4 :     if ( bUseExceptions ) {
   16656               0 :       CPLErr eclass = CPLGetLastErrorType();
   16657               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16658               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16659                 :       }
   16660                 :     }
   16661                 :   }
   16662               4 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16663               4 :   return resultobj;
   16664                 : fail:
   16665               0 :   return NULL;
   16666                 : }
   16667                 : 
   16668                 : 
   16669               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetUsageOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16670               6 :   PyObject *resultobj = 0;
   16671               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16672                 :   int arg2 ;
   16673               6 :   void *argp1 = 0 ;
   16674               6 :   int res1 = 0 ;
   16675                 :   int val2 ;
   16676               6 :   int ecode2 = 0 ;
   16677               6 :   PyObject * obj0 = 0 ;
   16678               6 :   PyObject * obj1 = 0 ;
   16679                 :   GDALRATFieldUsage result;
   16680                 :   
   16681               6 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetUsageOfCol",&obj0,&obj1)) SWIG_fail;
   16682               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16683               6 :   if (!SWIG_IsOK(res1)) {
   16684               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16685                 :   }
   16686               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16687               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16688               6 :   if (!SWIG_IsOK(ecode2)) {
   16689               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "2"" of type '" "int""'");
   16690                 :   } 
   16691               6 :   arg2 = static_cast< int >(val2);
   16692                 :   {
   16693               6 :     if ( bUseExceptions ) {
   16694               0 :       CPLErrorReset();
   16695                 :     }
   16696               6 :     result = (GDALRATFieldUsage)GDALRasterAttributeTableShadow_GetUsageOfCol(arg1,arg2);
   16697               6 :     if ( bUseExceptions ) {
   16698               0 :       CPLErr eclass = CPLGetLastErrorType();
   16699               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16700               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16701                 :       }
   16702                 :     }
   16703                 :   }
   16704              12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16705               6 :   return resultobj;
   16706                 : fail:
   16707               0 :   return NULL;
   16708                 : }
   16709                 : 
   16710                 : 
   16711               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTypeOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16712               6 :   PyObject *resultobj = 0;
   16713               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16714                 :   int arg2 ;
   16715               6 :   void *argp1 = 0 ;
   16716               6 :   int res1 = 0 ;
   16717                 :   int val2 ;
   16718               6 :   int ecode2 = 0 ;
   16719               6 :   PyObject * obj0 = 0 ;
   16720               6 :   PyObject * obj1 = 0 ;
   16721                 :   GDALRATFieldType result;
   16722                 :   
   16723               6 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetTypeOfCol",&obj0,&obj1)) SWIG_fail;
   16724               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16725               6 :   if (!SWIG_IsOK(res1)) {
   16726               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16727                 :   }
   16728               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16729               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16730               6 :   if (!SWIG_IsOK(ecode2)) {
   16731               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "2"" of type '" "int""'");
   16732                 :   } 
   16733               6 :   arg2 = static_cast< int >(val2);
   16734                 :   {
   16735               6 :     if ( bUseExceptions ) {
   16736               0 :       CPLErrorReset();
   16737                 :     }
   16738               6 :     result = (GDALRATFieldType)GDALRasterAttributeTableShadow_GetTypeOfCol(arg1,arg2);
   16739               6 :     if ( bUseExceptions ) {
   16740               0 :       CPLErr eclass = CPLGetLastErrorType();
   16741               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16742               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16743                 :       }
   16744                 :     }
   16745                 :   }
   16746              12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16747               6 :   return resultobj;
   16748                 : fail:
   16749               0 :   return NULL;
   16750                 : }
   16751                 : 
   16752                 : 
   16753               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColOfUsage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16754               0 :   PyObject *resultobj = 0;
   16755               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16756                 :   GDALRATFieldUsage arg2 ;
   16757               0 :   void *argp1 = 0 ;
   16758               0 :   int res1 = 0 ;
   16759                 :   int val2 ;
   16760               0 :   int ecode2 = 0 ;
   16761               0 :   PyObject * obj0 = 0 ;
   16762               0 :   PyObject * obj1 = 0 ;
   16763                 :   int result;
   16764                 :   
   16765               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetColOfUsage",&obj0,&obj1)) SWIG_fail;
   16766               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16767               0 :   if (!SWIG_IsOK(res1)) {
   16768               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16769                 :   }
   16770               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16771               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16772               0 :   if (!SWIG_IsOK(ecode2)) {
   16773               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "2"" of type '" "GDALRATFieldUsage""'");
   16774                 :   } 
   16775               0 :   arg2 = static_cast< GDALRATFieldUsage >(val2);
   16776                 :   {
   16777               0 :     if ( bUseExceptions ) {
   16778               0 :       CPLErrorReset();
   16779                 :     }
   16780               0 :     result = (int)GDALRasterAttributeTableShadow_GetColOfUsage(arg1,arg2);
   16781               0 :     if ( bUseExceptions ) {
   16782               0 :       CPLErr eclass = CPLGetLastErrorType();
   16783               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16784               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16785                 :       }
   16786                 :     }
   16787                 :   }
   16788               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16789               0 :   return resultobj;
   16790                 : fail:
   16791               0 :   return NULL;
   16792                 : }
   16793                 : 
   16794                 : 
   16795               3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16796               3 :   PyObject *resultobj = 0;
   16797               3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16798               3 :   void *argp1 = 0 ;
   16799               3 :   int res1 = 0 ;
   16800               3 :   PyObject * obj0 = 0 ;
   16801                 :   int result;
   16802                 :   
   16803               3 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_GetRowCount",&obj0)) SWIG_fail;
   16804               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16805               3 :   if (!SWIG_IsOK(res1)) {
   16806               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16807                 :   }
   16808               3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16809                 :   {
   16810               3 :     if ( bUseExceptions ) {
   16811               0 :       CPLErrorReset();
   16812                 :     }
   16813               3 :     result = (int)GDALRasterAttributeTableShadow_GetRowCount(arg1);
   16814               3 :     if ( bUseExceptions ) {
   16815               0 :       CPLErr eclass = CPLGetLastErrorType();
   16816               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16817               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16818                 :       }
   16819                 :     }
   16820                 :   }
   16821               3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16822               3 :   return resultobj;
   16823                 : fail:
   16824               0 :   return NULL;
   16825                 : }
   16826                 : 
   16827                 : 
   16828               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16829               0 :   PyObject *resultobj = 0;
   16830               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16831                 :   int arg2 ;
   16832                 :   int arg3 ;
   16833               0 :   void *argp1 = 0 ;
   16834               0 :   int res1 = 0 ;
   16835                 :   int val2 ;
   16836               0 :   int ecode2 = 0 ;
   16837                 :   int val3 ;
   16838               0 :   int ecode3 = 0 ;
   16839               0 :   PyObject * obj0 = 0 ;
   16840               0 :   PyObject * obj1 = 0 ;
   16841               0 :   PyObject * obj2 = 0 ;
   16842               0 :   char *result = 0 ;
   16843                 :   
   16844               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_GetValueAsString",&obj0,&obj1,&obj2)) SWIG_fail;
   16845               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16846               0 :   if (!SWIG_IsOK(res1)) {
   16847               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16848                 :   }
   16849               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16850               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16851               0 :   if (!SWIG_IsOK(ecode2)) {
   16852               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "2"" of type '" "int""'");
   16853                 :   } 
   16854               0 :   arg2 = static_cast< int >(val2);
   16855               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16856               0 :   if (!SWIG_IsOK(ecode3)) {
   16857               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "3"" of type '" "int""'");
   16858                 :   } 
   16859               0 :   arg3 = static_cast< int >(val3);
   16860                 :   {
   16861               0 :     if ( bUseExceptions ) {
   16862               0 :       CPLErrorReset();
   16863                 :     }
   16864               0 :     result = (char *)GDALRasterAttributeTableShadow_GetValueAsString(arg1,arg2,arg3);
   16865               0 :     if ( bUseExceptions ) {
   16866               0 :       CPLErr eclass = CPLGetLastErrorType();
   16867               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16868               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16869                 :       }
   16870                 :     }
   16871                 :   }
   16872               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16873               0 :   return resultobj;
   16874                 : fail:
   16875               0 :   return NULL;
   16876                 : }
   16877                 : 
   16878                 : 
   16879               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16880               6 :   PyObject *resultobj = 0;
   16881               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16882                 :   int arg2 ;
   16883                 :   int arg3 ;
   16884               6 :   void *argp1 = 0 ;
   16885               6 :   int res1 = 0 ;
   16886                 :   int val2 ;
   16887               6 :   int ecode2 = 0 ;
   16888                 :   int val3 ;
   16889               6 :   int ecode3 = 0 ;
   16890               6 :   PyObject * obj0 = 0 ;
   16891               6 :   PyObject * obj1 = 0 ;
   16892               6 :   PyObject * obj2 = 0 ;
   16893                 :   int result;
   16894                 :   
   16895               6 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_GetValueAsInt",&obj0,&obj1,&obj2)) SWIG_fail;
   16896               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16897               6 :   if (!SWIG_IsOK(res1)) {
   16898               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16899                 :   }
   16900               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16901               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16902               6 :   if (!SWIG_IsOK(ecode2)) {
   16903               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "2"" of type '" "int""'");
   16904                 :   } 
   16905               6 :   arg2 = static_cast< int >(val2);
   16906               6 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16907               6 :   if (!SWIG_IsOK(ecode3)) {
   16908               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "3"" of type '" "int""'");
   16909                 :   } 
   16910               6 :   arg3 = static_cast< int >(val3);
   16911                 :   {
   16912               6 :     if ( bUseExceptions ) {
   16913               0 :       CPLErrorReset();
   16914                 :     }
   16915               6 :     result = (int)GDALRasterAttributeTableShadow_GetValueAsInt(arg1,arg2,arg3);
   16916               6 :     if ( bUseExceptions ) {
   16917               0 :       CPLErr eclass = CPLGetLastErrorType();
   16918               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16919               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16920                 :       }
   16921                 :     }
   16922                 :   }
   16923               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16924               6 :   return resultobj;
   16925                 : fail:
   16926               0 :   return NULL;
   16927                 : }
   16928                 : 
   16929                 : 
   16930               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16931               0 :   PyObject *resultobj = 0;
   16932               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16933                 :   int arg2 ;
   16934                 :   int arg3 ;
   16935               0 :   void *argp1 = 0 ;
   16936               0 :   int res1 = 0 ;
   16937                 :   int val2 ;
   16938               0 :   int ecode2 = 0 ;
   16939                 :   int val3 ;
   16940               0 :   int ecode3 = 0 ;
   16941               0 :   PyObject * obj0 = 0 ;
   16942               0 :   PyObject * obj1 = 0 ;
   16943               0 :   PyObject * obj2 = 0 ;
   16944                 :   double result;
   16945                 :   
   16946               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_GetValueAsDouble",&obj0,&obj1,&obj2)) SWIG_fail;
   16947               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16948               0 :   if (!SWIG_IsOK(res1)) {
   16949               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16950                 :   }
   16951               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16952               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16953               0 :   if (!SWIG_IsOK(ecode2)) {
   16954               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "2"" of type '" "int""'");
   16955                 :   } 
   16956               0 :   arg2 = static_cast< int >(val2);
   16957               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16958               0 :   if (!SWIG_IsOK(ecode3)) {
   16959               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "3"" of type '" "int""'");
   16960                 :   } 
   16961               0 :   arg3 = static_cast< int >(val3);
   16962                 :   {
   16963               0 :     if ( bUseExceptions ) {
   16964               0 :       CPLErrorReset();
   16965                 :     }
   16966               0 :     result = (double)GDALRasterAttributeTableShadow_GetValueAsDouble(arg1,arg2,arg3);
   16967               0 :     if ( bUseExceptions ) {
   16968               0 :       CPLErr eclass = CPLGetLastErrorType();
   16969               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16970               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16971                 :       }
   16972                 :     }
   16973                 :   }
   16974               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   16975               0 :   return resultobj;
   16976                 : fail:
   16977               0 :   return NULL;
   16978                 : }
   16979                 : 
   16980                 : 
   16981               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16982               0 :   PyObject *resultobj = 0;
   16983               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16984                 :   int arg2 ;
   16985                 :   int arg3 ;
   16986               0 :   char *arg4 = (char *) 0 ;
   16987               0 :   void *argp1 = 0 ;
   16988               0 :   int res1 = 0 ;
   16989                 :   int val2 ;
   16990               0 :   int ecode2 = 0 ;
   16991                 :   int val3 ;
   16992               0 :   int ecode3 = 0 ;
   16993               0 :   PyObject *str4 = 0 ;
   16994               0 :   int bToFree4 = 0 ;
   16995               0 :   PyObject * obj0 = 0 ;
   16996               0 :   PyObject * obj1 = 0 ;
   16997               0 :   PyObject * obj2 = 0 ;
   16998               0 :   PyObject * obj3 = 0 ;
   16999                 :   
   17000               0 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_SetValueAsString",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   17001               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17002               0 :   if (!SWIG_IsOK(res1)) {
   17003               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17004                 :   }
   17005               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17006               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   17007               0 :   if (!SWIG_IsOK(ecode2)) {
   17008               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "2"" of type '" "int""'");
   17009                 :   } 
   17010               0 :   arg2 = static_cast< int >(val2);
   17011               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17012               0 :   if (!SWIG_IsOK(ecode3)) {
   17013               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "3"" of type '" "int""'");
   17014                 :   } 
   17015               0 :   arg3 = static_cast< int >(val3);
   17016                 :   {
   17017                 :     /* %typemap(in) (tostring argin) */
   17018               0 :     str4 = PyObject_Str( obj3 );
   17019               0 :     if ( str4 == 0 ) {
   17020               0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   17021               0 :       SWIG_fail;
   17022                 :     }
   17023                 :     
   17024               0 :     arg4 = GDALPythonObjectToCStr(str4, &bToFree4); 
   17025                 :   }
   17026                 :   {
   17027               0 :     if ( bUseExceptions ) {
   17028               0 :       CPLErrorReset();
   17029                 :     }
   17030                 :     GDALRasterAttributeTableShadow_SetValueAsString(arg1,arg2,arg3,(char const *)arg4);
   17031               0 :     if ( bUseExceptions ) {
   17032               0 :       CPLErr eclass = CPLGetLastErrorType();
   17033               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17034               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17035                 :       }
   17036                 :     }
   17037                 :   }
   17038               0 :   resultobj = SWIG_Py_Void();
   17039                 :   {
   17040                 :     /* %typemap(freearg) (tostring argin) */
   17041               0 :     if ( str4 != NULL)
   17042                 :     {
   17043               0 :       Py_DECREF(str4);
   17044                 :     }
   17045               0 :     GDALPythonFreeCStr(arg4, bToFree4);
   17046                 :   }
   17047               0 :   return resultobj;
   17048                 : fail:
   17049                 :   {
   17050                 :     /* %typemap(freearg) (tostring argin) */
   17051               0 :     if ( str4 != NULL)
   17052                 :     {
   17053               0 :       Py_DECREF(str4);
   17054                 :     }
   17055               0 :     GDALPythonFreeCStr(arg4, bToFree4);
   17056                 :   }
   17057               0 :   return NULL;
   17058                 : }
   17059                 : 
   17060                 : 
   17061               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17062               6 :   PyObject *resultobj = 0;
   17063               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17064                 :   int arg2 ;
   17065                 :   int arg3 ;
   17066                 :   int arg4 ;
   17067               6 :   void *argp1 = 0 ;
   17068               6 :   int res1 = 0 ;
   17069                 :   int val2 ;
   17070               6 :   int ecode2 = 0 ;
   17071                 :   int val3 ;
   17072               6 :   int ecode3 = 0 ;
   17073                 :   int val4 ;
   17074               6 :   int ecode4 = 0 ;
   17075               6 :   PyObject * obj0 = 0 ;
   17076               6 :   PyObject * obj1 = 0 ;
   17077               6 :   PyObject * obj2 = 0 ;
   17078               6 :   PyObject * obj3 = 0 ;
   17079                 :   
   17080               6 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_SetValueAsInt",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   17081               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17082               6 :   if (!SWIG_IsOK(res1)) {
   17083               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17084                 :   }
   17085               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17086               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   17087               6 :   if (!SWIG_IsOK(ecode2)) {
   17088               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "2"" of type '" "int""'");
   17089                 :   } 
   17090               6 :   arg2 = static_cast< int >(val2);
   17091               6 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17092               6 :   if (!SWIG_IsOK(ecode3)) {
   17093               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "3"" of type '" "int""'");
   17094                 :   } 
   17095               6 :   arg3 = static_cast< int >(val3);
   17096               6 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   17097               6 :   if (!SWIG_IsOK(ecode4)) {
   17098               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "4"" of type '" "int""'");
   17099                 :   } 
   17100               6 :   arg4 = static_cast< int >(val4);
   17101                 :   {
   17102               6 :     if ( bUseExceptions ) {
   17103               0 :       CPLErrorReset();
   17104                 :     }
   17105                 :     GDALRasterAttributeTableShadow_SetValueAsInt(arg1,arg2,arg3,arg4);
   17106               6 :     if ( bUseExceptions ) {
   17107               0 :       CPLErr eclass = CPLGetLastErrorType();
   17108               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17109               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17110                 :       }
   17111                 :     }
   17112                 :   }
   17113               6 :   resultobj = SWIG_Py_Void();
   17114               6 :   return resultobj;
   17115                 : fail:
   17116               0 :   return NULL;
   17117                 : }
   17118                 : 
   17119                 : 
   17120               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17121               0 :   PyObject *resultobj = 0;
   17122               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17123                 :   int arg2 ;
   17124                 :   int arg3 ;
   17125                 :   double arg4 ;
   17126               0 :   void *argp1 = 0 ;
   17127               0 :   int res1 = 0 ;
   17128                 :   int val2 ;
   17129               0 :   int ecode2 = 0 ;
   17130                 :   int val3 ;
   17131               0 :   int ecode3 = 0 ;
   17132                 :   double val4 ;
   17133               0 :   int ecode4 = 0 ;
   17134               0 :   PyObject * obj0 = 0 ;
   17135               0 :   PyObject * obj1 = 0 ;
   17136               0 :   PyObject * obj2 = 0 ;
   17137               0 :   PyObject * obj3 = 0 ;
   17138                 :   
   17139               0 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_SetValueAsDouble",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   17140               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17141               0 :   if (!SWIG_IsOK(res1)) {
   17142               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17143                 :   }
   17144               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17145               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   17146               0 :   if (!SWIG_IsOK(ecode2)) {
   17147               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "2"" of type '" "int""'");
   17148                 :   } 
   17149               0 :   arg2 = static_cast< int >(val2);
   17150               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17151               0 :   if (!SWIG_IsOK(ecode3)) {
   17152               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "3"" of type '" "int""'");
   17153                 :   } 
   17154               0 :   arg3 = static_cast< int >(val3);
   17155               0 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   17156               0 :   if (!SWIG_IsOK(ecode4)) {
   17157               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "4"" of type '" "double""'");
   17158                 :   } 
   17159               0 :   arg4 = static_cast< double >(val4);
   17160                 :   {
   17161               0 :     if ( bUseExceptions ) {
   17162               0 :       CPLErrorReset();
   17163                 :     }
   17164                 :     GDALRasterAttributeTableShadow_SetValueAsDouble(arg1,arg2,arg3,arg4);
   17165               0 :     if ( bUseExceptions ) {
   17166               0 :       CPLErr eclass = CPLGetLastErrorType();
   17167               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17168               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17169                 :       }
   17170                 :     }
   17171                 :   }
   17172               0 :   resultobj = SWIG_Py_Void();
   17173               0 :   return resultobj;
   17174                 : fail:
   17175               0 :   return NULL;
   17176                 : }
   17177                 : 
   17178                 : 
   17179               1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17180               1 :   PyObject *resultobj = 0;
   17181               1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17182                 :   int arg2 ;
   17183               1 :   void *argp1 = 0 ;
   17184               1 :   int res1 = 0 ;
   17185                 :   int val2 ;
   17186               1 :   int ecode2 = 0 ;
   17187               1 :   PyObject * obj0 = 0 ;
   17188               1 :   PyObject * obj1 = 0 ;
   17189                 :   
   17190               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_SetRowCount",&obj0,&obj1)) SWIG_fail;
   17191               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17192               1 :   if (!SWIG_IsOK(res1)) {
   17193               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17194                 :   }
   17195               1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17196               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   17197               1 :   if (!SWIG_IsOK(ecode2)) {
   17198               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "2"" of type '" "int""'");
   17199                 :   } 
   17200               1 :   arg2 = static_cast< int >(val2);
   17201                 :   {
   17202               1 :     if ( bUseExceptions ) {
   17203               0 :       CPLErrorReset();
   17204                 :     }
   17205                 :     GDALRasterAttributeTableShadow_SetRowCount(arg1,arg2);
   17206               1 :     if ( bUseExceptions ) {
   17207               0 :       CPLErr eclass = CPLGetLastErrorType();
   17208               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17209               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17210                 :       }
   17211                 :     }
   17212                 :   }
   17213               1 :   resultobj = SWIG_Py_Void();
   17214               1 :   return resultobj;
   17215                 : fail:
   17216               0 :   return NULL;
   17217                 : }
   17218                 : 
   17219                 : 
   17220               2 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_CreateColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17221               2 :   PyObject *resultobj = 0;
   17222               2 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17223               2 :   char *arg2 = (char *) 0 ;
   17224                 :   GDALRATFieldType arg3 ;
   17225                 :   GDALRATFieldUsage arg4 ;
   17226               2 :   void *argp1 = 0 ;
   17227               2 :   int res1 = 0 ;
   17228                 :   int res2 ;
   17229               2 :   char *buf2 = 0 ;
   17230               2 :   int alloc2 = 0 ;
   17231                 :   int val3 ;
   17232               2 :   int ecode3 = 0 ;
   17233                 :   int val4 ;
   17234               2 :   int ecode4 = 0 ;
   17235               2 :   PyObject * obj0 = 0 ;
   17236               2 :   PyObject * obj1 = 0 ;
   17237               2 :   PyObject * obj2 = 0 ;
   17238               2 :   PyObject * obj3 = 0 ;
   17239                 :   int result;
   17240                 :   
   17241               2 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_CreateColumn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   17242               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17243               2 :   if (!SWIG_IsOK(res1)) {
   17244               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17245                 :   }
   17246               2 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17247               2 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   17248               2 :   if (!SWIG_IsOK(res2)) {
   17249               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "2"" of type '" "char const *""'");
   17250                 :   }
   17251               2 :   arg2 = reinterpret_cast< char * >(buf2);
   17252               2 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17253               2 :   if (!SWIG_IsOK(ecode3)) {
   17254               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "3"" of type '" "GDALRATFieldType""'");
   17255                 :   } 
   17256               2 :   arg3 = static_cast< GDALRATFieldType >(val3);
   17257               2 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   17258               2 :   if (!SWIG_IsOK(ecode4)) {
   17259               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "4"" of type '" "GDALRATFieldUsage""'");
   17260                 :   } 
   17261               2 :   arg4 = static_cast< GDALRATFieldUsage >(val4);
   17262                 :   {
   17263               2 :     if ( bUseExceptions ) {
   17264               0 :       CPLErrorReset();
   17265                 :     }
   17266               2 :     result = (int)GDALRasterAttributeTableShadow_CreateColumn(arg1,(char const *)arg2,arg3,arg4);
   17267               2 :     if ( bUseExceptions ) {
   17268               0 :       CPLErr eclass = CPLGetLastErrorType();
   17269               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17270               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17271                 :       }
   17272                 :     }
   17273                 :   }
   17274               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17275               2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17276               2 :   return resultobj;
   17277                 : fail:
   17278               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17279               0 :   return NULL;
   17280                 : }
   17281                 : 
   17282                 : 
   17283               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17284               0 :   PyObject *resultobj = 0;
   17285               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17286               0 :   double *arg2 = (double *) 0 ;
   17287               0 :   double *arg3 = (double *) 0 ;
   17288               0 :   void *argp1 = 0 ;
   17289               0 :   int res1 = 0 ;
   17290                 :   double temp2 ;
   17291               0 :   int res2 = SWIG_TMPOBJ ;
   17292                 :   double temp3 ;
   17293               0 :   int res3 = SWIG_TMPOBJ ;
   17294               0 :   PyObject * obj0 = 0 ;
   17295                 :   bool result;
   17296                 :   
   17297               0 :   arg2 = &temp2;
   17298               0 :   arg3 = &temp3;
   17299               0 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_GetLinearBinning",&obj0)) SWIG_fail;
   17300               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17301               0 :   if (!SWIG_IsOK(res1)) {
   17302               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17303                 :   }
   17304               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17305                 :   {
   17306               0 :     if ( bUseExceptions ) {
   17307               0 :       CPLErrorReset();
   17308                 :     }
   17309               0 :     result = (bool)GDALRasterAttributeTableShadow_GetLinearBinning(arg1,arg2,arg3);
   17310               0 :     if ( bUseExceptions ) {
   17311               0 :       CPLErr eclass = CPLGetLastErrorType();
   17312               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17313               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17314                 :       }
   17315                 :     }
   17316                 :   }
   17317               0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17318               0 :   if (SWIG_IsTmpObj(res2)) {
   17319               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   17320                 :   } else {
   17321               0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   17322               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   17323                 :   }
   17324               0 :   if (SWIG_IsTmpObj(res3)) {
   17325               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   17326                 :   } else {
   17327               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   17328               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   17329                 :   }
   17330               0 :   return resultobj;
   17331                 : fail:
   17332               0 :   return NULL;
   17333                 : }
   17334                 : 
   17335                 : 
   17336               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17337               0 :   PyObject *resultobj = 0;
   17338               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17339                 :   double arg2 ;
   17340                 :   double arg3 ;
   17341               0 :   void *argp1 = 0 ;
   17342               0 :   int res1 = 0 ;
   17343                 :   double val2 ;
   17344               0 :   int ecode2 = 0 ;
   17345                 :   double val3 ;
   17346               0 :   int ecode3 = 0 ;
   17347               0 :   PyObject * obj0 = 0 ;
   17348               0 :   PyObject * obj1 = 0 ;
   17349               0 :   PyObject * obj2 = 0 ;
   17350                 :   int result;
   17351                 :   
   17352               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_SetLinearBinning",&obj0,&obj1,&obj2)) SWIG_fail;
   17353               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17354               0 :   if (!SWIG_IsOK(res1)) {
   17355               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17356                 :   }
   17357               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17358               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   17359               0 :   if (!SWIG_IsOK(ecode2)) {
   17360               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "2"" of type '" "double""'");
   17361                 :   } 
   17362               0 :   arg2 = static_cast< double >(val2);
   17363               0 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   17364               0 :   if (!SWIG_IsOK(ecode3)) {
   17365               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "3"" of type '" "double""'");
   17366                 :   } 
   17367               0 :   arg3 = static_cast< double >(val3);
   17368                 :   {
   17369               0 :     if ( bUseExceptions ) {
   17370               0 :       CPLErrorReset();
   17371                 :     }
   17372               0 :     result = (int)GDALRasterAttributeTableShadow_SetLinearBinning(arg1,arg2,arg3);
   17373               0 :     if ( bUseExceptions ) {
   17374               0 :       CPLErr eclass = CPLGetLastErrorType();
   17375               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17376               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17377                 :       }
   17378                 :     }
   17379                 :   }
   17380               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17381               0 :   return resultobj;
   17382                 : fail:
   17383               0 :   return NULL;
   17384                 : }
   17385                 : 
   17386                 : 
   17387               2 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowOfValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17388               2 :   PyObject *resultobj = 0;
   17389               2 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17390                 :   double arg2 ;
   17391               2 :   void *argp1 = 0 ;
   17392               2 :   int res1 = 0 ;
   17393                 :   double val2 ;
   17394               2 :   int ecode2 = 0 ;
   17395               2 :   PyObject * obj0 = 0 ;
   17396               2 :   PyObject * obj1 = 0 ;
   17397                 :   int result;
   17398                 :   
   17399               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetRowOfValue",&obj0,&obj1)) SWIG_fail;
   17400               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17401               2 :   if (!SWIG_IsOK(res1)) {
   17402               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17403                 :   }
   17404               2 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17405               2 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   17406               2 :   if (!SWIG_IsOK(ecode2)) {
   17407               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "2"" of type '" "double""'");
   17408                 :   } 
   17409               2 :   arg2 = static_cast< double >(val2);
   17410                 :   {
   17411               2 :     if ( bUseExceptions ) {
   17412               0 :       CPLErrorReset();
   17413                 :     }
   17414               2 :     result = (int)GDALRasterAttributeTableShadow_GetRowOfValue(arg1,arg2);
   17415               2 :     if ( bUseExceptions ) {
   17416               0 :       CPLErr eclass = CPLGetLastErrorType();
   17417               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17418               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17419                 :       }
   17420                 :     }
   17421                 :   }
   17422               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17423               2 :   return resultobj;
   17424                 : fail:
   17425               0 :   return NULL;
   17426                 : }
   17427                 : 
   17428                 : 
   17429               6 : SWIGINTERN PyObject *RasterAttributeTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17430                 :   PyObject *obj;
   17431               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   17432               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_NewClientData(obj));
   17433               6 :   return SWIG_Py_Void();
   17434                 : }
   17435                 : 
   17436              61 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17437              61 :   PyObject *resultobj = 0;
   17438                 :   double arg1 ;
   17439              61 :   char *arg2 = (char *) NULL ;
   17440              61 :   void *arg3 = (void *) NULL ;
   17441                 :   double val1 ;
   17442              61 :   int ecode1 = 0 ;
   17443                 :   int res2 ;
   17444              61 :   char *buf2 = 0 ;
   17445              61 :   int alloc2 = 0 ;
   17446                 :   int res3 ;
   17447              61 :   PyObject * obj0 = 0 ;
   17448              61 :   PyObject * obj1 = 0 ;
   17449              61 :   PyObject * obj2 = 0 ;
   17450                 :   char *  kwnames[] = {
   17451                 :     (char *) "dfProgress",(char *) "pszMessage",(char *) "pData", NULL 
   17452              61 :   };
   17453                 :   int result;
   17454                 :   
   17455              61 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:TermProgress_nocb",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   17456              61 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   17457              61 :   if (!SWIG_IsOK(ecode1)) {
   17458               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
   17459                 :   } 
   17460              61 :   arg1 = static_cast< double >(val1);
   17461              61 :   if (obj1) {
   17462               0 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   17463               0 :     if (!SWIG_IsOK(res2)) {
   17464               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
   17465                 :     }
   17466               0 :     arg2 = reinterpret_cast< char * >(buf2);
   17467                 :   }
   17468              61 :   if (obj2) {
   17469               0 :     res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
   17470               0 :     if (!SWIG_IsOK(res3)) {
   17471               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
   17472                 :     }
   17473                 :   }
   17474                 :   {
   17475              61 :     if ( bUseExceptions ) {
   17476               0 :       CPLErrorReset();
   17477                 :     }
   17478              61 :     result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
   17479              61 :     if ( bUseExceptions ) {
   17480               0 :       CPLErr eclass = CPLGetLastErrorType();
   17481               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17482               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17483                 :       }
   17484                 :     }
   17485                 :   }
   17486              61 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17487              61 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17488              61 :   return resultobj;
   17489                 : fail:
   17490               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17491               0 :   return NULL;
   17492                 : }
   17493                 : 
   17494                 : 
   17495               3 : SWIGINTERN PyObject *_wrap_ComputeMedianCutPCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17496               3 :   PyObject *resultobj = 0;
   17497               3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   17498               3 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   17499               3 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   17500                 :   int arg4 ;
   17501               3 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   17502               3 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   17503               3 :   void *arg7 = (void *) NULL ;
   17504               3 :   void *argp1 = 0 ;
   17505               3 :   int res1 = 0 ;
   17506               3 :   void *argp2 = 0 ;
   17507               3 :   int res2 = 0 ;
   17508               3 :   void *argp3 = 0 ;
   17509               3 :   int res3 = 0 ;
   17510                 :   int val4 ;
   17511               3 :   int ecode4 = 0 ;
   17512               3 :   void *argp5 = 0 ;
   17513               3 :   int res5 = 0 ;
   17514               3 :   PyObject * obj0 = 0 ;
   17515               3 :   PyObject * obj1 = 0 ;
   17516               3 :   PyObject * obj2 = 0 ;
   17517               3 :   PyObject * obj3 = 0 ;
   17518               3 :   PyObject * obj4 = 0 ;
   17519               3 :   PyObject * obj5 = 0 ;
   17520               3 :   PyObject * obj6 = 0 ;
   17521                 :   char *  kwnames[] = {
   17522                 :     (char *) "red",(char *) "green",(char *) "blue",(char *) "num_colors",(char *) "colors",(char *) "callback",(char *) "callback_data", NULL 
   17523               3 :   };
   17524                 :   int result;
   17525                 :   
   17526                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   17527                 :   PyProgressData *psProgressInfo;
   17528               3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   17529               3 :   psProgressInfo->nLastReported = -1;
   17530               3 :   psProgressInfo->psPyCallback = NULL;
   17531               3 :   psProgressInfo->psPyCallbackData = NULL;
   17532               3 :   arg7 = psProgressInfo;
   17533               3 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OO:ComputeMedianCutPCT",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   17534               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17535               3 :   if (!SWIG_IsOK(res1)) {
   17536               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeMedianCutPCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   17537                 :   }
   17538               3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   17539               3 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17540               3 :   if (!SWIG_IsOK(res2)) {
   17541               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeMedianCutPCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   17542                 :   }
   17543               3 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   17544               3 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17545               3 :   if (!SWIG_IsOK(res3)) {
   17546               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ComputeMedianCutPCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   17547                 :   }
   17548               3 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   17549               3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   17550               3 :   if (!SWIG_IsOK(ecode4)) {
   17551               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ComputeMedianCutPCT" "', argument " "4"" of type '" "int""'");
   17552                 :   } 
   17553               3 :   arg4 = static_cast< int >(val4);
   17554               3 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   17555               3 :   if (!SWIG_IsOK(res5)) {
   17556               0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ComputeMedianCutPCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   17557                 :   }
   17558               3 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   17559               3 :   if (obj5) {
   17560                 :     {
   17561                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   17562                 :       /* callback_func typemap */
   17563               2 :       if (obj5 && obj5 != Py_None ) {
   17564               2 :         void* cbfunction = NULL;
   17565                 :         SWIG_ConvertPtr( obj5, 
   17566                 :           (void**)&cbfunction,
   17567                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   17568               2 :           SWIG_POINTER_EXCEPTION | 0 );
   17569                 :         
   17570               2 :         if ( cbfunction == GDALTermProgress ) {
   17571               2 :           arg6 = GDALTermProgress;
   17572                 :         } else {
   17573               0 :           if (!PyCallable_Check(obj5)) {
   17574                 :             PyErr_SetString( PyExc_RuntimeError, 
   17575               0 :               "Object given is not a Python function" );
   17576               0 :             SWIG_fail;
   17577                 :           }
   17578               0 :           psProgressInfo->psPyCallback = obj5;
   17579               0 :           arg6 = PyProgressProxy;
   17580                 :         }
   17581                 :         
   17582                 :       }
   17583                 :       
   17584                 :     }
   17585                 :   }
   17586               3 :   if (obj6) {
   17587                 :     {
   17588                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   17589               2 :       psProgressInfo->psPyCallbackData = obj6 ;
   17590                 :     }
   17591                 :   }
   17592                 :   {
   17593               3 :     if (!arg1) {
   17594               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17595                 :     }
   17596                 :   }
   17597                 :   {
   17598               3 :     if (!arg2) {
   17599               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17600                 :     }
   17601                 :   }
   17602                 :   {
   17603               3 :     if (!arg3) {
   17604               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17605                 :     }
   17606                 :   }
   17607                 :   {
   17608               3 :     if (!arg5) {
   17609               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17610                 :     }
   17611                 :   }
   17612                 :   {
   17613               3 :     if ( bUseExceptions ) {
   17614               0 :       CPLErrorReset();
   17615                 :     }
   17616               3 :     result = (int)ComputeMedianCutPCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   17617               3 :     if ( bUseExceptions ) {
   17618               0 :       CPLErr eclass = CPLGetLastErrorType();
   17619               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17620               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17621                 :       }
   17622                 :     }
   17623                 :   }
   17624               3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17625                 :   {
   17626                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17627                 :     
   17628               3 :     CPLFree(psProgressInfo);
   17629                 :     
   17630                 :   }
   17631               3 :   return resultobj;
   17632                 : fail:
   17633                 :   {
   17634                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17635                 :     
   17636               0 :     CPLFree(psProgressInfo);
   17637                 :     
   17638                 :   }
   17639               0 :   return NULL;
   17640                 : }
   17641                 : 
   17642                 : 
   17643               4 : SWIGINTERN PyObject *_wrap_DitherRGB2PCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17644               4 :   PyObject *resultobj = 0;
   17645               4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   17646               4 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   17647               4 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   17648               4 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   17649               4 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   17650               4 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   17651               4 :   void *arg7 = (void *) NULL ;
   17652               4 :   void *argp1 = 0 ;
   17653               4 :   int res1 = 0 ;
   17654               4 :   void *argp2 = 0 ;
   17655               4 :   int res2 = 0 ;
   17656               4 :   void *argp3 = 0 ;
   17657               4 :   int res3 = 0 ;
   17658               4 :   void *argp4 = 0 ;
   17659               4 :   int res4 = 0 ;
   17660               4 :   void *argp5 = 0 ;
   17661               4 :   int res5 = 0 ;
   17662               4 :   PyObject * obj0 = 0 ;
   17663               4 :   PyObject * obj1 = 0 ;
   17664               4 :   PyObject * obj2 = 0 ;
   17665               4 :   PyObject * obj3 = 0 ;
   17666               4 :   PyObject * obj4 = 0 ;
   17667               4 :   PyObject * obj5 = 0 ;
   17668               4 :   PyObject * obj6 = 0 ;
   17669                 :   char *  kwnames[] = {
   17670                 :     (char *) "red",(char *) "green",(char *) "blue",(char *) "target",(char *) "colors",(char *) "callback",(char *) "callback_data", NULL 
   17671               4 :   };
   17672                 :   int result;
   17673                 :   
   17674                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   17675                 :   PyProgressData *psProgressInfo;
   17676               4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   17677               4 :   psProgressInfo->nLastReported = -1;
   17678               4 :   psProgressInfo->psPyCallback = NULL;
   17679               4 :   psProgressInfo->psPyCallbackData = NULL;
   17680               4 :   arg7 = psProgressInfo;
   17681               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OO:DitherRGB2PCT",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   17682               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17683               4 :   if (!SWIG_IsOK(res1)) {
   17684               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DitherRGB2PCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   17685                 :   }
   17686               4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   17687               4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17688               4 :   if (!SWIG_IsOK(res2)) {
   17689               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DitherRGB2PCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   17690                 :   }
   17691               4 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   17692               4 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17693               4 :   if (!SWIG_IsOK(res3)) {
   17694               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DitherRGB2PCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   17695                 :   }
   17696               4 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   17697               4 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17698               4 :   if (!SWIG_IsOK(res4)) {
   17699               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DitherRGB2PCT" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   17700                 :   }
   17701               4 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   17702               4 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   17703               4 :   if (!SWIG_IsOK(res5)) {
   17704               0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DitherRGB2PCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   17705                 :   }
   17706               4 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   17707               4 :   if (obj5) {
   17708                 :     {
   17709                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   17710                 :       /* callback_func typemap */
   17711               3 :       if (obj5 && obj5 != Py_None ) {
   17712               3 :         void* cbfunction = NULL;
   17713                 :         SWIG_ConvertPtr( obj5, 
   17714                 :           (void**)&cbfunction,
   17715                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   17716               3 :           SWIG_POINTER_EXCEPTION | 0 );
   17717                 :         
   17718               3 :         if ( cbfunction == GDALTermProgress ) {
   17719               3 :           arg6 = GDALTermProgress;
   17720                 :         } else {
   17721               0 :           if (!PyCallable_Check(obj5)) {
   17722                 :             PyErr_SetString( PyExc_RuntimeError, 
   17723               0 :               "Object given is not a Python function" );
   17724               0 :             SWIG_fail;
   17725                 :           }
   17726               0 :           psProgressInfo->psPyCallback = obj5;
   17727               0 :           arg6 = PyProgressProxy;
   17728                 :         }
   17729                 :         
   17730                 :       }
   17731                 :       
   17732                 :     }
   17733                 :   }
   17734               4 :   if (obj6) {
   17735                 :     {
   17736                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   17737               3 :       psProgressInfo->psPyCallbackData = obj6 ;
   17738                 :     }
   17739                 :   }
   17740                 :   {
   17741               4 :     if (!arg1) {
   17742               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17743                 :     }
   17744                 :   }
   17745                 :   {
   17746               4 :     if (!arg2) {
   17747               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17748                 :     }
   17749                 :   }
   17750                 :   {
   17751               4 :     if (!arg3) {
   17752               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17753                 :     }
   17754                 :   }
   17755                 :   {
   17756               4 :     if (!arg4) {
   17757               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17758                 :     }
   17759                 :   }
   17760                 :   {
   17761               4 :     if (!arg5) {
   17762               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17763                 :     }
   17764                 :   }
   17765                 :   {
   17766               4 :     if ( bUseExceptions ) {
   17767               0 :       CPLErrorReset();
   17768                 :     }
   17769               4 :     result = (int)DitherRGB2PCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   17770               4 :     if ( bUseExceptions ) {
   17771               0 :       CPLErr eclass = CPLGetLastErrorType();
   17772               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17773               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17774                 :       }
   17775                 :     }
   17776                 :   }
   17777               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17778                 :   {
   17779                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17780                 :     
   17781               4 :     CPLFree(psProgressInfo);
   17782                 :     
   17783                 :   }
   17784               4 :   return resultobj;
   17785                 : fail:
   17786                 :   {
   17787                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17788                 :     
   17789               0 :     CPLFree(psProgressInfo);
   17790                 :     
   17791                 :   }
   17792               0 :   return NULL;
   17793                 : }
   17794                 : 
   17795                 : 
   17796               9 : SWIGINTERN PyObject *_wrap_ReprojectImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17797               9 :   PyObject *resultobj = 0;
   17798               9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   17799               9 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   17800               9 :   char *arg3 = (char *) NULL ;
   17801               9 :   char *arg4 = (char *) NULL ;
   17802               9 :   GDALResampleAlg arg5 = (GDALResampleAlg) GRA_NearestNeighbour ;
   17803               9 :   double arg6 = (double) 0.0 ;
   17804               9 :   double arg7 = (double) 0.0 ;
   17805               9 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   17806               9 :   void *arg9 = (void *) NULL ;
   17807               9 :   void *argp1 = 0 ;
   17808               9 :   int res1 = 0 ;
   17809               9 :   void *argp2 = 0 ;
   17810               9 :   int res2 = 0 ;
   17811                 :   int res3 ;
   17812               9 :   char *buf3 = 0 ;
   17813               9 :   int alloc3 = 0 ;
   17814                 :   int res4 ;
   17815               9 :   char *buf4 = 0 ;
   17816               9 :   int alloc4 = 0 ;
   17817                 :   int val5 ;
   17818               9 :   int ecode5 = 0 ;
   17819                 :   double val6 ;
   17820               9 :   int ecode6 = 0 ;
   17821                 :   double val7 ;
   17822               9 :   int ecode7 = 0 ;
   17823               9 :   PyObject * obj0 = 0 ;
   17824               9 :   PyObject * obj1 = 0 ;
   17825               9 :   PyObject * obj2 = 0 ;
   17826               9 :   PyObject * obj3 = 0 ;
   17827               9 :   PyObject * obj4 = 0 ;
   17828               9 :   PyObject * obj5 = 0 ;
   17829               9 :   PyObject * obj6 = 0 ;
   17830               9 :   PyObject * obj7 = 0 ;
   17831               9 :   PyObject * obj8 = 0 ;
   17832                 :   CPLErr result;
   17833                 :   
   17834                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   17835                 :   PyProgressData *psProgressInfo;
   17836               9 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   17837               9 :   psProgressInfo->nLastReported = -1;
   17838               9 :   psProgressInfo->psPyCallback = NULL;
   17839               9 :   psProgressInfo->psPyCallbackData = NULL;
   17840               9 :   arg9 = psProgressInfo;
   17841               9 :   if (!PyArg_ParseTuple(args,(char *)"OO|OOOOOOO:ReprojectImage",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
   17842               9 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   17843               9 :   if (!SWIG_IsOK(res1)) {
   17844               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReprojectImage" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   17845                 :   }
   17846               9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   17847               9 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   17848               9 :   if (!SWIG_IsOK(res2)) {
   17849               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReprojectImage" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   17850                 :   }
   17851               9 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   17852               9 :   if (obj2) {
   17853               8 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   17854               8 :     if (!SWIG_IsOK(res3)) {
   17855               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReprojectImage" "', argument " "3"" of type '" "char const *""'");
   17856                 :     }
   17857               8 :     arg3 = reinterpret_cast< char * >(buf3);
   17858                 :   }
   17859               9 :   if (obj3) {
   17860               8 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   17861               8 :     if (!SWIG_IsOK(res4)) {
   17862               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReprojectImage" "', argument " "4"" of type '" "char const *""'");
   17863                 :     }
   17864               8 :     arg4 = reinterpret_cast< char * >(buf4);
   17865                 :   }
   17866               9 :   if (obj4) {
   17867               7 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   17868               7 :     if (!SWIG_IsOK(ecode5)) {
   17869               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ReprojectImage" "', argument " "5"" of type '" "GDALResampleAlg""'");
   17870                 :     } 
   17871               7 :     arg5 = static_cast< GDALResampleAlg >(val5);
   17872                 :   }
   17873               9 :   if (obj5) {
   17874               3 :     ecode6 = SWIG_AsVal_double(obj5, &val6);
   17875               3 :     if (!SWIG_IsOK(ecode6)) {
   17876               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ReprojectImage" "', argument " "6"" of type '" "double""'");
   17877                 :     } 
   17878               3 :     arg6 = static_cast< double >(val6);
   17879                 :   }
   17880               9 :   if (obj6) {
   17881               3 :     ecode7 = SWIG_AsVal_double(obj6, &val7);
   17882               3 :     if (!SWIG_IsOK(ecode7)) {
   17883               0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ReprojectImage" "', argument " "7"" of type '" "double""'");
   17884                 :     } 
   17885               3 :     arg7 = static_cast< double >(val7);
   17886                 :   }
   17887               9 :   if (obj7) {
   17888                 :     {
   17889                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   17890                 :       /* callback_func typemap */
   17891               3 :       if (obj7 && obj7 != Py_None ) {
   17892               3 :         void* cbfunction = NULL;
   17893                 :         SWIG_ConvertPtr( obj7, 
   17894                 :           (void**)&cbfunction,
   17895                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   17896               3 :           SWIG_POINTER_EXCEPTION | 0 );
   17897                 :         
   17898               3 :         if ( cbfunction == GDALTermProgress ) {
   17899               0 :           arg8 = GDALTermProgress;
   17900                 :         } else {
   17901               3 :           if (!PyCallable_Check(obj7)) {
   17902                 :             PyErr_SetString( PyExc_RuntimeError, 
   17903               0 :               "Object given is not a Python function" );
   17904               0 :             SWIG_fail;
   17905                 :           }
   17906               3 :           psProgressInfo->psPyCallback = obj7;
   17907               3 :           arg8 = PyProgressProxy;
   17908                 :         }
   17909                 :         
   17910                 :       }
   17911                 :       
   17912                 :     }
   17913                 :   }
   17914               9 :   if (obj8) {
   17915                 :     {
   17916                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   17917               3 :       psProgressInfo->psPyCallbackData = obj8 ;
   17918                 :     }
   17919                 :   }
   17920                 :   {
   17921               9 :     if (!arg1) {
   17922               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17923                 :     }
   17924                 :   }
   17925                 :   {
   17926               9 :     if (!arg2) {
   17927               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17928                 :     }
   17929                 :   }
   17930                 :   {
   17931               9 :     if ( bUseExceptions ) {
   17932               0 :       CPLErrorReset();
   17933                 :     }
   17934               9 :     result = (CPLErr)ReprojectImage(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7,arg8,arg9);
   17935               9 :     if ( bUseExceptions ) {
   17936               0 :       CPLErr eclass = CPLGetLastErrorType();
   17937               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17938               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17939                 :       }
   17940                 :     }
   17941                 :   }
   17942              18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17943               9 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17944               9 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   17945                 :   {
   17946                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17947                 :     
   17948               9 :     CPLFree(psProgressInfo);
   17949                 :     
   17950                 :   }
   17951               9 :   return resultobj;
   17952                 : fail:
   17953               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17954               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   17955                 :   {
   17956                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17957                 :     
   17958               0 :     CPLFree(psProgressInfo);
   17959                 :     
   17960                 :   }
   17961               0 :   return NULL;
   17962                 : }
   17963                 : 
   17964                 : 
   17965               4 : SWIGINTERN PyObject *_wrap_ComputeProximity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17966               4 :   PyObject *resultobj = 0;
   17967               4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   17968               4 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   17969               4 :   char **arg3 = (char **) NULL ;
   17970               4 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   17971               4 :   void *arg5 = (void *) NULL ;
   17972               4 :   void *argp1 = 0 ;
   17973               4 :   int res1 = 0 ;
   17974               4 :   void *argp2 = 0 ;
   17975               4 :   int res2 = 0 ;
   17976               4 :   PyObject * obj0 = 0 ;
   17977               4 :   PyObject * obj1 = 0 ;
   17978               4 :   PyObject * obj2 = 0 ;
   17979               4 :   PyObject * obj3 = 0 ;
   17980               4 :   PyObject * obj4 = 0 ;
   17981                 :   char *  kwnames[] = {
   17982                 :     (char *) "srcBand",(char *) "proximityBand",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   17983               4 :   };
   17984                 :   int result;
   17985                 :   
   17986                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   17987                 :   PyProgressData *psProgressInfo;
   17988               4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   17989               4 :   psProgressInfo->nLastReported = -1;
   17990               4 :   psProgressInfo->psPyCallback = NULL;
   17991               4 :   psProgressInfo->psPyCallbackData = NULL;
   17992               4 :   arg5 = psProgressInfo;
   17993               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:ComputeProximity",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   17994               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17995               4 :   if (!SWIG_IsOK(res1)) {
   17996               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeProximity" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   17997                 :   }
   17998               4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   17999               4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18000               4 :   if (!SWIG_IsOK(res2)) {
   18001               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeProximity" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18002                 :   }
   18003               4 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18004               4 :   if (obj2) {
   18005                 :     {
   18006                 :       /* %typemap(in) char **options */
   18007                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   18008               3 :       if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
   18009                 :   #if PY_VERSION_HEX < 0x03000000
   18010                 :         || PyString_Check(obj2)
   18011                 :   #endif
   18012                 :         ) {
   18013               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18014               0 :         SWIG_fail;
   18015                 :       }
   18016                 :       
   18017               3 :       int size = PySequence_Size(obj2);
   18018              11 :       for (int i = 0; i < size; i++) {
   18019               8 :         PyObject* pyObj = PySequence_GetItem(obj2,i);
   18020               8 :         if (PyUnicode_Check(pyObj))
   18021                 :         {
   18022                 :           char *pszStr;
   18023                 :           Py_ssize_t nLen;
   18024               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18025                 : #if PY_VERSION_HEX >= 0x03000000
   18026                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18027                 : #else
   18028               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18029                 : #endif
   18030               0 :           arg3 = CSLAddString( arg3, pszStr );
   18031               0 :           Py_XDECREF(pyUTF8Str);
   18032                 :         }
   18033                 : #if PY_VERSION_HEX >= 0x03000000
   18034                 :         else if (PyBytes_Check(pyObj))
   18035                 :         arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
   18036                 : #else
   18037               8 :         else if (PyString_Check(pyObj))
   18038               8 :         arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
   18039                 : #endif
   18040                 :         else
   18041                 :         {
   18042               0 :           Py_DECREF(pyObj);
   18043               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18044               0 :           SWIG_fail;
   18045                 :         }
   18046               8 :         Py_DECREF(pyObj);
   18047                 :       }
   18048                 :     }
   18049                 :   }
   18050               4 :   if (obj3) {
   18051                 :     {
   18052                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18053                 :       /* callback_func typemap */
   18054               2 :       if (obj3 && obj3 != Py_None ) {
   18055               1 :         void* cbfunction = NULL;
   18056                 :         SWIG_ConvertPtr( obj3, 
   18057                 :           (void**)&cbfunction,
   18058                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18059               1 :           SWIG_POINTER_EXCEPTION | 0 );
   18060                 :         
   18061               1 :         if ( cbfunction == GDALTermProgress ) {
   18062               1 :           arg4 = GDALTermProgress;
   18063                 :         } else {
   18064               0 :           if (!PyCallable_Check(obj3)) {
   18065                 :             PyErr_SetString( PyExc_RuntimeError, 
   18066               0 :               "Object given is not a Python function" );
   18067               0 :             SWIG_fail;
   18068                 :           }
   18069               0 :           psProgressInfo->psPyCallback = obj3;
   18070               0 :           arg4 = PyProgressProxy;
   18071                 :         }
   18072                 :         
   18073                 :       }
   18074                 :       
   18075                 :     }
   18076                 :   }
   18077               4 :   if (obj4) {
   18078                 :     {
   18079                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18080               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   18081                 :     }
   18082                 :   }
   18083                 :   {
   18084               4 :     if (!arg1) {
   18085               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18086                 :     }
   18087                 :   }
   18088                 :   {
   18089               4 :     if (!arg2) {
   18090               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18091                 :     }
   18092                 :   }
   18093                 :   {
   18094               4 :     if ( bUseExceptions ) {
   18095               0 :       CPLErrorReset();
   18096                 :     }
   18097               4 :     result = (int)ComputeProximity(arg1,arg2,arg3,arg4,arg5);
   18098               4 :     if ( bUseExceptions ) {
   18099               0 :       CPLErr eclass = CPLGetLastErrorType();
   18100               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18101               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18102                 :       }
   18103                 :     }
   18104                 :   }
   18105               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18106                 :   {
   18107                 :     /* %typemap(freearg) char **options */
   18108               4 :     CSLDestroy( arg3 );
   18109                 :   }
   18110                 :   {
   18111                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18112                 :     
   18113               4 :     CPLFree(psProgressInfo);
   18114                 :     
   18115                 :   }
   18116               4 :   return resultobj;
   18117                 : fail:
   18118                 :   {
   18119                 :     /* %typemap(freearg) char **options */
   18120               0 :     CSLDestroy( arg3 );
   18121                 :   }
   18122                 :   {
   18123                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18124                 :     
   18125               0 :     CPLFree(psProgressInfo);
   18126                 :     
   18127                 :   }
   18128               0 :   return NULL;
   18129                 : }
   18130                 : 
   18131                 : 
   18132               4 : SWIGINTERN PyObject *_wrap_RasterizeLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18133               4 :   PyObject *resultobj = 0;
   18134               4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   18135                 :   int arg2 ;
   18136               4 :   int *arg3 = (int *) 0 ;
   18137               4 :   OGRLayerShadow *arg4 = (OGRLayerShadow *) 0 ;
   18138               4 :   void *arg5 = (void *) NULL ;
   18139               4 :   void *arg6 = (void *) NULL ;
   18140               4 :   int arg7 = (int) 0 ;
   18141               4 :   double *arg8 = (double *) NULL ;
   18142               4 :   char **arg9 = (char **) NULL ;
   18143               4 :   GDALProgressFunc arg10 = (GDALProgressFunc) NULL ;
   18144               4 :   void *arg11 = (void *) NULL ;
   18145               4 :   void *argp1 = 0 ;
   18146               4 :   int res1 = 0 ;
   18147               4 :   void *argp4 = 0 ;
   18148               4 :   int res4 = 0 ;
   18149                 :   int res5 ;
   18150                 :   int res6 ;
   18151               4 :   PyObject * obj0 = 0 ;
   18152               4 :   PyObject * obj1 = 0 ;
   18153               4 :   PyObject * obj2 = 0 ;
   18154               4 :   PyObject * obj3 = 0 ;
   18155               4 :   PyObject * obj4 = 0 ;
   18156               4 :   PyObject * obj5 = 0 ;
   18157               4 :   PyObject * obj6 = 0 ;
   18158               4 :   PyObject * obj7 = 0 ;
   18159               4 :   PyObject * obj8 = 0 ;
   18160                 :   char *  kwnames[] = {
   18161                 :     (char *) "dataset",(char *) "bands",(char *) "layer",(char *) "pfnTransformer",(char *) "pTransformArg",(char *) "burn_values",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18162               4 :   };
   18163                 :   int result;
   18164                 :   
   18165                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18166                 :   PyProgressData *psProgressInfo;
   18167               4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18168               4 :   psProgressInfo->nLastReported = -1;
   18169               4 :   psProgressInfo->psPyCallback = NULL;
   18170               4 :   psProgressInfo->psPyCallbackData = NULL;
   18171               4 :   arg11 = psProgressInfo;
   18172               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOO:RasterizeLayer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
   18173               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   18174               4 :   if (!SWIG_IsOK(res1)) {
   18175               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterizeLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   18176                 :   }
   18177               4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   18178                 :   {
   18179                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   18180                 :     /* check if is List */
   18181               4 :     if ( !PySequence_Check(obj1) ) {
   18182               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   18183               0 :       SWIG_fail;
   18184                 :     }
   18185               4 :     arg2 = PySequence_Size(obj1);
   18186               4 :     arg3 = (int*) malloc(arg2*sizeof(int));
   18187              16 :     for( int i = 0; i<arg2; i++ ) {
   18188              12 :       PyObject *o = PySequence_GetItem(obj1,i);
   18189              12 :       if ( !PyArg_Parse(o,"i",&arg3[i]) ) {
   18190               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
   18191               0 :         Py_DECREF(o);
   18192                 :         SWIG_fail;
   18193                 :       }
   18194              12 :       Py_DECREF(o);
   18195                 :     }
   18196                 :   }
   18197               4 :   res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   18198               4 :   if (!SWIG_IsOK(res4)) {
   18199               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RasterizeLayer" "', argument " "4"" of type '" "OGRLayerShadow *""'"); 
   18200                 :   }
   18201               4 :   arg4 = reinterpret_cast< OGRLayerShadow * >(argp4);
   18202               4 :   if (obj3) {
   18203               0 :     res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
   18204               0 :     if (!SWIG_IsOK(res5)) {
   18205               0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "RasterizeLayer" "', argument " "5"" of type '" "void *""'"); 
   18206                 :     }
   18207                 :   }
   18208               4 :   if (obj4) {
   18209               0 :     res6 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg6), 0, 0);
   18210               0 :     if (!SWIG_IsOK(res6)) {
   18211               0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "RasterizeLayer" "', argument " "6"" of type '" "void *""'"); 
   18212                 :     }
   18213                 :   }
   18214               4 :   if (obj5) {
   18215                 :     {
   18216                 :       /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   18217                 :       /* check if is List */
   18218               3 :       if ( !PySequence_Check(obj5) ) {
   18219               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   18220               0 :         SWIG_fail;
   18221                 :       }
   18222               3 :       arg7 = PySequence_Size(obj5);
   18223               3 :       arg8 = (double*) malloc(arg7*sizeof(double));
   18224              12 :       for( int i = 0; i<arg7; i++ ) {
   18225               9 :         PyObject *o = PySequence_GetItem(obj5,i);
   18226               9 :         if ( !PyArg_Parse(o,"d",&arg8[i]) ) {
   18227               0 :           PyErr_SetString(PyExc_TypeError, "not a number");
   18228               0 :           Py_DECREF(o);
   18229                 :           SWIG_fail;
   18230                 :         }
   18231               9 :         Py_DECREF(o);
   18232                 :       }
   18233                 :     }
   18234                 :   }
   18235               4 :   if (obj6) {
   18236                 :     {
   18237                 :       /* %typemap(in) char **options */
   18238                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   18239               3 :       if ( ! PySequence_Check(obj6) || PyUnicode_Check(obj6)
   18240                 :   #if PY_VERSION_HEX < 0x03000000
   18241                 :         || PyString_Check(obj6)
   18242                 :   #endif
   18243                 :         ) {
   18244               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18245               0 :         SWIG_fail;
   18246                 :       }
   18247                 :       
   18248               3 :       int size = PySequence_Size(obj6);
   18249               6 :       for (int i = 0; i < size; i++) {
   18250               3 :         PyObject* pyObj = PySequence_GetItem(obj6,i);
   18251               3 :         if (PyUnicode_Check(pyObj))
   18252                 :         {
   18253                 :           char *pszStr;
   18254                 :           Py_ssize_t nLen;
   18255               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18256                 : #if PY_VERSION_HEX >= 0x03000000
   18257                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18258                 : #else
   18259               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18260                 : #endif
   18261               0 :           arg9 = CSLAddString( arg9, pszStr );
   18262               0 :           Py_XDECREF(pyUTF8Str);
   18263                 :         }
   18264                 : #if PY_VERSION_HEX >= 0x03000000
   18265                 :         else if (PyBytes_Check(pyObj))
   18266                 :         arg9 = CSLAddString( arg9, PyBytes_AsString(pyObj) );
   18267                 : #else
   18268               3 :         else if (PyString_Check(pyObj))
   18269               3 :         arg9 = CSLAddString( arg9, PyString_AsString(pyObj) );
   18270                 : #endif
   18271                 :         else
   18272                 :         {
   18273               0 :           Py_DECREF(pyObj);
   18274               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18275               0 :           SWIG_fail;
   18276                 :         }
   18277               3 :         Py_DECREF(pyObj);
   18278                 :       }
   18279                 :     }
   18280                 :   }
   18281               4 :   if (obj7) {
   18282                 :     {
   18283                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18284                 :       /* callback_func typemap */
   18285               0 :       if (obj7 && obj7 != Py_None ) {
   18286               0 :         void* cbfunction = NULL;
   18287                 :         SWIG_ConvertPtr( obj7, 
   18288                 :           (void**)&cbfunction,
   18289                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18290               0 :           SWIG_POINTER_EXCEPTION | 0 );
   18291                 :         
   18292               0 :         if ( cbfunction == GDALTermProgress ) {
   18293               0 :           arg10 = GDALTermProgress;
   18294                 :         } else {
   18295               0 :           if (!PyCallable_Check(obj7)) {
   18296                 :             PyErr_SetString( PyExc_RuntimeError, 
   18297               0 :               "Object given is not a Python function" );
   18298               0 :             SWIG_fail;
   18299                 :           }
   18300               0 :           psProgressInfo->psPyCallback = obj7;
   18301               0 :           arg10 = PyProgressProxy;
   18302                 :         }
   18303                 :         
   18304                 :       }
   18305                 :       
   18306                 :     }
   18307                 :   }
   18308               4 :   if (obj8) {
   18309                 :     {
   18310                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18311               0 :       psProgressInfo->psPyCallbackData = obj8 ;
   18312                 :     }
   18313                 :   }
   18314                 :   {
   18315               4 :     if (!arg1) {
   18316               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18317                 :     }
   18318                 :   }
   18319                 :   {
   18320               4 :     if (!arg4) {
   18321               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18322                 :     }
   18323                 :   }
   18324                 :   {
   18325               4 :     if ( bUseExceptions ) {
   18326               0 :       CPLErrorReset();
   18327                 :     }
   18328               4 :     result = (int)RasterizeLayer(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   18329               4 :     if ( bUseExceptions ) {
   18330               0 :       CPLErr eclass = CPLGetLastErrorType();
   18331               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18332               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18333                 :       }
   18334                 :     }
   18335                 :   }
   18336               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18337                 :   {
   18338                 :     /* %typemap(freearg) (int nList, int* pList) */
   18339               4 :     if (arg3) {
   18340               4 :       free((void*) arg3);
   18341                 :     }
   18342                 :   }
   18343                 :   {
   18344                 :     /* %typemap(freearg) (int nList, double* pList) */
   18345               4 :     if (arg8) {
   18346               3 :       free((void*) arg8);
   18347                 :     }
   18348                 :   }
   18349                 :   {
   18350                 :     /* %typemap(freearg) char **options */
   18351               4 :     CSLDestroy( arg9 );
   18352                 :   }
   18353                 :   {
   18354                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18355                 :     
   18356               4 :     CPLFree(psProgressInfo);
   18357                 :     
   18358                 :   }
   18359               4 :   return resultobj;
   18360                 : fail:
   18361                 :   {
   18362                 :     /* %typemap(freearg) (int nList, int* pList) */
   18363               0 :     if (arg3) {
   18364               0 :       free((void*) arg3);
   18365                 :     }
   18366                 :   }
   18367                 :   {
   18368                 :     /* %typemap(freearg) (int nList, double* pList) */
   18369               0 :     if (arg8) {
   18370               0 :       free((void*) arg8);
   18371                 :     }
   18372                 :   }
   18373                 :   {
   18374                 :     /* %typemap(freearg) char **options */
   18375               0 :     CSLDestroy( arg9 );
   18376                 :   }
   18377                 :   {
   18378                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18379                 :     
   18380               0 :     CPLFree(psProgressInfo);
   18381                 :     
   18382                 :   }
   18383               0 :   return NULL;
   18384                 : }
   18385                 : 
   18386                 : 
   18387               6 : SWIGINTERN PyObject *_wrap_Polygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18388               6 :   PyObject *resultobj = 0;
   18389               6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18390               6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   18391               6 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   18392                 :   int arg4 ;
   18393               6 :   char **arg5 = (char **) NULL ;
   18394               6 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   18395               6 :   void *arg7 = (void *) NULL ;
   18396               6 :   void *argp1 = 0 ;
   18397               6 :   int res1 = 0 ;
   18398               6 :   void *argp2 = 0 ;
   18399               6 :   int res2 = 0 ;
   18400               6 :   void *argp3 = 0 ;
   18401               6 :   int res3 = 0 ;
   18402                 :   int val4 ;
   18403               6 :   int ecode4 = 0 ;
   18404               6 :   PyObject * obj0 = 0 ;
   18405               6 :   PyObject * obj1 = 0 ;
   18406               6 :   PyObject * obj2 = 0 ;
   18407               6 :   PyObject * obj3 = 0 ;
   18408               6 :   PyObject * obj4 = 0 ;
   18409               6 :   PyObject * obj5 = 0 ;
   18410               6 :   PyObject * obj6 = 0 ;
   18411                 :   char *  kwnames[] = {
   18412                 :     (char *) "srcBand",(char *) "maskBand",(char *) "outLayer",(char *) "iPixValField",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18413               6 :   };
   18414                 :   int result;
   18415                 :   
   18416                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18417                 :   PyProgressData *psProgressInfo;
   18418               6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18419               6 :   psProgressInfo->nLastReported = -1;
   18420               6 :   psProgressInfo->psPyCallback = NULL;
   18421               6 :   psProgressInfo->psPyCallbackData = NULL;
   18422               6 :   arg7 = psProgressInfo;
   18423               6 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:Polygonize",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   18424               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18425               6 :   if (!SWIG_IsOK(res1)) {
   18426               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18427                 :   }
   18428               6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18429               6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18430               6 :   if (!SWIG_IsOK(res2)) {
   18431               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Polygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18432                 :   }
   18433               6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18434               6 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   18435               6 :   if (!SWIG_IsOK(res3)) {
   18436               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Polygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   18437                 :   }
   18438               6 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   18439               6 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18440               6 :   if (!SWIG_IsOK(ecode4)) {
   18441               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Polygonize" "', argument " "4"" of type '" "int""'");
   18442                 :   } 
   18443               6 :   arg4 = static_cast< int >(val4);
   18444               6 :   if (obj4) {
   18445                 :     {
   18446                 :       /* %typemap(in) char **options */
   18447                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   18448               3 :       if ( ! PySequence_Check(obj4) || PyUnicode_Check(obj4)
   18449                 :   #if PY_VERSION_HEX < 0x03000000
   18450                 :         || PyString_Check(obj4)
   18451                 :   #endif
   18452                 :         ) {
   18453               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18454               0 :         SWIG_fail;
   18455                 :       }
   18456                 :       
   18457               3 :       int size = PySequence_Size(obj4);
   18458               4 :       for (int i = 0; i < size; i++) {
   18459               1 :         PyObject* pyObj = PySequence_GetItem(obj4,i);
   18460               1 :         if (PyUnicode_Check(pyObj))
   18461                 :         {
   18462                 :           char *pszStr;
   18463                 :           Py_ssize_t nLen;
   18464               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18465                 : #if PY_VERSION_HEX >= 0x03000000
   18466                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18467                 : #else
   18468               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18469                 : #endif
   18470               0 :           arg5 = CSLAddString( arg5, pszStr );
   18471               0 :           Py_XDECREF(pyUTF8Str);
   18472                 :         }
   18473                 : #if PY_VERSION_HEX >= 0x03000000
   18474                 :         else if (PyBytes_Check(pyObj))
   18475                 :         arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
   18476                 : #else
   18477               1 :         else if (PyString_Check(pyObj))
   18478               1 :         arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
   18479                 : #endif
   18480                 :         else
   18481                 :         {
   18482               0 :           Py_DECREF(pyObj);
   18483               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18484               0 :           SWIG_fail;
   18485                 :         }
   18486               1 :         Py_DECREF(pyObj);
   18487                 :       }
   18488                 :     }
   18489                 :   }
   18490               6 :   if (obj5) {
   18491                 :     {
   18492                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18493                 :       /* callback_func typemap */
   18494               2 :       if (obj5 && obj5 != Py_None ) {
   18495               1 :         void* cbfunction = NULL;
   18496                 :         SWIG_ConvertPtr( obj5, 
   18497                 :           (void**)&cbfunction,
   18498                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18499               1 :           SWIG_POINTER_EXCEPTION | 0 );
   18500                 :         
   18501               1 :         if ( cbfunction == GDALTermProgress ) {
   18502               1 :           arg6 = GDALTermProgress;
   18503                 :         } else {
   18504               0 :           if (!PyCallable_Check(obj5)) {
   18505                 :             PyErr_SetString( PyExc_RuntimeError, 
   18506               0 :               "Object given is not a Python function" );
   18507               0 :             SWIG_fail;
   18508                 :           }
   18509               0 :           psProgressInfo->psPyCallback = obj5;
   18510               0 :           arg6 = PyProgressProxy;
   18511                 :         }
   18512                 :         
   18513                 :       }
   18514                 :       
   18515                 :     }
   18516                 :   }
   18517               6 :   if (obj6) {
   18518                 :     {
   18519                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18520               0 :       psProgressInfo->psPyCallbackData = obj6 ;
   18521                 :     }
   18522                 :   }
   18523                 :   {
   18524               6 :     if (!arg1) {
   18525               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18526                 :     }
   18527                 :   }
   18528                 :   {
   18529               6 :     if (!arg3) {
   18530               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18531                 :     }
   18532                 :   }
   18533                 :   {
   18534               6 :     if ( bUseExceptions ) {
   18535               0 :       CPLErrorReset();
   18536                 :     }
   18537               6 :     result = (int)Polygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   18538               6 :     if ( bUseExceptions ) {
   18539               0 :       CPLErr eclass = CPLGetLastErrorType();
   18540               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18541               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18542                 :       }
   18543                 :     }
   18544                 :   }
   18545               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18546                 :   {
   18547                 :     /* %typemap(freearg) char **options */
   18548               6 :     CSLDestroy( arg5 );
   18549                 :   }
   18550                 :   {
   18551                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18552                 :     
   18553               6 :     CPLFree(psProgressInfo);
   18554                 :     
   18555                 :   }
   18556               6 :   return resultobj;
   18557                 : fail:
   18558                 :   {
   18559                 :     /* %typemap(freearg) char **options */
   18560               0 :     CSLDestroy( arg5 );
   18561                 :   }
   18562                 :   {
   18563                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18564                 :     
   18565               0 :     CPLFree(psProgressInfo);
   18566                 :     
   18567                 :   }
   18568               0 :   return NULL;
   18569                 : }
   18570                 : 
   18571                 : 
   18572               1 : SWIGINTERN PyObject *_wrap_FillNodata(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18573               1 :   PyObject *resultobj = 0;
   18574               1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18575               1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   18576                 :   double arg3 ;
   18577                 :   int arg4 ;
   18578               1 :   char **arg5 = (char **) NULL ;
   18579               1 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   18580               1 :   void *arg7 = (void *) NULL ;
   18581               1 :   void *argp1 = 0 ;
   18582               1 :   int res1 = 0 ;
   18583               1 :   void *argp2 = 0 ;
   18584               1 :   int res2 = 0 ;
   18585                 :   double val3 ;
   18586               1 :   int ecode3 = 0 ;
   18587                 :   int val4 ;
   18588               1 :   int ecode4 = 0 ;
   18589               1 :   PyObject * obj0 = 0 ;
   18590               1 :   PyObject * obj1 = 0 ;
   18591               1 :   PyObject * obj2 = 0 ;
   18592               1 :   PyObject * obj3 = 0 ;
   18593               1 :   PyObject * obj4 = 0 ;
   18594               1 :   PyObject * obj5 = 0 ;
   18595               1 :   PyObject * obj6 = 0 ;
   18596                 :   char *  kwnames[] = {
   18597                 :     (char *) "targetBand",(char *) "maskBand",(char *) "maxSearchDist",(char *) "smoothingIterations",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18598               1 :   };
   18599                 :   int result;
   18600                 :   
   18601                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18602                 :   PyProgressData *psProgressInfo;
   18603               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18604               1 :   psProgressInfo->nLastReported = -1;
   18605               1 :   psProgressInfo->psPyCallback = NULL;
   18606               1 :   psProgressInfo->psPyCallbackData = NULL;
   18607               1 :   arg7 = psProgressInfo;
   18608               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:FillNodata",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   18609               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18610               1 :   if (!SWIG_IsOK(res1)) {
   18611               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FillNodata" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18612                 :   }
   18613               1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18614               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18615               1 :   if (!SWIG_IsOK(res2)) {
   18616               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FillNodata" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18617                 :   }
   18618               1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18619               1 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   18620               1 :   if (!SWIG_IsOK(ecode3)) {
   18621               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FillNodata" "', argument " "3"" of type '" "double""'");
   18622                 :   } 
   18623               1 :   arg3 = static_cast< double >(val3);
   18624               1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18625               1 :   if (!SWIG_IsOK(ecode4)) {
   18626               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FillNodata" "', argument " "4"" of type '" "int""'");
   18627                 :   } 
   18628               1 :   arg4 = static_cast< int >(val4);
   18629               1 :   if (obj4) {
   18630                 :     {
   18631                 :       /* %typemap(in) char **options */
   18632                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   18633               1 :       if ( ! PySequence_Check(obj4) || PyUnicode_Check(obj4)
   18634                 :   #if PY_VERSION_HEX < 0x03000000
   18635                 :         || PyString_Check(obj4)
   18636                 :   #endif
   18637                 :         ) {
   18638               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18639               0 :         SWIG_fail;
   18640                 :       }
   18641                 :       
   18642               1 :       int size = PySequence_Size(obj4);
   18643               1 :       for (int i = 0; i < size; i++) {
   18644               0 :         PyObject* pyObj = PySequence_GetItem(obj4,i);
   18645               0 :         if (PyUnicode_Check(pyObj))
   18646                 :         {
   18647                 :           char *pszStr;
   18648                 :           Py_ssize_t nLen;
   18649               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18650                 : #if PY_VERSION_HEX >= 0x03000000
   18651                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18652                 : #else
   18653               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18654                 : #endif
   18655               0 :           arg5 = CSLAddString( arg5, pszStr );
   18656               0 :           Py_XDECREF(pyUTF8Str);
   18657                 :         }
   18658                 : #if PY_VERSION_HEX >= 0x03000000
   18659                 :         else if (PyBytes_Check(pyObj))
   18660                 :         arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
   18661                 : #else
   18662               0 :         else if (PyString_Check(pyObj))
   18663               0 :         arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
   18664                 : #endif
   18665                 :         else
   18666                 :         {
   18667               0 :           Py_DECREF(pyObj);
   18668               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18669               0 :           SWIG_fail;
   18670                 :         }
   18671               0 :         Py_DECREF(pyObj);
   18672                 :       }
   18673                 :     }
   18674                 :   }
   18675               1 :   if (obj5) {
   18676                 :     {
   18677                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18678                 :       /* callback_func typemap */
   18679               1 :       if (obj5 && obj5 != Py_None ) {
   18680               1 :         void* cbfunction = NULL;
   18681                 :         SWIG_ConvertPtr( obj5, 
   18682                 :           (void**)&cbfunction,
   18683                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18684               1 :           SWIG_POINTER_EXCEPTION | 0 );
   18685                 :         
   18686               1 :         if ( cbfunction == GDALTermProgress ) {
   18687               1 :           arg6 = GDALTermProgress;
   18688                 :         } else {
   18689               0 :           if (!PyCallable_Check(obj5)) {
   18690                 :             PyErr_SetString( PyExc_RuntimeError, 
   18691               0 :               "Object given is not a Python function" );
   18692               0 :             SWIG_fail;
   18693                 :           }
   18694               0 :           psProgressInfo->psPyCallback = obj5;
   18695               0 :           arg6 = PyProgressProxy;
   18696                 :         }
   18697                 :         
   18698                 :       }
   18699                 :       
   18700                 :     }
   18701                 :   }
   18702               1 :   if (obj6) {
   18703                 :     {
   18704                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18705               0 :       psProgressInfo->psPyCallbackData = obj6 ;
   18706                 :     }
   18707                 :   }
   18708                 :   {
   18709               1 :     if (!arg1) {
   18710               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18711                 :     }
   18712                 :   }
   18713                 :   {
   18714               1 :     if ( bUseExceptions ) {
   18715               0 :       CPLErrorReset();
   18716                 :     }
   18717               1 :     result = (int)FillNodata(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   18718               1 :     if ( bUseExceptions ) {
   18719               0 :       CPLErr eclass = CPLGetLastErrorType();
   18720               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18721               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18722                 :       }
   18723                 :     }
   18724                 :   }
   18725               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18726                 :   {
   18727                 :     /* %typemap(freearg) char **options */
   18728               1 :     CSLDestroy( arg5 );
   18729                 :   }
   18730                 :   {
   18731                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18732                 :     
   18733               1 :     CPLFree(psProgressInfo);
   18734                 :     
   18735                 :   }
   18736               1 :   return resultobj;
   18737                 : fail:
   18738                 :   {
   18739                 :     /* %typemap(freearg) char **options */
   18740               0 :     CSLDestroy( arg5 );
   18741                 :   }
   18742                 :   {
   18743                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18744                 :     
   18745               0 :     CPLFree(psProgressInfo);
   18746                 :     
   18747                 :   }
   18748               0 :   return NULL;
   18749                 : }
   18750                 : 
   18751                 : 
   18752               6 : SWIGINTERN PyObject *_wrap_SieveFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18753               6 :   PyObject *resultobj = 0;
   18754               6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18755               6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   18756               6 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   18757                 :   int arg4 ;
   18758               6 :   int arg5 = (int) 4 ;
   18759               6 :   char **arg6 = (char **) NULL ;
   18760               6 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   18761               6 :   void *arg8 = (void *) NULL ;
   18762               6 :   void *argp1 = 0 ;
   18763               6 :   int res1 = 0 ;
   18764               6 :   void *argp2 = 0 ;
   18765               6 :   int res2 = 0 ;
   18766               6 :   void *argp3 = 0 ;
   18767               6 :   int res3 = 0 ;
   18768                 :   int val4 ;
   18769               6 :   int ecode4 = 0 ;
   18770                 :   int val5 ;
   18771               6 :   int ecode5 = 0 ;
   18772               6 :   PyObject * obj0 = 0 ;
   18773               6 :   PyObject * obj1 = 0 ;
   18774               6 :   PyObject * obj2 = 0 ;
   18775               6 :   PyObject * obj3 = 0 ;
   18776               6 :   PyObject * obj4 = 0 ;
   18777               6 :   PyObject * obj5 = 0 ;
   18778               6 :   PyObject * obj6 = 0 ;
   18779               6 :   PyObject * obj7 = 0 ;
   18780                 :   char *  kwnames[] = {
   18781                 :     (char *) "srcBand",(char *) "maskBand",(char *) "dstBand",(char *) "threshold",(char *) "connectedness",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18782               6 :   };
   18783                 :   int result;
   18784                 :   
   18785                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18786                 :   PyProgressData *psProgressInfo;
   18787               6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18788               6 :   psProgressInfo->nLastReported = -1;
   18789               6 :   psProgressInfo->psPyCallback = NULL;
   18790               6 :   psProgressInfo->psPyCallbackData = NULL;
   18791               6 :   arg8 = psProgressInfo;
   18792               6 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:SieveFilter",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   18793               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18794               6 :   if (!SWIG_IsOK(res1)) {
   18795               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SieveFilter" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18796                 :   }
   18797               6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18798               6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18799               6 :   if (!SWIG_IsOK(res2)) {
   18800               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SieveFilter" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18801                 :   }
   18802               6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18803               6 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18804               6 :   if (!SWIG_IsOK(res3)) {
   18805               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SieveFilter" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   18806                 :   }
   18807               6 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   18808               6 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18809               6 :   if (!SWIG_IsOK(ecode4)) {
   18810               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SieveFilter" "', argument " "4"" of type '" "int""'");
   18811                 :   } 
   18812               6 :   arg4 = static_cast< int >(val4);
   18813               6 :   if (obj4) {
   18814               6 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   18815               6 :     if (!SWIG_IsOK(ecode5)) {
   18816               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SieveFilter" "', argument " "5"" of type '" "int""'");
   18817                 :     } 
   18818               6 :     arg5 = static_cast< int >(val5);
   18819                 :   }
   18820               6 :   if (obj5) {
   18821                 :     {
   18822                 :       /* %typemap(in) char **options */
   18823                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   18824               0 :       if ( ! PySequence_Check(obj5) || PyUnicode_Check(obj5)
   18825                 :   #if PY_VERSION_HEX < 0x03000000
   18826                 :         || PyString_Check(obj5)
   18827                 :   #endif
   18828                 :         ) {
   18829               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18830               0 :         SWIG_fail;
   18831                 :       }
   18832                 :       
   18833               0 :       int size = PySequence_Size(obj5);
   18834               0 :       for (int i = 0; i < size; i++) {
   18835               0 :         PyObject* pyObj = PySequence_GetItem(obj5,i);
   18836               0 :         if (PyUnicode_Check(pyObj))
   18837                 :         {
   18838                 :           char *pszStr;
   18839                 :           Py_ssize_t nLen;
   18840               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18841                 : #if PY_VERSION_HEX >= 0x03000000
   18842                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18843                 : #else
   18844               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18845                 : #endif
   18846               0 :           arg6 = CSLAddString( arg6, pszStr );
   18847               0 :           Py_XDECREF(pyUTF8Str);
   18848                 :         }
   18849                 : #if PY_VERSION_HEX >= 0x03000000
   18850                 :         else if (PyBytes_Check(pyObj))
   18851                 :         arg6 = CSLAddString( arg6, PyBytes_AsString(pyObj) );
   18852                 : #else
   18853               0 :         else if (PyString_Check(pyObj))
   18854               0 :         arg6 = CSLAddString( arg6, PyString_AsString(pyObj) );
   18855                 : #endif
   18856                 :         else
   18857                 :         {
   18858               0 :           Py_DECREF(pyObj);
   18859               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18860               0 :           SWIG_fail;
   18861                 :         }
   18862               0 :         Py_DECREF(pyObj);
   18863                 :       }
   18864                 :     }
   18865                 :   }
   18866               6 :   if (obj6) {
   18867                 :     {
   18868                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18869                 :       /* callback_func typemap */
   18870               1 :       if (obj6 && obj6 != Py_None ) {
   18871               1 :         void* cbfunction = NULL;
   18872                 :         SWIG_ConvertPtr( obj6, 
   18873                 :           (void**)&cbfunction,
   18874                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18875               1 :           SWIG_POINTER_EXCEPTION | 0 );
   18876                 :         
   18877               1 :         if ( cbfunction == GDALTermProgress ) {
   18878               1 :           arg7 = GDALTermProgress;
   18879                 :         } else {
   18880               0 :           if (!PyCallable_Check(obj6)) {
   18881                 :             PyErr_SetString( PyExc_RuntimeError, 
   18882               0 :               "Object given is not a Python function" );
   18883               0 :             SWIG_fail;
   18884                 :           }
   18885               0 :           psProgressInfo->psPyCallback = obj6;
   18886               0 :           arg7 = PyProgressProxy;
   18887                 :         }
   18888                 :         
   18889                 :       }
   18890                 :       
   18891                 :     }
   18892                 :   }
   18893               6 :   if (obj7) {
   18894                 :     {
   18895                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18896               0 :       psProgressInfo->psPyCallbackData = obj7 ;
   18897                 :     }
   18898                 :   }
   18899                 :   {
   18900               6 :     if (!arg1) {
   18901               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18902                 :     }
   18903                 :   }
   18904                 :   {
   18905               6 :     if (!arg3) {
   18906               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18907                 :     }
   18908                 :   }
   18909                 :   {
   18910               6 :     if ( bUseExceptions ) {
   18911               0 :       CPLErrorReset();
   18912                 :     }
   18913               6 :     result = (int)SieveFilter(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   18914               6 :     if ( bUseExceptions ) {
   18915               0 :       CPLErr eclass = CPLGetLastErrorType();
   18916               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18917               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18918                 :       }
   18919                 :     }
   18920                 :   }
   18921               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18922                 :   {
   18923                 :     /* %typemap(freearg) char **options */
   18924               6 :     CSLDestroy( arg6 );
   18925                 :   }
   18926                 :   {
   18927                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18928                 :     
   18929               6 :     CPLFree(psProgressInfo);
   18930                 :     
   18931                 :   }
   18932               6 :   return resultobj;
   18933                 : fail:
   18934                 :   {
   18935                 :     /* %typemap(freearg) char **options */
   18936               0 :     CSLDestroy( arg6 );
   18937                 :   }
   18938                 :   {
   18939                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18940                 :     
   18941               0 :     CPLFree(psProgressInfo);
   18942                 :     
   18943                 :   }
   18944               0 :   return NULL;
   18945                 : }
   18946                 : 
   18947                 : 
   18948               2 : SWIGINTERN PyObject *_wrap_RegenerateOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18949               2 :   PyObject *resultobj = 0;
   18950               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18951                 :   int arg2 ;
   18952               2 :   GDALRasterBandShadow **arg3 = (GDALRasterBandShadow **) 0 ;
   18953               2 :   char *arg4 = (char *) "average" ;
   18954               2 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   18955               2 :   void *arg6 = (void *) NULL ;
   18956               2 :   void *argp1 = 0 ;
   18957               2 :   int res1 = 0 ;
   18958                 :   int res4 ;
   18959               2 :   char *buf4 = 0 ;
   18960               2 :   int alloc4 = 0 ;
   18961               2 :   PyObject * obj0 = 0 ;
   18962               2 :   PyObject * obj1 = 0 ;
   18963               2 :   PyObject * obj2 = 0 ;
   18964               2 :   PyObject * obj3 = 0 ;
   18965               2 :   PyObject * obj4 = 0 ;
   18966                 :   char *  kwnames[] = {
   18967                 :     (char *) "srcBand",(char *) "overviewBandCount",(char *) "resampling",(char *) "callback",(char *) "callback_data", NULL 
   18968               2 :   };
   18969                 :   int result;
   18970                 :   
   18971                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18972                 :   PyProgressData *psProgressInfo;
   18973               2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18974               2 :   psProgressInfo->nLastReported = -1;
   18975               2 :   psProgressInfo->psPyCallback = NULL;
   18976               2 :   psProgressInfo->psPyCallbackData = NULL;
   18977               2 :   arg6 = psProgressInfo;
   18978               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:RegenerateOverviews",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   18979               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18980               2 :   if (!SWIG_IsOK(res1)) {
   18981               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18982                 :   }
   18983               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18984                 :   {
   18985                 :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   18986               2 :     if ( !PySequence_Check(obj1) ) {
   18987               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   18988               0 :       SWIG_fail;
   18989                 :     }
   18990               2 :     arg2 = PySequence_Size(obj1);
   18991               2 :     arg3 = (GDALRasterBandShadow**) CPLMalloc(arg2*sizeof(GDALRasterBandShadow*));
   18992                 :     
   18993               6 :     for( int i = 0; i<arg2; i++ ) {
   18994               4 :       PyObject *o = PySequence_GetItem(obj1,i);
   18995                 : #if 0x010340 <= 0x010337
   18996                 :       PySwigObject *sobj = SWIG_Python_GetSwigThis(o);
   18997                 : #else
   18998               4 :       SwigPyObject *sobj = SWIG_Python_GetSwigThis(o);
   18999                 : #endif
   19000               4 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   19001               4 :       if (!sobj) {
   19002               0 :         Py_DECREF(o);
   19003                 :         SWIG_fail;
   19004                 :       }
   19005               4 :       rawobjectpointer = (GDALRasterBandShadow*) sobj->ptr;
   19006               4 :       arg3[i] = rawobjectpointer;
   19007               4 :       Py_DECREF(o);
   19008                 :       
   19009                 :     }
   19010                 :   }
   19011               2 :   if (obj2) {
   19012               2 :     res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
   19013               2 :     if (!SWIG_IsOK(res4)) {
   19014               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RegenerateOverviews" "', argument " "4"" of type '" "char const *""'");
   19015                 :     }
   19016               2 :     arg4 = reinterpret_cast< char * >(buf4);
   19017                 :   }
   19018               2 :   if (obj3) {
   19019                 :     {
   19020                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   19021                 :       /* callback_func typemap */
   19022               0 :       if (obj3 && obj3 != Py_None ) {
   19023               0 :         void* cbfunction = NULL;
   19024                 :         SWIG_ConvertPtr( obj3, 
   19025                 :           (void**)&cbfunction,
   19026                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   19027               0 :           SWIG_POINTER_EXCEPTION | 0 );
   19028                 :         
   19029               0 :         if ( cbfunction == GDALTermProgress ) {
   19030               0 :           arg5 = GDALTermProgress;
   19031                 :         } else {
   19032               0 :           if (!PyCallable_Check(obj3)) {
   19033                 :             PyErr_SetString( PyExc_RuntimeError, 
   19034               0 :               "Object given is not a Python function" );
   19035               0 :             SWIG_fail;
   19036                 :           }
   19037               0 :           psProgressInfo->psPyCallback = obj3;
   19038               0 :           arg5 = PyProgressProxy;
   19039                 :         }
   19040                 :         
   19041                 :       }
   19042                 :       
   19043                 :     }
   19044                 :   }
   19045               2 :   if (obj4) {
   19046                 :     {
   19047                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   19048               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   19049                 :     }
   19050                 :   }
   19051                 :   {
   19052               2 :     if (!arg1) {
   19053               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19054                 :     }
   19055                 :   }
   19056                 :   {
   19057               2 :     if ( bUseExceptions ) {
   19058               0 :       CPLErrorReset();
   19059                 :     }
   19060               2 :     result = (int)RegenerateOverviews(arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
   19061               2 :     if ( bUseExceptions ) {
   19062               0 :       CPLErr eclass = CPLGetLastErrorType();
   19063               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19064               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19065                 :       }
   19066                 :     }
   19067                 :   }
   19068               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19069                 :   {
   19070                 :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   19071               2 :     CPLFree( arg3 );
   19072                 :   }
   19073               2 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   19074                 :   {
   19075                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19076                 :     
   19077               2 :     CPLFree(psProgressInfo);
   19078                 :     
   19079                 :   }
   19080               2 :   return resultobj;
   19081                 : fail:
   19082                 :   {
   19083                 :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   19084               0 :     CPLFree( arg3 );
   19085                 :   }
   19086               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   19087                 :   {
   19088                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19089                 :     
   19090               0 :     CPLFree(psProgressInfo);
   19091                 :     
   19092                 :   }
   19093               0 :   return NULL;
   19094                 : }
   19095                 : 
   19096                 : 
   19097               2 : SWIGINTERN PyObject *_wrap_RegenerateOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   19098               2 :   PyObject *resultobj = 0;
   19099               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   19100               2 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   19101               2 :   char *arg3 = (char *) "average" ;
   19102               2 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   19103               2 :   void *arg5 = (void *) NULL ;
   19104               2 :   void *argp1 = 0 ;
   19105               2 :   int res1 = 0 ;
   19106               2 :   void *argp2 = 0 ;
   19107               2 :   int res2 = 0 ;
   19108                 :   int res3 ;
   19109               2 :   char *buf3 = 0 ;
   19110               2 :   int alloc3 = 0 ;
   19111               2 :   PyObject * obj0 = 0 ;
   19112               2 :   PyObject * obj1 = 0 ;
   19113               2 :   PyObject * obj2 = 0 ;
   19114               2 :   PyObject * obj3 = 0 ;
   19115               2 :   PyObject * obj4 = 0 ;
   19116                 :   char *  kwnames[] = {
   19117                 :     (char *) "srcBand",(char *) "overviewBand",(char *) "resampling",(char *) "callback",(char *) "callback_data", NULL 
   19118               2 :   };
   19119                 :   int result;
   19120                 :   
   19121                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   19122                 :   PyProgressData *psProgressInfo;
   19123               2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   19124               2 :   psProgressInfo->nLastReported = -1;
   19125               2 :   psProgressInfo->psPyCallback = NULL;
   19126               2 :   psProgressInfo->psPyCallbackData = NULL;
   19127               2 :   arg5 = psProgressInfo;
   19128               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:RegenerateOverview",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   19129               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   19130               2 :   if (!SWIG_IsOK(res1)) {
   19131               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   19132                 :   }
   19133               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   19134               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   19135               2 :   if (!SWIG_IsOK(res2)) {
   19136               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RegenerateOverview" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   19137                 :   }
   19138               2 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   19139               2 :   if (obj2) {
   19140               2 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   19141               2 :     if (!SWIG_IsOK(res3)) {
   19142               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RegenerateOverview" "', argument " "3"" of type '" "char const *""'");
   19143                 :     }
   19144               2 :     arg3 = reinterpret_cast< char * >(buf3);
   19145                 :   }
   19146               2 :   if (obj3) {
   19147                 :     {
   19148                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   19149                 :       /* callback_func typemap */
   19150               0 :       if (obj3 && obj3 != Py_None ) {
   19151               0 :         void* cbfunction = NULL;
   19152                 :         SWIG_ConvertPtr( obj3, 
   19153                 :           (void**)&cbfunction,
   19154                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   19155               0 :           SWIG_POINTER_EXCEPTION | 0 );
   19156                 :         
   19157               0 :         if ( cbfunction == GDALTermProgress ) {
   19158               0 :           arg4 = GDALTermProgress;
   19159                 :         } else {
   19160               0 :           if (!PyCallable_Check(obj3)) {
   19161                 :             PyErr_SetString( PyExc_RuntimeError, 
   19162               0 :               "Object given is not a Python function" );
   19163               0 :             SWIG_fail;
   19164                 :           }
   19165               0 :           psProgressInfo->psPyCallback = obj3;
   19166               0 :           arg4 = PyProgressProxy;
   19167                 :         }
   19168                 :         
   19169                 :       }
   19170                 :       
   19171                 :     }
   19172                 :   }
   19173               2 :   if (obj4) {
   19174                 :     {
   19175                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   19176               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   19177                 :     }
   19178                 :   }
   19179                 :   {
   19180               2 :     if (!arg1) {
   19181               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19182                 :     }
   19183                 :   }
   19184                 :   {
   19185               2 :     if (!arg2) {
   19186               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19187                 :     }
   19188                 :   }
   19189                 :   {
   19190               2 :     if ( bUseExceptions ) {
   19191               0 :       CPLErrorReset();
   19192                 :     }
   19193               2 :     result = (int)RegenerateOverview(arg1,arg2,(char const *)arg3,arg4,arg5);
   19194               2 :     if ( bUseExceptions ) {
   19195               0 :       CPLErr eclass = CPLGetLastErrorType();
   19196               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19197               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19198                 :       }
   19199                 :     }
   19200                 :   }
   19201               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19202               2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   19203                 :   {
   19204                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19205                 :     
   19206               2 :     CPLFree(psProgressInfo);
   19207                 :     
   19208                 :   }
   19209               2 :   return resultobj;
   19210                 : fail:
   19211               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   19212                 :   {
   19213                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19214                 :     
   19215               0 :     CPLFree(psProgressInfo);
   19216                 :     
   19217                 :   }
   19218               0 :   return NULL;
   19219                 : }
   19220                 : 
   19221                 : 
   19222               2 : SWIGINTERN PyObject *_wrap_ContourGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   19223               2 :   PyObject *resultobj = 0;
   19224               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   19225                 :   double arg2 ;
   19226                 :   double arg3 ;
   19227                 :   int arg4 ;
   19228               2 :   double *arg5 = (double *) 0 ;
   19229                 :   int arg6 ;
   19230                 :   double arg7 ;
   19231               2 :   OGRLayerShadow *arg8 = (OGRLayerShadow *) 0 ;
   19232                 :   int arg9 ;
   19233                 :   int arg10 ;
   19234               2 :   GDALProgressFunc arg11 = (GDALProgressFunc) NULL ;
   19235               2 :   void *arg12 = (void *) NULL ;
   19236               2 :   void *argp1 = 0 ;
   19237               2 :   int res1 = 0 ;
   19238                 :   double val2 ;
   19239               2 :   int ecode2 = 0 ;
   19240                 :   double val3 ;
   19241               2 :   int ecode3 = 0 ;
   19242                 :   int val6 ;
   19243               2 :   int ecode6 = 0 ;
   19244                 :   double val7 ;
   19245               2 :   int ecode7 = 0 ;
   19246               2 :   void *argp8 = 0 ;
   19247               2 :   int res8 = 0 ;
   19248                 :   int val9 ;
   19249               2 :   int ecode9 = 0 ;
   19250                 :   int val10 ;
   19251               2 :   int ecode10 = 0 ;
   19252               2 :   PyObject * obj0 = 0 ;
   19253               2 :   PyObject * obj1 = 0 ;
   19254               2 :   PyObject * obj2 = 0 ;
   19255               2 :   PyObject * obj3 = 0 ;
   19256               2 :   PyObject * obj4 = 0 ;
   19257               2 :   PyObject * obj5 = 0 ;
   19258               2 :   PyObject * obj6 = 0 ;
   19259               2 :   PyObject * obj7 = 0 ;
   19260               2 :   PyObject * obj8 = 0 ;
   19261               2 :   PyObject * obj9 = 0 ;
   19262               2 :   PyObject * obj10 = 0 ;
   19263                 :   char *  kwnames[] = {
   19264                 :     (char *) "srcBand",(char *) "contourInterval",(char *) "contourBase",(char *) "fixedLevelCount",(char *) "useNoData",(char *) "noDataValue",(char *) "dstLayer",(char *) "idField",(char *) "elevField",(char *) "callback",(char *) "callback_data", NULL 
   19265               2 :   };
   19266                 :   int result;
   19267                 :   
   19268                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   19269                 :   PyProgressData *psProgressInfo;
   19270               2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   19271               2 :   psProgressInfo->nLastReported = -1;
   19272               2 :   psProgressInfo->psPyCallback = NULL;
   19273               2 :   psProgressInfo->psPyCallbackData = NULL;
   19274               2 :   arg12 = psProgressInfo;
   19275               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOO|OO:ContourGenerate",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
   19276               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   19277               2 :   if (!SWIG_IsOK(res1)) {
   19278               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   19279                 :   }
   19280               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   19281               2 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   19282               2 :   if (!SWIG_IsOK(ecode2)) {
   19283               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContourGenerate" "', argument " "2"" of type '" "double""'");
   19284                 :   } 
   19285               2 :   arg2 = static_cast< double >(val2);
   19286               2 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   19287               2 :   if (!SWIG_IsOK(ecode3)) {
   19288               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContourGenerate" "', argument " "3"" of type '" "double""'");
   19289                 :   } 
   19290               2 :   arg3 = static_cast< double >(val3);
   19291                 :   {
   19292                 :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   19293                 :     /* check if is List */
   19294               2 :     if ( !PySequence_Check(obj3) ) {
   19295               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19296               0 :       SWIG_fail;
   19297                 :     }
   19298               2 :     arg4 = PySequence_Size(obj3);
   19299               2 :     arg5 = (double*) malloc(arg4*sizeof(double));
   19300               5 :     for( int i = 0; i<arg4; i++ ) {
   19301               3 :       PyObject *o = PySequence_GetItem(obj3,i);
   19302               3 :       if ( !PyArg_Parse(o,"d",&arg5[i]) ) {
   19303               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   19304               0 :         Py_DECREF(o);
   19305                 :         SWIG_fail;
   19306                 :       }
   19307               3 :       Py_DECREF(o);
   19308                 :     }
   19309                 :   }
   19310               2 :   ecode6 = SWIG_AsVal_int(obj4, &val6);
   19311               2 :   if (!SWIG_IsOK(ecode6)) {
   19312               0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ContourGenerate" "', argument " "6"" of type '" "int""'");
   19313                 :   } 
   19314               2 :   arg6 = static_cast< int >(val6);
   19315               2 :   ecode7 = SWIG_AsVal_double(obj5, &val7);
   19316               2 :   if (!SWIG_IsOK(ecode7)) {
   19317               0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ContourGenerate" "', argument " "7"" of type '" "double""'");
   19318                 :   } 
   19319               2 :   arg7 = static_cast< double >(val7);
   19320               2 :   res8 = SWIG_ConvertPtr(obj6, &argp8,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   19321               2 :   if (!SWIG_IsOK(res8)) {
   19322               0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "ContourGenerate" "', argument " "8"" of type '" "OGRLayerShadow *""'"); 
   19323                 :   }
   19324               2 :   arg8 = reinterpret_cast< OGRLayerShadow * >(argp8);
   19325               2 :   ecode9 = SWIG_AsVal_int(obj7, &val9);
   19326               2 :   if (!SWIG_IsOK(ecode9)) {
   19327               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ContourGenerate" "', argument " "9"" of type '" "int""'");
   19328                 :   } 
   19329               2 :   arg9 = static_cast< int >(val9);
   19330               2 :   ecode10 = SWIG_AsVal_int(obj8, &val10);
   19331               2 :   if (!SWIG_IsOK(ecode10)) {
   19332               0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ContourGenerate" "', argument " "10"" of type '" "int""'");
   19333                 :   } 
   19334               2 :   arg10 = static_cast< int >(val10);
   19335               2 :   if (obj9) {
   19336                 :     {
   19337                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   19338                 :       /* callback_func typemap */
   19339               0 :       if (obj9 && obj9 != Py_None ) {
   19340               0 :         void* cbfunction = NULL;
   19341                 :         SWIG_ConvertPtr( obj9, 
   19342                 :           (void**)&cbfunction,
   19343                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   19344               0 :           SWIG_POINTER_EXCEPTION | 0 );
   19345                 :         
   19346               0 :         if ( cbfunction == GDALTermProgress ) {
   19347               0 :           arg11 = GDALTermProgress;
   19348                 :         } else {
   19349               0 :           if (!PyCallable_Check(obj9)) {
   19350                 :             PyErr_SetString( PyExc_RuntimeError, 
   19351               0 :               "Object given is not a Python function" );
   19352               0 :             SWIG_fail;
   19353                 :           }
   19354               0 :           psProgressInfo->psPyCallback = obj9;
   19355               0 :           arg11 = PyProgressProxy;
   19356                 :         }
   19357                 :         
   19358                 :       }
   19359                 :       
   19360                 :     }
   19361                 :   }
   19362               2 :   if (obj10) {
   19363                 :     {
   19364                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   19365               0 :       psProgressInfo->psPyCallbackData = obj10 ;
   19366                 :     }
   19367                 :   }
   19368                 :   {
   19369               2 :     if (!arg1) {
   19370               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19371                 :     }
   19372                 :   }
   19373                 :   {
   19374               2 :     if (!arg8) {
   19375               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19376                 :     }
   19377                 :   }
   19378                 :   {
   19379               2 :     if ( bUseExceptions ) {
   19380               0 :       CPLErrorReset();
   19381                 :     }
   19382               2 :     result = (int)ContourGenerate(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   19383               2 :     if ( bUseExceptions ) {
   19384               0 :       CPLErr eclass = CPLGetLastErrorType();
   19385               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19386               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19387                 :       }
   19388                 :     }
   19389                 :   }
   19390               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19391                 :   {
   19392                 :     /* %typemap(freearg) (int nList, double* pList) */
   19393               2 :     if (arg5) {
   19394               2 :       free((void*) arg5);
   19395                 :     }
   19396                 :   }
   19397                 :   {
   19398                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19399                 :     
   19400               2 :     CPLFree(psProgressInfo);
   19401                 :     
   19402                 :   }
   19403               2 :   return resultobj;
   19404                 : fail:
   19405                 :   {
   19406                 :     /* %typemap(freearg) (int nList, double* pList) */
   19407               0 :     if (arg5) {
   19408               0 :       free((void*) arg5);
   19409                 :     }
   19410                 :   }
   19411                 :   {
   19412                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19413                 :     
   19414               0 :     CPLFree(psProgressInfo);
   19415                 :     
   19416                 :   }
   19417               0 :   return NULL;
   19418                 : }
   19419                 : 
   19420                 : 
   19421              14 : SWIGINTERN PyObject *_wrap_AutoCreateWarpedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19422              14 :   PyObject *resultobj = 0;
   19423              14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   19424              14 :   char *arg2 = (char *) 0 ;
   19425              14 :   char *arg3 = (char *) 0 ;
   19426              14 :   GDALResampleAlg arg4 = (GDALResampleAlg) GRA_NearestNeighbour ;
   19427              14 :   double arg5 = (double) 0.0 ;
   19428              14 :   void *argp1 = 0 ;
   19429              14 :   int res1 = 0 ;
   19430                 :   int res2 ;
   19431              14 :   char *buf2 = 0 ;
   19432              14 :   int alloc2 = 0 ;
   19433                 :   int res3 ;
   19434              14 :   char *buf3 = 0 ;
   19435              14 :   int alloc3 = 0 ;
   19436                 :   int val4 ;
   19437              14 :   int ecode4 = 0 ;
   19438                 :   double val5 ;
   19439              14 :   int ecode5 = 0 ;
   19440              14 :   PyObject * obj0 = 0 ;
   19441              14 :   PyObject * obj1 = 0 ;
   19442              14 :   PyObject * obj2 = 0 ;
   19443              14 :   PyObject * obj3 = 0 ;
   19444              14 :   PyObject * obj4 = 0 ;
   19445              14 :   GDALDatasetShadow *result = 0 ;
   19446                 :   
   19447              14 :   if (!PyArg_ParseTuple(args,(char *)"O|OOOO:AutoCreateWarpedVRT",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   19448              14 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19449              14 :   if (!SWIG_IsOK(res1)) {
   19450               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoCreateWarpedVRT" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   19451                 :   }
   19452              14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   19453              14 :   if (obj1) {
   19454              13 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   19455              13 :     if (!SWIG_IsOK(res2)) {
   19456               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoCreateWarpedVRT" "', argument " "2"" of type '" "char const *""'");
   19457                 :     }
   19458              13 :     arg2 = reinterpret_cast< char * >(buf2);
   19459                 :   }
   19460              14 :   if (obj2) {
   19461              13 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   19462              13 :     if (!SWIG_IsOK(res3)) {
   19463               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoCreateWarpedVRT" "', argument " "3"" of type '" "char const *""'");
   19464                 :     }
   19465              13 :     arg3 = reinterpret_cast< char * >(buf3);
   19466                 :   }
   19467              14 :   if (obj3) {
   19468              13 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   19469              13 :     if (!SWIG_IsOK(ecode4)) {
   19470               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AutoCreateWarpedVRT" "', argument " "4"" of type '" "GDALResampleAlg""'");
   19471                 :     } 
   19472              13 :     arg4 = static_cast< GDALResampleAlg >(val4);
   19473                 :   }
   19474              14 :   if (obj4) {
   19475              13 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
   19476              13 :     if (!SWIG_IsOK(ecode5)) {
   19477               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AutoCreateWarpedVRT" "', argument " "5"" of type '" "double""'");
   19478                 :     } 
   19479              13 :     arg5 = static_cast< double >(val5);
   19480                 :   }
   19481                 :   {
   19482              14 :     if (!arg1) {
   19483               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19484                 :     }
   19485                 :   }
   19486                 :   {
   19487              14 :     if ( bUseExceptions ) {
   19488               0 :       CPLErrorReset();
   19489                 :     }
   19490              14 :     result = (GDALDatasetShadow *)AutoCreateWarpedVRT(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
   19491              14 :     if ( bUseExceptions ) {
   19492               0 :       CPLErr eclass = CPLGetLastErrorType();
   19493               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19494               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19495                 :       }
   19496                 :     }
   19497                 :   }
   19498              14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   19499              14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19500              14 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   19501              14 :   return resultobj;
   19502                 : fail:
   19503               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19504               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   19505               0 :   return NULL;
   19506                 : }
   19507                 : 
   19508                 : 
   19509               9 : SWIGINTERN PyObject *_wrap_new_Transformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19510               9 :   PyObject *resultobj = 0;
   19511               9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   19512               9 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   19513               9 :   char **arg3 = (char **) 0 ;
   19514               9 :   void *argp1 = 0 ;
   19515               9 :   int res1 = 0 ;
   19516               9 :   void *argp2 = 0 ;
   19517               9 :   int res2 = 0 ;
   19518               9 :   PyObject * obj0 = 0 ;
   19519               9 :   PyObject * obj1 = 0 ;
   19520               9 :   PyObject * obj2 = 0 ;
   19521               9 :   GDALTransformerInfoShadow *result = 0 ;
   19522                 :   
   19523               9 :   if (!PyArg_ParseTuple(args,(char *)"OOO:new_Transformer",&obj0,&obj1,&obj2)) SWIG_fail;
   19524               9 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19525               9 :   if (!SWIG_IsOK(res1)) {
   19526               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Transformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   19527                 :   }
   19528               9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   19529               9 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19530               9 :   if (!SWIG_IsOK(res2)) {
   19531               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Transformer" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   19532                 :   }
   19533               9 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   19534                 :   {
   19535                 :     /* %typemap(in) char **options */
   19536                 :     /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   19537               9 :     if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
   19538                 :   #if PY_VERSION_HEX < 0x03000000
   19539                 :       || PyString_Check(obj2)
   19540                 :   #endif
   19541                 :       ) {
   19542               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   19543               0 :       SWIG_fail;
   19544                 :     }
   19545                 :     
   19546               9 :     int size = PySequence_Size(obj2);
   19547              20 :     for (int i = 0; i < size; i++) {
   19548              11 :       PyObject* pyObj = PySequence_GetItem(obj2,i);
   19549              11 :       if (PyUnicode_Check(pyObj))
   19550                 :       {
   19551                 :         char *pszStr;
   19552                 :         Py_ssize_t nLen;
   19553               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   19554                 : #if PY_VERSION_HEX >= 0x03000000
   19555                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   19556                 : #else
   19557               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   19558                 : #endif
   19559               0 :         arg3 = CSLAddString( arg3, pszStr );
   19560               0 :         Py_XDECREF(pyUTF8Str);
   19561                 :       }
   19562                 : #if PY_VERSION_HEX >= 0x03000000
   19563                 :       else if (PyBytes_Check(pyObj))
   19564                 :       arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
   19565                 : #else
   19566              11 :       else if (PyString_Check(pyObj))
   19567              11 :       arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
   19568                 : #endif
   19569                 :       else
   19570                 :       {
   19571               0 :         Py_DECREF(pyObj);
   19572               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   19573               0 :         SWIG_fail;
   19574                 :       }
   19575              11 :       Py_DECREF(pyObj);
   19576                 :     }
   19577                 :   }
   19578                 :   {
   19579               9 :     if ( bUseExceptions ) {
   19580               0 :       CPLErrorReset();
   19581                 :     }
   19582               9 :     result = (GDALTransformerInfoShadow *)new_GDALTransformerInfoShadow(arg1,arg2,arg3);
   19583               9 :     if ( bUseExceptions ) {
   19584               0 :       CPLErr eclass = CPLGetLastErrorType();
   19585               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19586               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19587                 :       }
   19588                 :     }
   19589                 :   }
   19590               9 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_NEW |  0 );
   19591                 :   {
   19592                 :     /* %typemap(freearg) char **options */
   19593               9 :     CSLDestroy( arg3 );
   19594                 :   }
   19595               9 :   return resultobj;
   19596                 : fail:
   19597                 :   {
   19598                 :     /* %typemap(freearg) char **options */
   19599               0 :     CSLDestroy( arg3 );
   19600                 :   }
   19601               0 :   return NULL;
   19602                 : }
   19603                 : 
   19604                 : 
   19605               9 : SWIGINTERN PyObject *_wrap_delete_Transformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19606               9 :   PyObject *resultobj = 0;
   19607               9 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19608               9 :   void *argp1 = 0 ;
   19609               9 :   int res1 = 0 ;
   19610               9 :   PyObject * obj0 = 0 ;
   19611                 :   
   19612               9 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_Transformer",&obj0)) SWIG_fail;
   19613               9 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_DISOWN |  0 );
   19614               9 :   if (!SWIG_IsOK(res1)) {
   19615               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Transformer" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   19616                 :   }
   19617               9 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   19618                 :   {
   19619               9 :     if ( bUseExceptions ) {
   19620               0 :       CPLErrorReset();
   19621                 :     }
   19622                 :     delete_GDALTransformerInfoShadow(arg1);
   19623               9 :     if ( bUseExceptions ) {
   19624               0 :       CPLErr eclass = CPLGetLastErrorType();
   19625               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19626               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19627                 :       }
   19628                 :     }
   19629                 :   }
   19630               9 :   resultobj = SWIG_Py_Void();
   19631               9 :   return resultobj;
   19632                 : fail:
   19633               0 :   return NULL;
   19634                 : }
   19635                 : 
   19636                 : 
   19637               0 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19638               0 :   PyObject *resultobj = 0;
   19639               0 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19640                 :   int arg2 ;
   19641                 :   double *arg3 ;
   19642               0 :   void *argp1 = 0 ;
   19643               0 :   int res1 = 0 ;
   19644                 :   int val2 ;
   19645               0 :   int ecode2 = 0 ;
   19646                 :   double argin3[3] ;
   19647               0 :   PyObject * obj0 = 0 ;
   19648               0 :   PyObject * obj1 = 0 ;
   19649               0 :   PyObject * obj2 = 0 ;
   19650                 :   int result;
   19651                 :   
   19652               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Transformer_TransformPoint",&obj0,&obj1,&obj2)) SWIG_fail;
   19653               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   19654               0 :   if (!SWIG_IsOK(res1)) {
   19655               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   19656                 :   }
   19657               0 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   19658               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   19659               0 :   if (!SWIG_IsOK(ecode2)) {
   19660               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Transformer_TransformPoint" "', argument " "2"" of type '" "int""'");
   19661                 :   } 
   19662               0 :   arg2 = static_cast< int >(val2);
   19663                 :   {
   19664                 :     /* %typemap(in) (double argin3[ANY]) */
   19665               0 :     arg3 = argin3;
   19666               0 :     if (! PySequence_Check(obj2) ) {
   19667               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19668               0 :       SWIG_fail;
   19669                 :     }
   19670               0 :     int seq_size = PySequence_Size(obj2);
   19671               0 :     if ( seq_size != 3 ) {
   19672               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   19673               0 :       SWIG_fail;
   19674                 :     }
   19675               0 :     for (unsigned int i=0; i<3; i++) {
   19676               0 :       PyObject *o = PySequence_GetItem(obj2,i);
   19677                 :       double val;
   19678               0 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   19679               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   19680               0 :         Py_DECREF(o);
   19681                 :         SWIG_fail;
   19682                 :       }
   19683               0 :       arg3[i] =  val;
   19684               0 :       Py_DECREF(o);
   19685                 :     }
   19686                 :   }
   19687                 :   {
   19688               0 :     if ( bUseExceptions ) {
   19689               0 :       CPLErrorReset();
   19690                 :     }
   19691               0 :     result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_0(arg1,arg2,arg3);
   19692               0 :     if ( bUseExceptions ) {
   19693               0 :       CPLErr eclass = CPLGetLastErrorType();
   19694               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19695               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19696                 :       }
   19697                 :     }
   19698                 :   }
   19699               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19700                 :   {
   19701                 :     /* %typemap(argout) (double argout[ANY]) */
   19702               0 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
   19703               0 :     resultobj = t_output_helper(resultobj,out);
   19704                 :   }
   19705               0 :   return resultobj;
   19706                 : fail:
   19707               0 :   return NULL;
   19708                 : }
   19709                 : 
   19710                 : 
   19711              16 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19712              16 :   PyObject *resultobj = 0;
   19713              16 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19714                 :   double *arg2 ;
   19715                 :   int arg3 ;
   19716                 :   double arg4 ;
   19717                 :   double arg5 ;
   19718              16 :   double arg6 = (double) 0.0 ;
   19719              16 :   void *argp1 = 0 ;
   19720              16 :   int res1 = 0 ;
   19721                 :   double argout2[3] ;
   19722                 :   int val3 ;
   19723              16 :   int ecode3 = 0 ;
   19724                 :   double val4 ;
   19725              16 :   int ecode4 = 0 ;
   19726                 :   double val5 ;
   19727              16 :   int ecode5 = 0 ;
   19728                 :   double val6 ;
   19729              16 :   int ecode6 = 0 ;
   19730              16 :   PyObject * obj0 = 0 ;
   19731              16 :   PyObject * obj1 = 0 ;
   19732              16 :   PyObject * obj2 = 0 ;
   19733              16 :   PyObject * obj3 = 0 ;
   19734              16 :   PyObject * obj4 = 0 ;
   19735                 :   int result;
   19736                 :   
   19737                 :   {
   19738                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   19739              16 :     arg2 = argout2;
   19740                 :   }
   19741              16 :   if (!PyArg_ParseTuple(args,(char *)"OOOO|O:Transformer_TransformPoint",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   19742              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   19743              16 :   if (!SWIG_IsOK(res1)) {
   19744               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   19745                 :   }
   19746              16 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   19747              16 :   ecode3 = SWIG_AsVal_int(obj1, &val3);
   19748              16 :   if (!SWIG_IsOK(ecode3)) {
   19749               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Transformer_TransformPoint" "', argument " "3"" of type '" "int""'");
   19750                 :   } 
   19751              16 :   arg3 = static_cast< int >(val3);
   19752              16 :   ecode4 = SWIG_AsVal_double(obj2, &val4);
   19753              16 :   if (!SWIG_IsOK(ecode4)) {
   19754               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Transformer_TransformPoint" "', argument " "4"" of type '" "double""'");
   19755                 :   } 
   19756              16 :   arg4 = static_cast< double >(val4);
   19757              16 :   ecode5 = SWIG_AsVal_double(obj3, &val5);
   19758              16 :   if (!SWIG_IsOK(ecode5)) {
   19759               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Transformer_TransformPoint" "', argument " "5"" of type '" "double""'");
   19760                 :   } 
   19761              16 :   arg5 = static_cast< double >(val5);
   19762              16 :   if (obj4) {
   19763              10 :     ecode6 = SWIG_AsVal_double(obj4, &val6);
   19764              10 :     if (!SWIG_IsOK(ecode6)) {
   19765               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Transformer_TransformPoint" "', argument " "6"" of type '" "double""'");
   19766                 :     } 
   19767              10 :     arg6 = static_cast< double >(val6);
   19768                 :   }
   19769                 :   {
   19770              16 :     if ( bUseExceptions ) {
   19771               0 :       CPLErrorReset();
   19772                 :     }
   19773              16 :     result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
   19774              16 :     if ( bUseExceptions ) {
   19775               0 :       CPLErr eclass = CPLGetLastErrorType();
   19776               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19777               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19778                 :       }
   19779                 :     }
   19780                 :   }
   19781              16 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19782                 :   {
   19783                 :     /* %typemap(argout) (double argout[ANY]) */
   19784              16 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
   19785              16 :     resultobj = t_output_helper(resultobj,out);
   19786                 :   }
   19787              16 :   return resultobj;
   19788                 : fail:
   19789               0 :   return NULL;
   19790                 : }
   19791                 : 
   19792                 : 
   19793              16 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoint(PyObject *self, PyObject *args) {
   19794                 :   int argc;
   19795                 :   PyObject *argv[6];
   19796                 :   int ii;
   19797                 :   
   19798              16 :   if (!PyTuple_Check(args)) SWIG_fail;
   19799              16 :   argc = (int)PyObject_Length(args);
   19800              90 :   for (ii = 0; (ii < argc) && (ii < 5); ii++) {
   19801              74 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
   19802                 :   }
   19803              16 :   if (argc == 3) {
   19804                 :     int _v;
   19805               0 :     void *vptr = 0;
   19806               0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   19807               0 :     _v = SWIG_CheckState(res);
   19808               0 :     if (_v) {
   19809                 :       {
   19810               0 :         int res = SWIG_AsVal_int(argv[1], NULL);
   19811               0 :         _v = SWIG_CheckState(res);
   19812                 :       }
   19813               0 :       if (_v) {
   19814               0 :         void *vptr = 0;
   19815               0 :         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
   19816               0 :         _v = SWIG_CheckState(res);
   19817               0 :         if (_v) {
   19818               0 :           return _wrap_Transformer_TransformPoint__SWIG_0(self, args);
   19819                 :         }
   19820                 :       }
   19821                 :     }
   19822                 :   }
   19823              16 :   if ((argc >= 4) && (argc <= 5)) {
   19824                 :     int _v;
   19825              16 :     void *vptr = 0;
   19826              16 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   19827              16 :     _v = SWIG_CheckState(res);
   19828              16 :     if (_v) {
   19829                 :       {
   19830              16 :         int res = SWIG_AsVal_int(argv[1], NULL);
   19831              16 :         _v = SWIG_CheckState(res);
   19832                 :       }
   19833              16 :       if (_v) {
   19834                 :         {
   19835              16 :           int res = SWIG_AsVal_double(argv[2], NULL);
   19836              16 :           _v = SWIG_CheckState(res);
   19837                 :         }
   19838              16 :         if (_v) {
   19839                 :           {
   19840              16 :             int res = SWIG_AsVal_double(argv[3], NULL);
   19841              16 :             _v = SWIG_CheckState(res);
   19842                 :           }
   19843              16 :           if (_v) {
   19844              16 :             if (argc <= 4) {
   19845               6 :               return _wrap_Transformer_TransformPoint__SWIG_1(self, args);
   19846                 :             }
   19847                 :             {
   19848              10 :               int res = SWIG_AsVal_double(argv[4], NULL);
   19849              10 :               _v = SWIG_CheckState(res);
   19850                 :             }
   19851              10 :             if (_v) {
   19852              10 :               return _wrap_Transformer_TransformPoint__SWIG_1(self, args);
   19853                 :             }
   19854                 :           }
   19855                 :         }
   19856                 :       }
   19857                 :     }
   19858                 :   }
   19859                 :   
   19860                 : fail:
   19861                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Transformer_TransformPoint'.\n"
   19862                 :     "  Possible C/C++ prototypes are:\n"
   19863                 :     "    TransformPoint(GDALTransformerInfoShadow *,int,double [3])\n"
   19864               0 :     "    TransformPoint(GDALTransformerInfoShadow *,double [3],int,double,double,double)\n");
   19865               0 :   return NULL;
   19866                 : }
   19867                 : 
   19868                 : 
   19869               1 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19870               1 :   PyObject *resultobj = 0;
   19871               1 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19872                 :   int arg2 ;
   19873                 :   int arg3 ;
   19874               1 :   double *arg4 = (double *) 0 ;
   19875               1 :   double *arg5 = (double *) 0 ;
   19876               1 :   double *arg6 = (double *) 0 ;
   19877               1 :   int *arg7 = (int *) 0 ;
   19878               1 :   void *argp1 = 0 ;
   19879               1 :   int res1 = 0 ;
   19880                 :   int val2 ;
   19881               1 :   int ecode2 = 0 ;
   19882               1 :   PyObject * obj0 = 0 ;
   19883               1 :   PyObject * obj1 = 0 ;
   19884               1 :   PyObject * obj2 = 0 ;
   19885                 :   int result;
   19886                 :   
   19887               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Transformer_TransformPoints",&obj0,&obj1,&obj2)) SWIG_fail;
   19888               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   19889               1 :   if (!SWIG_IsOK(res1)) {
   19890               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer_TransformPoints" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   19891                 :   }
   19892               1 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   19893               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   19894               1 :   if (!SWIG_IsOK(ecode2)) {
   19895               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Transformer_TransformPoints" "', argument " "2"" of type '" "int""'");
   19896                 :   } 
   19897               1 :   arg2 = static_cast< int >(val2);
   19898                 :   {
   19899                 :     /*  typemap(in,numinputs=1) (int nCount, double *x, double *y, double *z, int* panSuccess) */
   19900               1 :     if ( !PySequence_Check(obj2) ) {
   19901               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19902               0 :       SWIG_fail;
   19903                 :     }
   19904                 :     
   19905               1 :     arg3 = PySequence_Size(obj2);
   19906               1 :     arg4 = (double*) VSIMalloc(arg3*sizeof(double));
   19907               1 :     arg5 = (double*) VSIMalloc(arg3*sizeof(double));
   19908               1 :     arg6 = (double*) VSIMalloc(arg3*sizeof(double));
   19909               1 :     arg7 = (int*) VSIMalloc(arg3*sizeof(int));
   19910                 :     
   19911               1 :     if (arg4 == NULL || arg5 == NULL || arg6 == NULL || arg7 == NULL)
   19912                 :     {
   19913               0 :       PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
   19914               0 :       SWIG_fail;
   19915                 :     }
   19916                 :     
   19917               1 :     if (!DecomposeSequenceOfCoordinates(obj2,arg3,arg4,arg5,arg6)) {
   19918                 :       SWIG_fail;
   19919                 :     }
   19920                 :   }
   19921                 :   {
   19922               1 :     if ( bUseExceptions ) {
   19923               0 :       CPLErrorReset();
   19924                 :     }
   19925               1 :     result = (int)GDALTransformerInfoShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   19926               1 :     if ( bUseExceptions ) {
   19927               0 :       CPLErr eclass = CPLGetLastErrorType();
   19928               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19929               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19930                 :       }
   19931                 :     }
   19932                 :   }
   19933               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19934                 :   {
   19935                 :     /* %typemap(argout)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   19936               1 :     Py_DECREF(resultobj);
   19937               1 :     PyObject *xyz = PyList_New( arg3 );
   19938               1 :     PyObject *success = PyList_New( arg3 );
   19939               2 :     for( int i=0; i< arg3; i++ ) {
   19940               1 :       PyObject *tuple = PyTuple_New( 3 );
   19941               1 :       PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg4)[i] ) );
   19942               1 :       PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg5)[i] ) );
   19943               1 :       PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg6)[i] ) );
   19944               1 :       PyList_SetItem( xyz, i, tuple );
   19945               1 :       PyList_SetItem( success, i, Py_BuildValue( "i",  (arg7)[i]) );
   19946                 :     }
   19947               1 :     resultobj = PyTuple_New( 2 );
   19948               1 :     PyTuple_SetItem( resultobj, 0, xyz );
   19949               1 :     PyTuple_SetItem( resultobj, 1, success );
   19950                 :   }
   19951                 :   {
   19952                 :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   19953               1 :     VSIFree(arg4);
   19954               1 :     VSIFree(arg5);
   19955               1 :     VSIFree(arg6);
   19956               1 :     VSIFree(arg7);
   19957                 :   }
   19958               1 :   return resultobj;
   19959                 : fail:
   19960                 :   {
   19961                 :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   19962               0 :     VSIFree(arg4);
   19963               0 :     VSIFree(arg5);
   19964               0 :     VSIFree(arg6);
   19965               0 :     VSIFree(arg7);
   19966                 :   }
   19967               0 :   return NULL;
   19968                 : }
   19969                 : 
   19970                 : 
   19971               1 : SWIGINTERN PyObject *_wrap_Transformer_TransformGeolocations(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   19972               1 :   PyObject *resultobj = 0;
   19973               1 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19974               1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   19975               1 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   19976               1 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   19977               1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   19978               1 :   void *arg6 = (void *) NULL ;
   19979               1 :   char **arg7 = (char **) NULL ;
   19980               1 :   void *argp1 = 0 ;
   19981               1 :   int res1 = 0 ;
   19982               1 :   void *argp2 = 0 ;
   19983               1 :   int res2 = 0 ;
   19984               1 :   void *argp3 = 0 ;
   19985               1 :   int res3 = 0 ;
   19986               1 :   void *argp4 = 0 ;
   19987               1 :   int res4 = 0 ;
   19988               1 :   PyObject * obj0 = 0 ;
   19989               1 :   PyObject * obj1 = 0 ;
   19990               1 :   PyObject * obj2 = 0 ;
   19991               1 :   PyObject * obj3 = 0 ;
   19992               1 :   PyObject * obj4 = 0 ;
   19993               1 :   PyObject * obj5 = 0 ;
   19994               1 :   PyObject * obj6 = 0 ;
   19995                 :   char *  kwnames[] = {
   19996                 :     (char *) "self",(char *) "xBand",(char *) "yBand",(char *) "zBand",(char *) "callback",(char *) "callback_data",(char *) "options", NULL 
   19997               1 :   };
   19998                 :   int result;
   19999                 :   
   20000                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   20001                 :   PyProgressData *psProgressInfo;
   20002               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   20003               1 :   psProgressInfo->nLastReported = -1;
   20004               1 :   psProgressInfo->psPyCallback = NULL;
   20005               1 :   psProgressInfo->psPyCallbackData = NULL;
   20006               1 :   arg6 = psProgressInfo;
   20007               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:Transformer_TransformGeolocations",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   20008               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   20009               1 :   if (!SWIG_IsOK(res1)) {
   20010               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer_TransformGeolocations" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   20011                 :   }
   20012               1 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   20013               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   20014               1 :   if (!SWIG_IsOK(res2)) {
   20015               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Transformer_TransformGeolocations" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   20016                 :   }
   20017               1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   20018               1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   20019               1 :   if (!SWIG_IsOK(res3)) {
   20020               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Transformer_TransformGeolocations" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   20021                 :   }
   20022               1 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   20023               1 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   20024               1 :   if (!SWIG_IsOK(res4)) {
   20025               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Transformer_TransformGeolocations" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   20026                 :   }
   20027               1 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   20028               1 :   if (obj4) {
   20029                 :     {
   20030                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   20031                 :       /* callback_func typemap */
   20032               0 :       if (obj4 && obj4 != Py_None ) {
   20033               0 :         void* cbfunction = NULL;
   20034                 :         SWIG_ConvertPtr( obj4, 
   20035                 :           (void**)&cbfunction,
   20036                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   20037               0 :           SWIG_POINTER_EXCEPTION | 0 );
   20038                 :         
   20039               0 :         if ( cbfunction == GDALTermProgress ) {
   20040               0 :           arg5 = GDALTermProgress;
   20041                 :         } else {
   20042               0 :           if (!PyCallable_Check(obj4)) {
   20043                 :             PyErr_SetString( PyExc_RuntimeError, 
   20044               0 :               "Object given is not a Python function" );
   20045               0 :             SWIG_fail;
   20046                 :           }
   20047               0 :           psProgressInfo->psPyCallback = obj4;
   20048               0 :           arg5 = PyProgressProxy;
   20049                 :         }
   20050                 :         
   20051                 :       }
   20052                 :       
   20053                 :     }
   20054                 :   }
   20055               1 :   if (obj5) {
   20056                 :     {
   20057                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   20058               0 :       psProgressInfo->psPyCallbackData = obj5 ;
   20059                 :     }
   20060                 :   }
   20061               1 :   if (obj6) {
   20062                 :     {
   20063                 :       /* %typemap(in) char **options */
   20064                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   20065               0 :       if ( ! PySequence_Check(obj6) || PyUnicode_Check(obj6)
   20066                 :   #if PY_VERSION_HEX < 0x03000000
   20067                 :         || PyString_Check(obj6)
   20068                 :   #endif
   20069                 :         ) {
   20070               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   20071               0 :         SWIG_fail;
   20072                 :       }
   20073                 :       
   20074               0 :       int size = PySequence_Size(obj6);
   20075               0 :       for (int i = 0; i < size; i++) {
   20076               0 :         PyObject* pyObj = PySequence_GetItem(obj6,i);
   20077               0 :         if (PyUnicode_Check(pyObj))
   20078                 :         {
   20079                 :           char *pszStr;
   20080                 :           Py_ssize_t nLen;
   20081               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   20082                 : #if PY_VERSION_HEX >= 0x03000000
   20083                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   20084                 : #else
   20085               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   20086                 : #endif
   20087               0 :           arg7 = CSLAddString( arg7, pszStr );
   20088               0 :           Py_XDECREF(pyUTF8Str);
   20089                 :         }
   20090                 : #if PY_VERSION_HEX >= 0x03000000
   20091                 :         else if (PyBytes_Check(pyObj))
   20092                 :         arg7 = CSLAddString( arg7, PyBytes_AsString(pyObj) );
   20093                 : #else
   20094               0 :         else if (PyString_Check(pyObj))
   20095               0 :         arg7 = CSLAddString( arg7, PyString_AsString(pyObj) );
   20096                 : #endif
   20097                 :         else
   20098                 :         {
   20099               0 :           Py_DECREF(pyObj);
   20100               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   20101               0 :           SWIG_fail;
   20102                 :         }
   20103               0 :         Py_DECREF(pyObj);
   20104                 :       }
   20105                 :     }
   20106                 :   }
   20107                 :   {
   20108               1 :     if (!arg2) {
   20109               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20110                 :     }
   20111                 :   }
   20112                 :   {
   20113               1 :     if (!arg3) {
   20114               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20115                 :     }
   20116                 :   }
   20117                 :   {
   20118               1 :     if (!arg4) {
   20119               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20120                 :     }
   20121                 :   }
   20122                 :   {
   20123               1 :     if ( bUseExceptions ) {
   20124               0 :       CPLErrorReset();
   20125                 :     }
   20126               1 :     result = (int)GDALTransformerInfoShadow_TransformGeolocations(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   20127               1 :     if ( bUseExceptions ) {
   20128               0 :       CPLErr eclass = CPLGetLastErrorType();
   20129               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20130               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20131                 :       }
   20132                 :     }
   20133                 :   }
   20134               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20135                 :   {
   20136                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   20137                 :     
   20138               1 :     CPLFree(psProgressInfo);
   20139                 :     
   20140                 :   }
   20141                 :   {
   20142                 :     /* %typemap(freearg) char **options */
   20143               1 :     CSLDestroy( arg7 );
   20144                 :   }
   20145               1 :   return resultobj;
   20146                 : fail:
   20147                 :   {
   20148                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   20149                 :     
   20150               0 :     CPLFree(psProgressInfo);
   20151                 :     
   20152                 :   }
   20153                 :   {
   20154                 :     /* %typemap(freearg) char **options */
   20155               0 :     CSLDestroy( arg7 );
   20156                 :   }
   20157               0 :   return NULL;
   20158                 : }
   20159                 : 
   20160                 : 
   20161               6 : SWIGINTERN PyObject *Transformer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20162                 :   PyObject *obj;
   20163               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   20164               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_NewClientData(obj));
   20165               6 :   return SWIG_Py_Void();
   20166                 : }
   20167                 : 
   20168               1 : SWIGINTERN PyObject *_wrap_ApplyGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20169               1 :   PyObject *resultobj = 0;
   20170                 :   double *arg1 ;
   20171                 :   double arg2 ;
   20172                 :   double arg3 ;
   20173               1 :   double *arg4 = (double *) 0 ;
   20174               1 :   double *arg5 = (double *) 0 ;
   20175                 :   double argin1[6] ;
   20176                 :   double val2 ;
   20177               1 :   int ecode2 = 0 ;
   20178                 :   double val3 ;
   20179               1 :   int ecode3 = 0 ;
   20180                 :   double temp4 ;
   20181               1 :   int res4 = SWIG_TMPOBJ ;
   20182                 :   double temp5 ;
   20183               1 :   int res5 = SWIG_TMPOBJ ;
   20184               1 :   PyObject * obj0 = 0 ;
   20185               1 :   PyObject * obj1 = 0 ;
   20186               1 :   PyObject * obj2 = 0 ;
   20187                 :   
   20188               1 :   arg4 = &temp4;
   20189               1 :   arg5 = &temp5;
   20190               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:ApplyGeoTransform",&obj0,&obj1,&obj2)) SWIG_fail;
   20191                 :   {
   20192                 :     /* %typemap(in) (double argin1[ANY]) */
   20193               1 :     arg1 = argin1;
   20194               1 :     if (! PySequence_Check(obj0) ) {
   20195               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   20196               0 :       SWIG_fail;
   20197                 :     }
   20198               1 :     int seq_size = PySequence_Size(obj0);
   20199               1 :     if ( seq_size != 6 ) {
   20200               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   20201               0 :       SWIG_fail;
   20202                 :     }
   20203               7 :     for (unsigned int i=0; i<6; i++) {
   20204               6 :       PyObject *o = PySequence_GetItem(obj0,i);
   20205                 :       double val;
   20206               6 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   20207               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   20208               0 :         Py_DECREF(o);
   20209                 :         SWIG_fail;
   20210                 :       }
   20211               6 :       arg1[i] =  val;
   20212               6 :       Py_DECREF(o);
   20213                 :     }
   20214                 :   }
   20215               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   20216               1 :   if (!SWIG_IsOK(ecode2)) {
   20217               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyGeoTransform" "', argument " "2"" of type '" "double""'");
   20218                 :   } 
   20219               1 :   arg2 = static_cast< double >(val2);
   20220               1 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   20221               1 :   if (!SWIG_IsOK(ecode3)) {
   20222               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyGeoTransform" "', argument " "3"" of type '" "double""'");
   20223                 :   } 
   20224               1 :   arg3 = static_cast< double >(val3);
   20225                 :   {
   20226               1 :     if ( bUseExceptions ) {
   20227               0 :       CPLErrorReset();
   20228                 :     }
   20229               1 :     GDALApplyGeoTransform(arg1,arg2,arg3,arg4,arg5);
   20230               1 :     if ( bUseExceptions ) {
   20231               0 :       CPLErr eclass = CPLGetLastErrorType();
   20232               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20233               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20234                 :       }
   20235                 :     }
   20236                 :   }
   20237               1 :   resultobj = SWIG_Py_Void();
   20238               2 :   if (SWIG_IsTmpObj(res4)) {
   20239               1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   20240                 :   } else {
   20241               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   20242               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   20243                 :   }
   20244               2 :   if (SWIG_IsTmpObj(res5)) {
   20245               1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   20246                 :   } else {
   20247               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   20248               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   20249                 :   }
   20250               1 :   return resultobj;
   20251                 : fail:
   20252               0 :   return NULL;
   20253                 : }
   20254                 : 
   20255                 : 
   20256               1 : SWIGINTERN PyObject *_wrap_InvGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20257               1 :   PyObject *resultobj = 0;
   20258                 :   double *arg1 ;
   20259                 :   double *arg2 ;
   20260                 :   double argin1[6] ;
   20261                 :   double argout2[6] ;
   20262               1 :   PyObject * obj0 = 0 ;
   20263                 :   int result;
   20264                 :   
   20265                 :   {
   20266                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   20267               1 :     arg2 = argout2;
   20268                 :   }
   20269               1 :   if (!PyArg_ParseTuple(args,(char *)"O:InvGeoTransform",&obj0)) SWIG_fail;
   20270                 :   {
   20271                 :     /* %typemap(in) (double argin1[ANY]) */
   20272               1 :     arg1 = argin1;
   20273               1 :     if (! PySequence_Check(obj0) ) {
   20274               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   20275               0 :       SWIG_fail;
   20276                 :     }
   20277               1 :     int seq_size = PySequence_Size(obj0);
   20278               1 :     if ( seq_size != 6 ) {
   20279               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   20280               0 :       SWIG_fail;
   20281                 :     }
   20282               7 :     for (unsigned int i=0; i<6; i++) {
   20283               6 :       PyObject *o = PySequence_GetItem(obj0,i);
   20284                 :       double val;
   20285               6 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   20286               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   20287               0 :         Py_DECREF(o);
   20288                 :         SWIG_fail;
   20289                 :       }
   20290               6 :       arg1[i] =  val;
   20291               6 :       Py_DECREF(o);
   20292                 :     }
   20293                 :   }
   20294                 :   {
   20295               1 :     if ( bUseExceptions ) {
   20296               0 :       CPLErrorReset();
   20297                 :     }
   20298               1 :     result = (int)GDALInvGeoTransform(arg1,arg2);
   20299               1 :     if ( bUseExceptions ) {
   20300               0 :       CPLErr eclass = CPLGetLastErrorType();
   20301               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20302               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20303                 :       }
   20304                 :     }
   20305                 :   }
   20306               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20307                 :   {
   20308                 :     /* %typemap(argout) (double argout[ANY]) */
   20309               1 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   20310               1 :     resultobj = t_output_helper(resultobj,out);
   20311                 :   }
   20312               1 :   return resultobj;
   20313                 : fail:
   20314               0 :   return NULL;
   20315                 : }
   20316                 : 
   20317                 : 
   20318            2088 : SWIGINTERN PyObject *_wrap_VersionInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20319            2088 :   PyObject *resultobj = 0;
   20320            2088 :   char *arg1 = (char *) "VERSION_NUM" ;
   20321                 :   int res1 ;
   20322            2088 :   char *buf1 = 0 ;
   20323            2088 :   int alloc1 = 0 ;
   20324            2088 :   PyObject * obj0 = 0 ;
   20325            2088 :   char *result = 0 ;
   20326                 :   
   20327            2088 :   if (!PyArg_ParseTuple(args,(char *)"|O:VersionInfo",&obj0)) SWIG_fail;
   20328            2088 :   if (obj0) {
   20329            2088 :     res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   20330            2088 :     if (!SWIG_IsOK(res1)) {
   20331               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VersionInfo" "', argument " "1"" of type '" "char const *""'");
   20332                 :     }
   20333            2088 :     arg1 = reinterpret_cast< char * >(buf1);
   20334                 :   }
   20335                 :   {
   20336            2088 :     if ( bUseExceptions ) {
   20337               0 :       CPLErrorReset();
   20338                 :     }
   20339            2088 :     result = (char *)GDALVersionInfo((char const *)arg1);
   20340            2088 :     if ( bUseExceptions ) {
   20341               0 :       CPLErr eclass = CPLGetLastErrorType();
   20342               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20343               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20344                 :       }
   20345                 :     }
   20346                 :   }
   20347            2088 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20348            2088 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20349            2088 :   return resultobj;
   20350                 : fail:
   20351               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20352               0 :   return NULL;
   20353                 : }
   20354                 : 
   20355                 : 
   20356              20 : SWIGINTERN PyObject *_wrap_AllRegister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20357              20 :   PyObject *resultobj = 0;
   20358                 :   
   20359              20 :   if (!PyArg_ParseTuple(args,(char *)":AllRegister")) SWIG_fail;
   20360                 :   {
   20361              20 :     if ( bUseExceptions ) {
   20362               0 :       CPLErrorReset();
   20363                 :     }
   20364              20 :     GDALAllRegister();
   20365              20 :     if ( bUseExceptions ) {
   20366               0 :       CPLErr eclass = CPLGetLastErrorType();
   20367               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20368               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20369                 :       }
   20370                 :     }
   20371                 :   }
   20372              20 :   resultobj = SWIG_Py_Void();
   20373              20 :   return resultobj;
   20374                 : fail:
   20375               0 :   return NULL;
   20376                 : }
   20377                 : 
   20378                 : 
   20379               0 : SWIGINTERN PyObject *_wrap_GDALDestroyDriverManager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20380               0 :   PyObject *resultobj = 0;
   20381                 :   
   20382               0 :   if (!PyArg_ParseTuple(args,(char *)":GDALDestroyDriverManager")) SWIG_fail;
   20383                 :   {
   20384               0 :     if ( bUseExceptions ) {
   20385               0 :       CPLErrorReset();
   20386                 :     }
   20387               0 :     GDALDestroyDriverManager();
   20388               0 :     if ( bUseExceptions ) {
   20389               0 :       CPLErr eclass = CPLGetLastErrorType();
   20390               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20391               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20392                 :       }
   20393                 :     }
   20394                 :   }
   20395               0 :   resultobj = SWIG_Py_Void();
   20396               0 :   return resultobj;
   20397                 : fail:
   20398               0 :   return NULL;
   20399                 : }
   20400                 : 
   20401                 : 
   20402              10 : SWIGINTERN PyObject *_wrap_GetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20403              10 :   PyObject *resultobj = 0;
   20404                 :   GIntBig result;
   20405                 :   
   20406              10 :   if (!PyArg_ParseTuple(args,(char *)":GetCacheMax")) SWIG_fail;
   20407                 :   {
   20408              10 :     if ( bUseExceptions ) {
   20409               1 :       CPLErrorReset();
   20410                 :     }
   20411              10 :     result = wrapper_GDALGetCacheMax();
   20412              10 :     if ( bUseExceptions ) {
   20413               1 :       CPLErr eclass = CPLGetLastErrorType();
   20414               1 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20415               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20416                 :       }
   20417                 :     }
   20418                 :   }
   20419                 :   {
   20420                 :     char szTmp[32];
   20421                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
   20422                 : #if PY_VERSION_HEX>=0x03000000
   20423                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
   20424                 : #else
   20425              10 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
   20426                 : #endif
   20427                 :   }
   20428              10 :   return resultobj;
   20429                 : fail:
   20430               0 :   return NULL;
   20431                 : }
   20432                 : 
   20433                 : 
   20434               2 : SWIGINTERN PyObject *_wrap_GetCacheUsed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20435               2 :   PyObject *resultobj = 0;
   20436                 :   GIntBig result;
   20437                 :   
   20438               2 :   if (!PyArg_ParseTuple(args,(char *)":GetCacheUsed")) SWIG_fail;
   20439                 :   {
   20440               2 :     if ( bUseExceptions ) {
   20441               0 :       CPLErrorReset();
   20442                 :     }
   20443               2 :     result = wrapper_GDALGetCacheUsed();
   20444               2 :     if ( bUseExceptions ) {
   20445               0 :       CPLErr eclass = CPLGetLastErrorType();
   20446               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20447               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20448                 :       }
   20449                 :     }
   20450                 :   }
   20451                 :   {
   20452                 :     char szTmp[32];
   20453                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
   20454                 : #if PY_VERSION_HEX>=0x03000000
   20455                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
   20456                 : #else
   20457               2 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
   20458                 : #endif
   20459                 :   }
   20460               2 :   return resultobj;
   20461                 : fail:
   20462               0 :   return NULL;
   20463                 : }
   20464                 : 
   20465                 : 
   20466              12 : SWIGINTERN PyObject *_wrap_SetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20467              12 :   PyObject *resultobj = 0;
   20468                 :   GIntBig arg1 ;
   20469              12 :   PyObject * obj0 = 0 ;
   20470                 :   
   20471              12 :   if (!PyArg_ParseTuple(args,(char *)"O:SetCacheMax",&obj0)) SWIG_fail;
   20472                 :   {
   20473                 :     PY_LONG_LONG val;
   20474              12 :     if ( !PyArg_Parse(obj0,"L",&val) ) {
   20475               0 :       PyErr_SetString(PyExc_TypeError, "not an integer");
   20476               0 :       SWIG_fail;
   20477                 :     }
   20478              12 :     arg1 = (GIntBig)val;
   20479                 :   }
   20480                 :   {
   20481              12 :     if ( bUseExceptions ) {
   20482               0 :       CPLErrorReset();
   20483                 :     }
   20484              12 :     wrapper_GDALSetCacheMax(arg1);
   20485              12 :     if ( bUseExceptions ) {
   20486               0 :       CPLErr eclass = CPLGetLastErrorType();
   20487               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20488               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20489                 :       }
   20490                 :     }
   20491                 :   }
   20492              12 :   resultobj = SWIG_Py_Void();
   20493              12 :   return resultobj;
   20494                 : fail:
   20495               0 :   return NULL;
   20496                 : }
   20497                 : 
   20498                 : 
   20499              22 : SWIGINTERN PyObject *_wrap_GetDataTypeSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20500              22 :   PyObject *resultobj = 0;
   20501                 :   GDALDataType arg1 ;
   20502                 :   int val1 ;
   20503              22 :   int ecode1 = 0 ;
   20504              22 :   PyObject * obj0 = 0 ;
   20505                 :   int result;
   20506                 :   
   20507              22 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDataTypeSize",&obj0)) SWIG_fail;
   20508              22 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20509              22 :   if (!SWIG_IsOK(ecode1)) {
   20510               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDataTypeSize" "', argument " "1"" of type '" "GDALDataType""'");
   20511                 :   } 
   20512              22 :   arg1 = static_cast< GDALDataType >(val1);
   20513                 :   {
   20514              22 :     if ( bUseExceptions ) {
   20515               0 :       CPLErrorReset();
   20516                 :     }
   20517              22 :     result = (int)GDALGetDataTypeSize(arg1);
   20518              22 :     if ( bUseExceptions ) {
   20519               0 :       CPLErr eclass = CPLGetLastErrorType();
   20520               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20521               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20522                 :       }
   20523                 :     }
   20524                 :   }
   20525              22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20526              22 :   return resultobj;
   20527                 : fail:
   20528               0 :   return NULL;
   20529                 : }
   20530                 : 
   20531                 : 
   20532              22 : SWIGINTERN PyObject *_wrap_DataTypeIsComplex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20533              22 :   PyObject *resultobj = 0;
   20534                 :   GDALDataType arg1 ;
   20535                 :   int val1 ;
   20536              22 :   int ecode1 = 0 ;
   20537              22 :   PyObject * obj0 = 0 ;
   20538                 :   int result;
   20539                 :   
   20540              22 :   if (!PyArg_ParseTuple(args,(char *)"O:DataTypeIsComplex",&obj0)) SWIG_fail;
   20541              22 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20542              22 :   if (!SWIG_IsOK(ecode1)) {
   20543               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DataTypeIsComplex" "', argument " "1"" of type '" "GDALDataType""'");
   20544                 :   } 
   20545              22 :   arg1 = static_cast< GDALDataType >(val1);
   20546                 :   {
   20547              22 :     if ( bUseExceptions ) {
   20548               0 :       CPLErrorReset();
   20549                 :     }
   20550              22 :     result = (int)GDALDataTypeIsComplex(arg1);
   20551              22 :     if ( bUseExceptions ) {
   20552               0 :       CPLErr eclass = CPLGetLastErrorType();
   20553               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20554               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20555                 :       }
   20556                 :     }
   20557                 :   }
   20558              22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20559              22 :   return resultobj;
   20560                 : fail:
   20561               0 :   return NULL;
   20562                 : }
   20563                 : 
   20564                 : 
   20565            4680 : SWIGINTERN PyObject *_wrap_GetDataTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20566            4680 :   PyObject *resultobj = 0;
   20567                 :   GDALDataType arg1 ;
   20568                 :   int val1 ;
   20569            4680 :   int ecode1 = 0 ;
   20570            4680 :   PyObject * obj0 = 0 ;
   20571            4680 :   char *result = 0 ;
   20572                 :   
   20573            4680 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDataTypeName",&obj0)) SWIG_fail;
   20574            4680 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20575            4680 :   if (!SWIG_IsOK(ecode1)) {
   20576               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDataTypeName" "', argument " "1"" of type '" "GDALDataType""'");
   20577                 :   } 
   20578            4680 :   arg1 = static_cast< GDALDataType >(val1);
   20579                 :   {
   20580            4680 :     if ( bUseExceptions ) {
   20581               0 :       CPLErrorReset();
   20582                 :     }
   20583            4680 :     result = (char *)GDALGetDataTypeName(arg1);
   20584            4680 :     if ( bUseExceptions ) {
   20585               0 :       CPLErr eclass = CPLGetLastErrorType();
   20586               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20587               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20588                 :       }
   20589                 :     }
   20590                 :   }
   20591            4680 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20592            4680 :   return resultobj;
   20593                 : fail:
   20594               0 :   return NULL;
   20595                 : }
   20596                 : 
   20597                 : 
   20598               1 : SWIGINTERN PyObject *_wrap_GetDataTypeByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20599               1 :   PyObject *resultobj = 0;
   20600               1 :   char *arg1 = (char *) 0 ;
   20601                 :   int res1 ;
   20602               1 :   char *buf1 = 0 ;
   20603               1 :   int alloc1 = 0 ;
   20604               1 :   PyObject * obj0 = 0 ;
   20605                 :   GDALDataType result;
   20606                 :   
   20607               1 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDataTypeByName",&obj0)) SWIG_fail;
   20608               1 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   20609               1 :   if (!SWIG_IsOK(res1)) {
   20610               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDataTypeByName" "', argument " "1"" of type '" "char const *""'");
   20611                 :   }
   20612               1 :   arg1 = reinterpret_cast< char * >(buf1);
   20613                 :   {
   20614               1 :     if ( bUseExceptions ) {
   20615               0 :       CPLErrorReset();
   20616                 :     }
   20617               1 :     result = (GDALDataType)GDALGetDataTypeByName((char const *)arg1);
   20618               1 :     if ( bUseExceptions ) {
   20619               0 :       CPLErr eclass = CPLGetLastErrorType();
   20620               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20621               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20622                 :       }
   20623                 :     }
   20624                 :   }
   20625               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20626               1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20627               1 :   return resultobj;
   20628                 : fail:
   20629               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20630               0 :   return NULL;
   20631                 : }
   20632                 : 
   20633                 : 
   20634              17 : SWIGINTERN PyObject *_wrap_GetColorInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20635              17 :   PyObject *resultobj = 0;
   20636                 :   GDALColorInterp arg1 ;
   20637                 :   int val1 ;
   20638              17 :   int ecode1 = 0 ;
   20639              17 :   PyObject * obj0 = 0 ;
   20640              17 :   char *result = 0 ;
   20641                 :   
   20642              17 :   if (!PyArg_ParseTuple(args,(char *)"O:GetColorInterpretationName",&obj0)) SWIG_fail;
   20643              17 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20644              17 :   if (!SWIG_IsOK(ecode1)) {
   20645               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetColorInterpretationName" "', argument " "1"" of type '" "GDALColorInterp""'");
   20646                 :   } 
   20647              17 :   arg1 = static_cast< GDALColorInterp >(val1);
   20648                 :   {
   20649              17 :     if ( bUseExceptions ) {
   20650               0 :       CPLErrorReset();
   20651                 :     }
   20652              17 :     result = (char *)GDALGetColorInterpretationName(arg1);
   20653              17 :     if ( bUseExceptions ) {
   20654               0 :       CPLErr eclass = CPLGetLastErrorType();
   20655               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20656               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20657                 :       }
   20658                 :     }
   20659                 :   }
   20660              17 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20661              17 :   return resultobj;
   20662                 : fail:
   20663               0 :   return NULL;
   20664                 : }
   20665                 : 
   20666                 : 
   20667               2 : SWIGINTERN PyObject *_wrap_GetPaletteInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20668               2 :   PyObject *resultobj = 0;
   20669                 :   GDALPaletteInterp arg1 ;
   20670                 :   int val1 ;
   20671               2 :   int ecode1 = 0 ;
   20672               2 :   PyObject * obj0 = 0 ;
   20673               2 :   char *result = 0 ;
   20674                 :   
   20675               2 :   if (!PyArg_ParseTuple(args,(char *)"O:GetPaletteInterpretationName",&obj0)) SWIG_fail;
   20676               2 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20677               2 :   if (!SWIG_IsOK(ecode1)) {
   20678               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetPaletteInterpretationName" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   20679                 :   } 
   20680               2 :   arg1 = static_cast< GDALPaletteInterp >(val1);
   20681                 :   {
   20682               2 :     if ( bUseExceptions ) {
   20683               0 :       CPLErrorReset();
   20684                 :     }
   20685               2 :     result = (char *)GDALGetPaletteInterpretationName(arg1);
   20686               2 :     if ( bUseExceptions ) {
   20687               0 :       CPLErr eclass = CPLGetLastErrorType();
   20688               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20689               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20690                 :       }
   20691                 :     }
   20692                 :   }
   20693               2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20694               2 :   return resultobj;
   20695                 : fail:
   20696               0 :   return NULL;
   20697                 : }
   20698                 : 
   20699                 : 
   20700             130 : SWIGINTERN PyObject *_wrap_DecToDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20701             130 :   PyObject *resultobj = 0;
   20702                 :   double arg1 ;
   20703             130 :   char *arg2 = (char *) 0 ;
   20704             130 :   int arg3 = (int) 2 ;
   20705                 :   double val1 ;
   20706             130 :   int ecode1 = 0 ;
   20707                 :   int res2 ;
   20708             130 :   char *buf2 = 0 ;
   20709             130 :   int alloc2 = 0 ;
   20710                 :   int val3 ;
   20711             130 :   int ecode3 = 0 ;
   20712             130 :   PyObject * obj0 = 0 ;
   20713             130 :   PyObject * obj1 = 0 ;
   20714             130 :   PyObject * obj2 = 0 ;
   20715             130 :   char *result = 0 ;
   20716                 :   
   20717             130 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:DecToDMS",&obj0,&obj1,&obj2)) SWIG_fail;
   20718             130 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   20719             130 :   if (!SWIG_IsOK(ecode1)) {
   20720               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToDMS" "', argument " "1"" of type '" "double""'");
   20721                 :   } 
   20722             130 :   arg1 = static_cast< double >(val1);
   20723             130 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   20724             130 :   if (!SWIG_IsOK(res2)) {
   20725               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecToDMS" "', argument " "2"" of type '" "char const *""'");
   20726                 :   }
   20727             130 :   arg2 = reinterpret_cast< char * >(buf2);
   20728             130 :   if (obj2) {
   20729             130 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   20730             130 :     if (!SWIG_IsOK(ecode3)) {
   20731               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecToDMS" "', argument " "3"" of type '" "int""'");
   20732                 :     } 
   20733             130 :     arg3 = static_cast< int >(val3);
   20734                 :   }
   20735                 :   {
   20736             130 :     if ( bUseExceptions ) {
   20737               0 :       CPLErrorReset();
   20738                 :     }
   20739             130 :     result = (char *)GDALDecToDMS(arg1,(char const *)arg2,arg3);
   20740             130 :     if ( bUseExceptions ) {
   20741               0 :       CPLErr eclass = CPLGetLastErrorType();
   20742               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20743               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20744                 :       }
   20745                 :     }
   20746                 :   }
   20747             130 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20748             130 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20749             130 :   return resultobj;
   20750                 : fail:
   20751               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20752               0 :   return NULL;
   20753                 : }
   20754                 : 
   20755                 : 
   20756               4 : SWIGINTERN PyObject *_wrap_PackedDMSToDec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20757               4 :   PyObject *resultobj = 0;
   20758                 :   double arg1 ;
   20759                 :   double val1 ;
   20760               4 :   int ecode1 = 0 ;
   20761               4 :   PyObject * obj0 = 0 ;
   20762                 :   double result;
   20763                 :   
   20764               4 :   if (!PyArg_ParseTuple(args,(char *)"O:PackedDMSToDec",&obj0)) SWIG_fail;
   20765               4 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   20766               4 :   if (!SWIG_IsOK(ecode1)) {
   20767               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PackedDMSToDec" "', argument " "1"" of type '" "double""'");
   20768                 :   } 
   20769               4 :   arg1 = static_cast< double >(val1);
   20770                 :   {
   20771               4 :     if ( bUseExceptions ) {
   20772               0 :       CPLErrorReset();
   20773                 :     }
   20774               4 :     result = (double)GDALPackedDMSToDec(arg1);
   20775               4 :     if ( bUseExceptions ) {
   20776               0 :       CPLErr eclass = CPLGetLastErrorType();
   20777               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20778               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20779                 :       }
   20780                 :     }
   20781                 :   }
   20782               4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20783               4 :   return resultobj;
   20784                 : fail:
   20785               0 :   return NULL;
   20786                 : }
   20787                 : 
   20788                 : 
   20789               4 : SWIGINTERN PyObject *_wrap_DecToPackedDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20790               4 :   PyObject *resultobj = 0;
   20791                 :   double arg1 ;
   20792                 :   double val1 ;
   20793               4 :   int ecode1 = 0 ;
   20794               4 :   PyObject * obj0 = 0 ;
   20795                 :   double result;
   20796                 :   
   20797               4 :   if (!PyArg_ParseTuple(args,(char *)"O:DecToPackedDMS",&obj0)) SWIG_fail;
   20798               4 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   20799               4 :   if (!SWIG_IsOK(ecode1)) {
   20800               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToPackedDMS" "', argument " "1"" of type '" "double""'");
   20801                 :   } 
   20802               4 :   arg1 = static_cast< double >(val1);
   20803                 :   {
   20804               4 :     if ( bUseExceptions ) {
   20805               0 :       CPLErrorReset();
   20806                 :     }
   20807               4 :     result = (double)GDALDecToPackedDMS(arg1);
   20808               4 :     if ( bUseExceptions ) {
   20809               0 :       CPLErr eclass = CPLGetLastErrorType();
   20810               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20811               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20812                 :       }
   20813                 :     }
   20814                 :   }
   20815               4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20816               4 :   return resultobj;
   20817                 : fail:
   20818               0 :   return NULL;
   20819                 : }
   20820                 : 
   20821                 : 
   20822               6 : SWIGINTERN PyObject *_wrap_ParseXMLString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20823               6 :   PyObject *resultobj = 0;
   20824               6 :   char *arg1 = (char *) 0 ;
   20825                 :   int res1 ;
   20826               6 :   char *buf1 = 0 ;
   20827               6 :   int alloc1 = 0 ;
   20828               6 :   PyObject * obj0 = 0 ;
   20829               6 :   CPLXMLNode *result = 0 ;
   20830                 :   
   20831               6 :   if (!PyArg_ParseTuple(args,(char *)"O:ParseXMLString",&obj0)) SWIG_fail;
   20832               6 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   20833               6 :   if (!SWIG_IsOK(res1)) {
   20834               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseXMLString" "', argument " "1"" of type '" "char *""'");
   20835                 :   }
   20836               6 :   arg1 = reinterpret_cast< char * >(buf1);
   20837                 :   {
   20838               6 :     if ( bUseExceptions ) {
   20839               0 :       CPLErrorReset();
   20840                 :     }
   20841               6 :     result = (CPLXMLNode *)CPLParseXMLString(arg1);
   20842               6 :     if ( bUseExceptions ) {
   20843               0 :       CPLErr eclass = CPLGetLastErrorType();
   20844               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20845               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20846                 :       }
   20847                 :     }
   20848                 :   }
   20849                 :   {
   20850                 :     /* %typemap(out) (CPLXMLNode*) */
   20851                 :     
   20852               6 :     CPLXMLNode *psXMLTree = result;
   20853               6 :     int         bFakeRoot = FALSE;
   20854                 :     
   20855               6 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   20856                 :     {
   20857               2 :       CPLXMLNode *psFirst = psXMLTree;
   20858                 :       
   20859                 :       /* create a "pseudo" root if we have multiple elements */
   20860               2 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   20861               2 :       psXMLTree->psChild = psFirst;
   20862               2 :       bFakeRoot = TRUE;
   20863                 :     }
   20864                 :     
   20865               6 :     resultobj = XMLTreeToPyList( psXMLTree );
   20866                 :     
   20867               6 :     if( bFakeRoot )
   20868                 :     {
   20869               2 :       psXMLTree->psChild = NULL;
   20870               2 :       CPLDestroyXMLNode( psXMLTree );
   20871                 :     }
   20872                 :   }
   20873               6 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20874                 :   {
   20875                 :     /* %typemap(ret) (CPLXMLNode*) */
   20876               6 :     if ( result ) CPLDestroyXMLNode( result );
   20877                 :   }
   20878               6 :   return resultobj;
   20879                 : fail:
   20880               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20881               0 :   return NULL;
   20882                 : }
   20883                 : 
   20884                 : 
   20885               2 : SWIGINTERN PyObject *_wrap_SerializeXMLTree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20886               2 :   PyObject *resultobj = 0;
   20887               2 :   CPLXMLNode *arg1 = (CPLXMLNode *) 0 ;
   20888               2 :   PyObject * obj0 = 0 ;
   20889               2 :   retStringAndCPLFree *result = 0 ;
   20890                 :   
   20891               2 :   if (!PyArg_ParseTuple(args,(char *)"O:SerializeXMLTree",&obj0)) SWIG_fail;
   20892                 :   {
   20893                 :     /* %typemap(python,in) (CPLXMLNode* xmlnode ) */
   20894               2 :     arg1 = PyListToXMLTree( obj0 );
   20895               2 :     if ( !arg1 ) SWIG_fail;
   20896                 :   }
   20897                 :   {
   20898               2 :     if ( bUseExceptions ) {
   20899               0 :       CPLErrorReset();
   20900                 :     }
   20901               2 :     result = (retStringAndCPLFree *)CPLSerializeXMLTree(arg1);
   20902               2 :     if ( bUseExceptions ) {
   20903               0 :       CPLErr eclass = CPLGetLastErrorType();
   20904               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20905               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20906                 :       }
   20907                 :     }
   20908                 :   }
   20909                 :   {
   20910                 :     /* %typemap(out) (retStringAndCPLFree*) */
   20911               2 :     if(result)
   20912                 :     {
   20913               2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   20914               2 :       CPLFree(result);
   20915                 :     }
   20916                 :   }
   20917                 :   {
   20918                 :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   20919               2 :     if ( arg1 ) CPLDestroyXMLNode( arg1 );
   20920                 :   }
   20921               2 :   return resultobj;
   20922                 : fail:
   20923                 :   {
   20924                 :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   20925               0 :     if ( arg1 ) CPLDestroyXMLNode( arg1 );
   20926                 :   }
   20927               0 :   return NULL;
   20928                 : }
   20929                 : 
   20930                 : 
   20931              18 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20932              18 :   PyObject *resultobj = 0;
   20933                 :   int result;
   20934                 :   
   20935              18 :   if (!PyArg_ParseTuple(args,(char *)":GetDriverCount")) SWIG_fail;
   20936                 :   {
   20937              18 :     if ( bUseExceptions ) {
   20938               0 :       CPLErrorReset();
   20939                 :     }
   20940              18 :     result = (int)GetDriverCount();
   20941              18 :     if ( bUseExceptions ) {
   20942               0 :       CPLErr eclass = CPLGetLastErrorType();
   20943               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20944               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20945                 :       }
   20946                 :     }
   20947                 :   }
   20948              18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20949              18 :   return resultobj;
   20950                 : fail:
   20951               0 :   return NULL;
   20952                 : }
   20953                 : 
   20954                 : 
   20955            2156 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20956            2156 :   PyObject *resultobj = 0;
   20957            2156 :   char *arg1 = (char *) 0 ;
   20958                 :   int res1 ;
   20959            2156 :   char *buf1 = 0 ;
   20960            2156 :   int alloc1 = 0 ;
   20961            2156 :   PyObject * obj0 = 0 ;
   20962            2156 :   GDALDriverShadow *result = 0 ;
   20963                 :   
   20964            2156 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDriverByName",&obj0)) SWIG_fail;
   20965            2156 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   20966            2156 :   if (!SWIG_IsOK(res1)) {
   20967               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
   20968                 :   }
   20969            2156 :   arg1 = reinterpret_cast< char * >(buf1);
   20970                 :   {
   20971            2156 :     if (!arg1) {
   20972               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20973                 :     }
   20974                 :   }
   20975                 :   {
   20976            2156 :     if ( bUseExceptions ) {
   20977               0 :       CPLErrorReset();
   20978                 :     }
   20979            2156 :     result = (GDALDriverShadow *)GetDriverByName((char const *)arg1);
   20980            2156 :     if ( bUseExceptions ) {
   20981               0 :       CPLErr eclass = CPLGetLastErrorType();
   20982               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20983               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20984                 :       }
   20985                 :     }
   20986                 :   }
   20987            2156 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   20988            2156 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20989            2156 :   return resultobj;
   20990                 : fail:
   20991               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20992               0 :   return NULL;
   20993                 : }
   20994                 : 
   20995                 : 
   20996            2322 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20997            2322 :   PyObject *resultobj = 0;
   20998                 :   int arg1 ;
   20999                 :   int val1 ;
   21000            2322 :   int ecode1 = 0 ;
   21001            2322 :   PyObject * obj0 = 0 ;
   21002            2322 :   GDALDriverShadow *result = 0 ;
   21003                 :   
   21004            2322 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDriver",&obj0)) SWIG_fail;
   21005            2322 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   21006            2322 :   if (!SWIG_IsOK(ecode1)) {
   21007               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
   21008                 :   } 
   21009            2322 :   arg1 = static_cast< int >(val1);
   21010                 :   {
   21011            2322 :     if ( bUseExceptions ) {
   21012               0 :       CPLErrorReset();
   21013                 :     }
   21014            2322 :     result = (GDALDriverShadow *)GetDriver(arg1);
   21015            2322 :     if ( bUseExceptions ) {
   21016               0 :       CPLErr eclass = CPLGetLastErrorType();
   21017               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21018               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21019                 :       }
   21020                 :     }
   21021                 :   }
   21022            2322 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   21023            2322 :   return resultobj;
   21024                 : fail:
   21025               0 :   return NULL;
   21026                 : }
   21027                 : 
   21028                 : 
   21029            4452 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21030            4452 :   PyObject *resultobj = 0;
   21031            4452 :   char *arg1 = (char *) 0 ;
   21032            4452 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   21033            4452 :   int bToFree1 = 0 ;
   21034                 :   int val2 ;
   21035            4452 :   int ecode2 = 0 ;
   21036            4452 :   PyObject * obj0 = 0 ;
   21037            4452 :   PyObject * obj1 = 0 ;
   21038            4452 :   GDALDatasetShadow *result = 0 ;
   21039                 :   
   21040            4452 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Open",&obj0,&obj1)) SWIG_fail;
   21041                 :   {
   21042                 :     /* %typemap(in) (const char *utf8_path) */
   21043            4452 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   21044            4452 :     if (arg1 == NULL)
   21045                 :     {
   21046               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   21047               0 :       SWIG_fail;
   21048                 :     }
   21049                 :   }
   21050            4452 :   if (obj1) {
   21051             487 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   21052             487 :     if (!SWIG_IsOK(ecode2)) {
   21053               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Open" "', argument " "2"" of type '" "GDALAccess""'");
   21054                 :     } 
   21055             487 :     arg2 = static_cast< GDALAccess >(val2);
   21056                 :   }
   21057                 :   {
   21058            4452 :     if ( bUseExceptions ) {
   21059               1 :       CPLErrorReset();
   21060                 :     }
   21061            4452 :     result = (GDALDatasetShadow *)Open((char const *)arg1,arg2);
   21062            4452 :     if ( bUseExceptions ) {
   21063               1 :       CPLErr eclass = CPLGetLastErrorType();
   21064               1 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21065               1 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21066                 :       }
   21067                 :     }
   21068                 :   }
   21069            4451 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   21070                 :   {
   21071                 :     /* %typemap(freearg) (const char *utf8_path) */
   21072            4451 :     GDALPythonFreeCStr(arg1, bToFree1);
   21073                 :   }
   21074            4451 :   return resultobj;
   21075                 : fail:
   21076                 :   {
   21077                 :     /* %typemap(freearg) (const char *utf8_path) */
   21078               1 :     GDALPythonFreeCStr(arg1, bToFree1);
   21079                 :   }
   21080               1 :   return NULL;
   21081                 : }
   21082                 : 
   21083                 : 
   21084            5004 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21085            5004 :   PyObject *resultobj = 0;
   21086            5004 :   char *arg1 = (char *) 0 ;
   21087            5004 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   21088            5004 :   int bToFree1 = 0 ;
   21089                 :   int val2 ;
   21090            5004 :   int ecode2 = 0 ;
   21091            5004 :   PyObject * obj0 = 0 ;
   21092            5004 :   PyObject * obj1 = 0 ;
   21093            5004 :   GDALDatasetShadow *result = 0 ;
   21094                 :   
   21095            5004 :   if (!PyArg_ParseTuple(args,(char *)"O|O:OpenShared",&obj0,&obj1)) SWIG_fail;
   21096                 :   {
   21097                 :     /* %typemap(in) (const char *utf8_path) */
   21098            5004 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   21099            5004 :     if (arg1 == NULL)
   21100                 :     {
   21101               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   21102               0 :       SWIG_fail;
   21103                 :     }
   21104                 :   }
   21105            5004 :   if (obj1) {
   21106               1 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   21107               1 :     if (!SWIG_IsOK(ecode2)) {
   21108               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenShared" "', argument " "2"" of type '" "GDALAccess""'");
   21109                 :     } 
   21110               1 :     arg2 = static_cast< GDALAccess >(val2);
   21111                 :   }
   21112                 :   {
   21113            5004 :     if ( bUseExceptions ) {
   21114               0 :       CPLErrorReset();
   21115                 :     }
   21116            5004 :     result = (GDALDatasetShadow *)OpenShared((char const *)arg1,arg2);
   21117            5004 :     if ( bUseExceptions ) {
   21118               0 :       CPLErr eclass = CPLGetLastErrorType();
   21119               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21120               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21121                 :       }
   21122                 :     }
   21123                 :   }
   21124            5004 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   21125                 :   {
   21126                 :     /* %typemap(freearg) (const char *utf8_path) */
   21127            5004 :     GDALPythonFreeCStr(arg1, bToFree1);
   21128                 :   }
   21129            5004 :   return resultobj;
   21130                 : fail:
   21131                 :   {
   21132                 :     /* %typemap(freearg) (const char *utf8_path) */
   21133               0 :     GDALPythonFreeCStr(arg1, bToFree1);
   21134                 :   }
   21135               0 :   return NULL;
   21136                 : }
   21137                 : 
   21138                 : 
   21139               6 : SWIGINTERN PyObject *_wrap_IdentifyDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21140               6 :   PyObject *resultobj = 0;
   21141               6 :   char *arg1 = (char *) 0 ;
   21142               6 :   char **arg2 = (char **) NULL ;
   21143               6 :   int bToFree1 = 0 ;
   21144               6 :   PyObject * obj0 = 0 ;
   21145               6 :   PyObject * obj1 = 0 ;
   21146               6 :   GDALDriverShadow *result = 0 ;
   21147                 :   
   21148               6 :   if (!PyArg_ParseTuple(args,(char *)"O|O:IdentifyDriver",&obj0,&obj1)) SWIG_fail;
   21149                 :   {
   21150                 :     /* %typemap(in) (const char *utf8_path) */
   21151               6 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   21152               6 :     if (arg1 == NULL)
   21153                 :     {
   21154               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   21155               0 :       SWIG_fail;
   21156                 :     }
   21157                 :   }
   21158               6 :   if (obj1) {
   21159                 :     {
   21160                 :       /* %typemap(in) char **options */
   21161                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   21162               2 :       if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
   21163                 :   #if PY_VERSION_HEX < 0x03000000
   21164                 :         || PyString_Check(obj1)
   21165                 :   #endif
   21166                 :         ) {
   21167               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   21168               0 :         SWIG_fail;
   21169                 :       }
   21170                 :       
   21171               2 :       int size = PySequence_Size(obj1);
   21172             376 :       for (int i = 0; i < size; i++) {
   21173             374 :         PyObject* pyObj = PySequence_GetItem(obj1,i);
   21174             374 :         if (PyUnicode_Check(pyObj))
   21175                 :         {
   21176                 :           char *pszStr;
   21177                 :           Py_ssize_t nLen;
   21178               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   21179                 : #if PY_VERSION_HEX >= 0x03000000
   21180                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   21181                 : #else
   21182               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   21183                 : #endif
   21184               0 :           arg2 = CSLAddString( arg2, pszStr );
   21185               0 :           Py_XDECREF(pyUTF8Str);
   21186                 :         }
   21187                 : #if PY_VERSION_HEX >= 0x03000000
   21188                 :         else if (PyBytes_Check(pyObj))
   21189                 :         arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   21190                 : #else
   21191             374 :         else if (PyString_Check(pyObj))
   21192             374 :         arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   21193                 : #endif
   21194                 :         else
   21195                 :         {
   21196               0 :           Py_DECREF(pyObj);
   21197               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   21198               0 :           SWIG_fail;
   21199                 :         }
   21200             374 :         Py_DECREF(pyObj);
   21201                 :       }
   21202                 :     }
   21203                 :   }
   21204                 :   {
   21205               6 :     if ( bUseExceptions ) {
   21206               0 :       CPLErrorReset();
   21207                 :     }
   21208               6 :     result = (GDALDriverShadow *)IdentifyDriver((char const *)arg1,arg2);
   21209               6 :     if ( bUseExceptions ) {
   21210               0 :       CPLErr eclass = CPLGetLastErrorType();
   21211               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21212               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21213                 :       }
   21214                 :     }
   21215                 :   }
   21216               6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   21217                 :   {
   21218                 :     /* %typemap(freearg) (const char *utf8_path) */
   21219               6 :     GDALPythonFreeCStr(arg1, bToFree1);
   21220                 :   }
   21221                 :   {
   21222                 :     /* %typemap(freearg) char **options */
   21223               6 :     CSLDestroy( arg2 );
   21224                 :   }
   21225               6 :   return resultobj;
   21226                 : fail:
   21227                 :   {
   21228                 :     /* %typemap(freearg) (const char *utf8_path) */
   21229               0 :     GDALPythonFreeCStr(arg1, bToFree1);
   21230                 :   }
   21231                 :   {
   21232                 :     /* %typemap(freearg) char **options */
   21233               0 :     CSLDestroy( arg2 );
   21234                 :   }
   21235               0 :   return NULL;
   21236                 : }
   21237                 : 
   21238                 : 
   21239              44 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21240              44 :   PyObject *resultobj = 0;
   21241              44 :   char **arg1 = (char **) 0 ;
   21242              44 :   int arg2 = (int) 0 ;
   21243                 :   int val2 ;
   21244              44 :   int ecode2 = 0 ;
   21245              44 :   PyObject * obj0 = 0 ;
   21246              44 :   PyObject * obj1 = 0 ;
   21247              44 :   char **result = 0 ;
   21248                 :   
   21249              44 :   if (!PyArg_ParseTuple(args,(char *)"O|O:GeneralCmdLineProcessor",&obj0,&obj1)) SWIG_fail;
   21250                 :   {
   21251                 :     /* %typemap(in) char **options */
   21252                 :     /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   21253              44 :     if ( ! PySequence_Check(obj0) || PyUnicode_Check(obj0)
   21254                 :   #if PY_VERSION_HEX < 0x03000000
   21255                 :       || PyString_Check(obj0)
   21256                 :   #endif
   21257                 :       ) {
   21258               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   21259               0 :       SWIG_fail;
   21260                 :     }
   21261                 :     
   21262              44 :     int size = PySequence_Size(obj0);
   21263             214 :     for (int i = 0; i < size; i++) {
   21264             170 :       PyObject* pyObj = PySequence_GetItem(obj0,i);
   21265             170 :       if (PyUnicode_Check(pyObj))
   21266                 :       {
   21267                 :         char *pszStr;
   21268                 :         Py_ssize_t nLen;
   21269               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   21270                 : #if PY_VERSION_HEX >= 0x03000000
   21271                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   21272                 : #else
   21273               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   21274                 : #endif
   21275               0 :         arg1 = CSLAddString( arg1, pszStr );
   21276               0 :         Py_XDECREF(pyUTF8Str);
   21277                 :       }
   21278                 : #if PY_VERSION_HEX >= 0x03000000
   21279                 :       else if (PyBytes_Check(pyObj))
   21280                 :       arg1 = CSLAddString( arg1, PyBytes_AsString(pyObj) );
   21281                 : #else
   21282             170 :       else if (PyString_Check(pyObj))
   21283             170 :       arg1 = CSLAddString( arg1, PyString_AsString(pyObj) );
   21284                 : #endif
   21285                 :       else
   21286                 :       {
   21287               0 :         Py_DECREF(pyObj);
   21288               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   21289               0 :         SWIG_fail;
   21290                 :       }
   21291             170 :       Py_DECREF(pyObj);
   21292                 :     }
   21293                 :   }
   21294              44 :   if (obj1) {
   21295               0 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   21296               0 :     if (!SWIG_IsOK(ecode2)) {
   21297               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
   21298                 :     } 
   21299               0 :     arg2 = static_cast< int >(val2);
   21300                 :   }
   21301                 :   {
   21302              44 :     if ( bUseExceptions ) {
   21303               0 :       CPLErrorReset();
   21304                 :     }
   21305              44 :     result = (char **)GeneralCmdLineProcessor(arg1,arg2);
   21306              44 :     if ( bUseExceptions ) {
   21307               0 :       CPLErr eclass = CPLGetLastErrorType();
   21308               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21309               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21310                 :       }
   21311                 :     }
   21312                 :   }
   21313                 :   {
   21314                 :     /* %typemap(out) char **CSL -> ( string ) */
   21315              44 :     char **stringarray = result;
   21316              44 :     if ( stringarray == NULL ) {
   21317               0 :       resultobj = Py_None;
   21318               0 :       Py_INCREF( resultobj );
   21319                 :     }
   21320                 :     else {
   21321              44 :       int len = CSLCount( stringarray );
   21322              44 :       resultobj = PyList_New( len );
   21323             214 :       for ( int i = 0; i < len; ++i ) {
   21324             170 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   21325             170 :         PyList_SetItem(resultobj, i, o );
   21326                 :       }
   21327                 :     }
   21328              44 :     CSLDestroy(result);
   21329                 :   }
   21330                 :   {
   21331                 :     /* %typemap(freearg) char **options */
   21332              44 :     CSLDestroy( arg1 );
   21333                 :   }
   21334              44 :   return resultobj;
   21335                 : fail:
   21336                 :   {
   21337                 :     /* %typemap(freearg) char **options */
   21338               0 :     CSLDestroy( arg1 );
   21339                 :   }
   21340               0 :   return NULL;
   21341                 : }
   21342                 : 
   21343                 : 
   21344                 : static PyMethodDef SwigMethods[] = {
   21345                 :    { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
   21346                 :    { (char *)"GetUseExceptions", _wrap_GetUseExceptions, METH_VARARGS, (char *)"GetUseExceptions() -> int"},
   21347                 :    { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, (char *)"UseExceptions()"},
   21348                 :    { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, (char *)"DontUseExceptions()"},
   21349                 :    { (char *)"VSIFReadL", _wrap_VSIFReadL, METH_VARARGS, (char *)"VSIFReadL(int nMembSize, int nMembCount, VSILFILE fp) -> int"},
   21350                 :    { (char *)"Debug", _wrap_Debug, METH_VARARGS, (char *)"Debug(char msg_class, char message)"},
   21351                 :    { (char *)"Error", _wrap_Error, METH_VARARGS, (char *)"Error(CPLErr msg_class = CE_Failure, int err_code = 0, char msg = \"error\")"},
   21352                 :    { (char *)"PushErrorHandler", _wrap_PushErrorHandler, METH_VARARGS, (char *)"\n"
   21353                 :     "PushErrorHandler(char pszCallbackName = None) -> CPLErr\n"
   21354                 :     "PushErrorHandler(CPLErrorHandler arg0)\n"
   21355                 :     ""},
   21356                 :    { (char *)"PopErrorHandler", _wrap_PopErrorHandler, METH_VARARGS, (char *)"PopErrorHandler()"},
   21357                 :    { (char *)"ErrorReset", _wrap_ErrorReset, METH_VARARGS, (char *)"ErrorReset()"},
   21358                 :    { (char *)"EscapeString", (PyCFunction) _wrap_EscapeString, METH_VARARGS | METH_KEYWORDS, (char *)"EscapeString(int len, int scheme = CPLES_SQL) -> retStringAndCPLFree"},
   21359                 :    { (char *)"GetLastErrorNo", _wrap_GetLastErrorNo, METH_VARARGS, (char *)"GetLastErrorNo() -> int"},
   21360                 :    { (char *)"GetLastErrorType", _wrap_GetLastErrorType, METH_VARARGS, (char *)"GetLastErrorType() -> int"},
   21361                 :    { (char *)"GetLastErrorMsg", _wrap_GetLastErrorMsg, METH_VARARGS, (char *)"GetLastErrorMsg() -> char"},
   21362                 :    { (char *)"PushFinderLocation", _wrap_PushFinderLocation, METH_VARARGS, (char *)"PushFinderLocation(char utf8_path)"},
   21363                 :    { (char *)"PopFinderLocation", _wrap_PopFinderLocation, METH_VARARGS, (char *)"PopFinderLocation()"},
   21364                 :    { (char *)"FinderClean", _wrap_FinderClean, METH_VARARGS, (char *)"FinderClean()"},
   21365                 :    { (char *)"FindFile", _wrap_FindFile, METH_VARARGS, (char *)"FindFile(char pszClass, char utf8_path) -> char"},
   21366                 :    { (char *)"ReadDir", _wrap_ReadDir, METH_VARARGS, (char *)"ReadDir(char utf8_path) -> char"},
   21367                 :    { (char *)"ReadDirRecursive", _wrap_ReadDirRecursive, METH_VARARGS, (char *)"ReadDirRecursive(char utf8_path) -> char"},
   21368                 :    { (char *)"SetConfigOption", _wrap_SetConfigOption, METH_VARARGS, (char *)"SetConfigOption(char pszKey, char pszValue)"},
   21369                 :    { (char *)"GetConfigOption", _wrap_GetConfigOption, METH_VARARGS, (char *)"GetConfigOption(char pszKey, char pszDefault = None) -> char"},
   21370                 :    { (char *)"CPLBinaryToHex", _wrap_CPLBinaryToHex, METH_VARARGS, (char *)"CPLBinaryToHex(int nBytes) -> retStringAndCPLFree"},
   21371                 :    { (char *)"CPLHexToBinary", _wrap_CPLHexToBinary, METH_VARARGS, (char *)"CPLHexToBinary(char pszHex, int pnBytes) -> GByte"},
   21372                 :    { (char *)"FileFromMemBuffer", _wrap_FileFromMemBuffer, METH_VARARGS, (char *)"FileFromMemBuffer(char utf8_path, int nBytes)"},
   21373                 :    { (char *)"Unlink", _wrap_Unlink, METH_VARARGS, (char *)"Unlink(char utf8_path) -> int"},
   21374                 :    { (char *)"HasThreadSupport", _wrap_HasThreadSupport, METH_VARARGS, (char *)"HasThreadSupport() -> int"},
   21375                 :    { (char *)"Mkdir", _wrap_Mkdir, METH_VARARGS, (char *)"Mkdir(char utf8_path, int mode) -> int"},
   21376                 :    { (char *)"Rmdir", _wrap_Rmdir, METH_VARARGS, (char *)"Rmdir(char utf8_path) -> int"},
   21377                 :    { (char *)"Rename", _wrap_Rename, METH_VARARGS, (char *)"Rename(char pszOld, char pszNew) -> int"},
   21378                 :    { (char *)"StatBuf_mode_get", _wrap_StatBuf_mode_get, METH_VARARGS, (char *)"StatBuf_mode_get(StatBuf self) -> int"},
   21379                 :    { (char *)"StatBuf_size_get", _wrap_StatBuf_size_get, METH_VARARGS, (char *)"StatBuf_size_get(StatBuf self) -> GIntBig"},
   21380                 :    { (char *)"StatBuf_mtime_get", _wrap_StatBuf_mtime_get, METH_VARARGS, (char *)"StatBuf_mtime_get(StatBuf self) -> GIntBig"},
   21381                 :    { (char *)"new_StatBuf", _wrap_new_StatBuf, METH_VARARGS, (char *)"new_StatBuf(StatBuf psStatBuf) -> StatBuf"},
   21382                 :    { (char *)"delete_StatBuf", _wrap_delete_StatBuf, METH_VARARGS, (char *)"delete_StatBuf(StatBuf self)"},
   21383                 :    { (char *)"StatBuf_IsDirectory", _wrap_StatBuf_IsDirectory, METH_VARARGS, (char *)"StatBuf_IsDirectory(StatBuf self) -> int"},
   21384                 :    { (char *)"StatBuf_swigregister", StatBuf_swigregister, METH_VARARGS, NULL},
   21385                 :    { (char *)"VSIStatL", _wrap_VSIStatL, METH_VARARGS, (char *)"VSIStatL(char utf8_path, int nFlags = 0) -> int"},
   21386                 :    { (char *)"VSIFOpenL", _wrap_VSIFOpenL, METH_VARARGS, (char *)"VSIFOpenL(char utf8_path, char pszMode) -> VSILFILE"},
   21387                 :    { (char *)"VSIFCloseL", _wrap_VSIFCloseL, METH_VARARGS, (char *)"VSIFCloseL(VSILFILE arg0)"},
   21388                 :    { (char *)"VSIFSeekL", _wrap_VSIFSeekL, METH_VARARGS, (char *)"VSIFSeekL(VSILFILE arg0, GIntBig arg1, int arg2) -> int"},
   21389                 :    { (char *)"VSIFTellL", _wrap_VSIFTellL, METH_VARARGS, (char *)"VSIFTellL(VSILFILE arg0) -> GIntBig"},
   21390                 :    { (char *)"VSIFTruncateL", _wrap_VSIFTruncateL, METH_VARARGS, (char *)"VSIFTruncateL(VSILFILE arg0, GIntBig arg1) -> int"},
   21391                 :    { (char *)"VSIFWriteL", _wrap_VSIFWriteL, METH_VARARGS, (char *)"VSIFWriteL(int nLen, int size, int memb, VSILFILE f) -> int"},
   21392                 :    { (char *)"MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_VARARGS, (char *)"MajorObject_GetDescription(MajorObject self) -> char"},
   21393                 :    { (char *)"MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, (char *)"MajorObject_SetDescription(MajorObject self, char pszNewDesc)"},
   21394                 :    { (char *)"MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, (char *)"MajorObject_GetMetadata_Dict(MajorObject self, char pszDomain = \"\") -> char"},
   21395                 :    { (char *)"MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, (char *)"MajorObject_GetMetadata_List(MajorObject self, char pszDomain = \"\") -> char"},
   21396                 :    { (char *)"MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, (char *)"\n"
   21397                 :     "SetMetadata(char papszMetadata, char pszDomain = \"\") -> CPLErr\n"
   21398                 :     "MajorObject_SetMetadata(MajorObject self, char pszMetadataString, char pszDomain = \"\") -> CPLErr\n"
   21399                 :     ""},
   21400                 :    { (char *)"MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, (char *)"MajorObject_GetMetadataItem(MajorObject self, char pszName, char pszDomain = \"\") -> char"},
   21401                 :    { (char *)"MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, (char *)"MajorObject_SetMetadataItem(MajorObject self, char pszName, char pszValue, char pszDomain = \"\") -> CPLErr"},
   21402                 :    { (char *)"MajorObject_swigregister", MajorObject_swigregister, METH_VARARGS, NULL},
   21403                 :    { (char *)"Driver_ShortName_get", _wrap_Driver_ShortName_get, METH_VARARGS, (char *)"Driver_ShortName_get(Driver self) -> char"},
   21404                 :    { (char *)"Driver_LongName_get", _wrap_Driver_LongName_get, METH_VARARGS, (char *)"Driver_LongName_get(Driver self) -> char"},
   21405                 :    { (char *)"Driver_HelpTopic_get", _wrap_Driver_HelpTopic_get, METH_VARARGS, (char *)"Driver_HelpTopic_get(Driver self) -> char"},
   21406                 :    { (char *)"Driver_Create", (PyCFunction) _wrap_Driver_Create, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21407                 :     "Driver_Create(Driver self, char utf8_path, int xsize, int ysize, \n"
   21408                 :     "    int bands = 1, GDALDataType eType = GDT_Byte, \n"
   21409                 :     "    char options = None) -> Dataset\n"
   21410                 :     ""},
   21411                 :    { (char *)"Driver_CreateCopy", (PyCFunction) _wrap_Driver_CreateCopy, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21412                 :     "Driver_CreateCopy(Driver self, char utf8_path, Dataset src, int strict = 1, \n"
   21413                 :     "    char options = None, GDALProgressFunc callback = None, \n"
   21414                 :     "    void callback_data = None) -> Dataset\n"
   21415                 :     ""},
   21416                 :    { (char *)"Driver_Delete", _wrap_Driver_Delete, METH_VARARGS, (char *)"Driver_Delete(Driver self, char utf8_path) -> int"},
   21417                 :    { (char *)"Driver_Rename", _wrap_Driver_Rename, METH_VARARGS, (char *)"Driver_Rename(Driver self, char newName, char oldName) -> int"},
   21418                 :    { (char *)"Driver_CopyFiles", _wrap_Driver_CopyFiles, METH_VARARGS, (char *)"Driver_CopyFiles(Driver self, char newName, char oldName) -> int"},
   21419                 :    { (char *)"Driver_Register", _wrap_Driver_Register, METH_VARARGS, (char *)"Driver_Register(Driver self) -> int"},
   21420                 :    { (char *)"Driver_Deregister", _wrap_Driver_Deregister, METH_VARARGS, (char *)"Driver_Deregister(Driver self)"},
   21421                 :    { (char *)"Driver_swigregister", Driver_swigregister, METH_VARARGS, NULL},
   21422                 :    { (char *)"ColorEntry_c1_set", _wrap_ColorEntry_c1_set, METH_VARARGS, (char *)"ColorEntry_c1_set(ColorEntry self, short c1)"},
   21423                 :    { (char *)"ColorEntry_c1_get", _wrap_ColorEntry_c1_get, METH_VARARGS, (char *)"ColorEntry_c1_get(ColorEntry self) -> short"},
   21424                 :    { (char *)"ColorEntry_c2_set", _wrap_ColorEntry_c2_set, METH_VARARGS, (char *)"ColorEntry_c2_set(ColorEntry self, short c2)"},
   21425                 :    { (char *)"ColorEntry_c2_get", _wrap_ColorEntry_c2_get, METH_VARARGS, (char *)"ColorEntry_c2_get(ColorEntry self) -> short"},
   21426                 :    { (char *)"ColorEntry_c3_set", _wrap_ColorEntry_c3_set, METH_VARARGS, (char *)"ColorEntry_c3_set(ColorEntry self, short c3)"},
   21427                 :    { (char *)"ColorEntry_c3_get", _wrap_ColorEntry_c3_get, METH_VARARGS, (char *)"ColorEntry_c3_get(ColorEntry self) -> short"},
   21428                 :    { (char *)"ColorEntry_c4_set", _wrap_ColorEntry_c4_set, METH_VARARGS, (char *)"ColorEntry_c4_set(ColorEntry self, short c4)"},
   21429                 :    { (char *)"ColorEntry_c4_get", _wrap_ColorEntry_c4_get, METH_VARARGS, (char *)"ColorEntry_c4_get(ColorEntry self) -> short"},
   21430                 :    { (char *)"new_ColorEntry", _wrap_new_ColorEntry, METH_VARARGS, (char *)"new_ColorEntry() -> ColorEntry"},
   21431                 :    { (char *)"delete_ColorEntry", _wrap_delete_ColorEntry, METH_VARARGS, (char *)"delete_ColorEntry(ColorEntry self)"},
   21432                 :    { (char *)"ColorEntry_swigregister", ColorEntry_swigregister, METH_VARARGS, NULL},
   21433                 :    { (char *)"GCP_GCPX_set", _wrap_GCP_GCPX_set, METH_VARARGS, (char *)"GCP_GCPX_set(GCP self, double GCPX)"},
   21434                 :    { (char *)"GCP_GCPX_get", _wrap_GCP_GCPX_get, METH_VARARGS, (char *)"GCP_GCPX_get(GCP self) -> double"},
   21435                 :    { (char *)"GCP_GCPY_set", _wrap_GCP_GCPY_set, METH_VARARGS, (char *)"GCP_GCPY_set(GCP self, double GCPY)"},
   21436                 :    { (char *)"GCP_GCPY_get", _wrap_GCP_GCPY_get, METH_VARARGS, (char *)"GCP_GCPY_get(GCP self) -> double"},
   21437                 :    { (char *)"GCP_GCPZ_set", _wrap_GCP_GCPZ_set, METH_VARARGS, (char *)"GCP_GCPZ_set(GCP self, double GCPZ)"},
   21438                 :    { (char *)"GCP_GCPZ_get", _wrap_GCP_GCPZ_get, METH_VARARGS, (char *)"GCP_GCPZ_get(GCP self) -> double"},
   21439                 :    { (char *)"GCP_GCPPixel_set", _wrap_GCP_GCPPixel_set, METH_VARARGS, (char *)"GCP_GCPPixel_set(GCP self, double GCPPixel)"},
   21440                 :    { (char *)"GCP_GCPPixel_get", _wrap_GCP_GCPPixel_get, METH_VARARGS, (char *)"GCP_GCPPixel_get(GCP self) -> double"},
   21441                 :    { (char *)"GCP_GCPLine_set", _wrap_GCP_GCPLine_set, METH_VARARGS, (char *)"GCP_GCPLine_set(GCP self, double GCPLine)"},
   21442                 :    { (char *)"GCP_GCPLine_get", _wrap_GCP_GCPLine_get, METH_VARARGS, (char *)"GCP_GCPLine_get(GCP self) -> double"},
   21443                 :    { (char *)"GCP_Info_set", _wrap_GCP_Info_set, METH_VARARGS, (char *)"GCP_Info_set(GCP self, char Info)"},
   21444                 :    { (char *)"GCP_Info_get", _wrap_GCP_Info_get, METH_VARARGS, (char *)"GCP_Info_get(GCP self) -> char"},
   21445                 :    { (char *)"GCP_Id_set", _wrap_GCP_Id_set, METH_VARARGS, (char *)"GCP_Id_set(GCP self, char Id)"},
   21446                 :    { (char *)"GCP_Id_get", _wrap_GCP_Id_get, METH_VARARGS, (char *)"GCP_Id_get(GCP self) -> char"},
   21447                 :    { (char *)"new_GCP", _wrap_new_GCP, METH_VARARGS, (char *)"\n"
   21448                 :     "new_GCP(double x = 0.0, double y = 0.0, double z = 0.0, double pixel = 0.0, \n"
   21449                 :     "    double line = 0.0, char info = \"\", \n"
   21450                 :     "    char id = \"\") -> GCP\n"
   21451                 :     ""},
   21452                 :    { (char *)"delete_GCP", _wrap_delete_GCP, METH_VARARGS, (char *)"delete_GCP(GCP self)"},
   21453                 :    { (char *)"GCP_swigregister", GCP_swigregister, METH_VARARGS, NULL},
   21454                 :    { (char *)"GDAL_GCP_GCPX_get", _wrap_GDAL_GCP_GCPX_get, METH_VARARGS, (char *)"GDAL_GCP_GCPX_get(GCP gcp) -> double"},
   21455                 :    { (char *)"GDAL_GCP_GCPX_set", _wrap_GDAL_GCP_GCPX_set, METH_VARARGS, (char *)"GDAL_GCP_GCPX_set(GCP gcp, double dfGCPX)"},
   21456                 :    { (char *)"GDAL_GCP_GCPY_get", _wrap_GDAL_GCP_GCPY_get, METH_VARARGS, (char *)"GDAL_GCP_GCPY_get(GCP gcp) -> double"},
   21457                 :    { (char *)"GDAL_GCP_GCPY_set", _wrap_GDAL_GCP_GCPY_set, METH_VARARGS, (char *)"GDAL_GCP_GCPY_set(GCP gcp, double dfGCPY)"},
   21458                 :    { (char *)"GDAL_GCP_GCPZ_get", _wrap_GDAL_GCP_GCPZ_get, METH_VARARGS, (char *)"GDAL_GCP_GCPZ_get(GCP gcp) -> double"},
   21459                 :    { (char *)"GDAL_GCP_GCPZ_set", _wrap_GDAL_GCP_GCPZ_set, METH_VARARGS, (char *)"GDAL_GCP_GCPZ_set(GCP gcp, double dfGCPZ)"},
   21460                 :    { (char *)"GDAL_GCP_GCPPixel_get", _wrap_GDAL_GCP_GCPPixel_get, METH_VARARGS, (char *)"GDAL_GCP_GCPPixel_get(GCP gcp) -> double"},
   21461                 :    { (char *)"GDAL_GCP_GCPPixel_set", _wrap_GDAL_GCP_GCPPixel_set, METH_VARARGS, (char *)"GDAL_GCP_GCPPixel_set(GCP gcp, double dfGCPPixel)"},
   21462                 :    { (char *)"GDAL_GCP_GCPLine_get", _wrap_GDAL_GCP_GCPLine_get, METH_VARARGS, (char *)"GDAL_GCP_GCPLine_get(GCP gcp) -> double"},
   21463                 :    { (char *)"GDAL_GCP_GCPLine_set", _wrap_GDAL_GCP_GCPLine_set, METH_VARARGS, (char *)"GDAL_GCP_GCPLine_set(GCP gcp, double dfGCPLine)"},
   21464                 :    { (char *)"GDAL_GCP_Info_get", _wrap_GDAL_GCP_Info_get, METH_VARARGS, (char *)"GDAL_GCP_Info_get(GCP gcp) -> char"},
   21465                 :    { (char *)"GDAL_GCP_Info_set", _wrap_GDAL_GCP_Info_set, METH_VARARGS, (char *)"GDAL_GCP_Info_set(GCP gcp, char pszInfo)"},
   21466                 :    { (char *)"GDAL_GCP_Id_get", _wrap_GDAL_GCP_Id_get, METH_VARARGS, (char *)"GDAL_GCP_Id_get(GCP gcp) -> char"},
   21467                 :    { (char *)"GDAL_GCP_Id_set", _wrap_GDAL_GCP_Id_set, METH_VARARGS, (char *)"GDAL_GCP_Id_set(GCP gcp, char pszId)"},
   21468                 :    { (char *)"GDAL_GCP_get_GCPX", _wrap_GDAL_GCP_get_GCPX, METH_VARARGS, (char *)"GDAL_GCP_get_GCPX(GCP gcp) -> double"},
   21469                 :    { (char *)"GDAL_GCP_set_GCPX", _wrap_GDAL_GCP_set_GCPX, METH_VARARGS, (char *)"GDAL_GCP_set_GCPX(GCP gcp, double dfGCPX)"},
   21470                 :    { (char *)"GDAL_GCP_get_GCPY", _wrap_GDAL_GCP_get_GCPY, METH_VARARGS, (char *)"GDAL_GCP_get_GCPY(GCP gcp) -> double"},
   21471                 :    { (char *)"GDAL_GCP_set_GCPY", _wrap_GDAL_GCP_set_GCPY, METH_VARARGS, (char *)"GDAL_GCP_set_GCPY(GCP gcp, double dfGCPY)"},
   21472                 :    { (char *)"GDAL_GCP_get_GCPZ", _wrap_GDAL_GCP_get_GCPZ, METH_VARARGS, (char *)"GDAL_GCP_get_GCPZ(GCP gcp) -> double"},
   21473                 :    { (char *)"GDAL_GCP_set_GCPZ", _wrap_GDAL_GCP_set_GCPZ, METH_VARARGS, (char *)"GDAL_GCP_set_GCPZ(GCP gcp, double dfGCPZ)"},
   21474                 :    { (char *)"GDAL_GCP_get_GCPPixel", _wrap_GDAL_GCP_get_GCPPixel, METH_VARARGS, (char *)"GDAL_GCP_get_GCPPixel(GCP gcp) -> double"},
   21475                 :    { (char *)"GDAL_GCP_set_GCPPixel", _wrap_GDAL_GCP_set_GCPPixel, METH_VARARGS, (char *)"GDAL_GCP_set_GCPPixel(GCP gcp, double dfGCPPixel)"},
   21476                 :    { (char *)"GDAL_GCP_get_GCPLine", _wrap_GDAL_GCP_get_GCPLine, METH_VARARGS, (char *)"GDAL_GCP_get_GCPLine(GCP gcp) -> double"},
   21477                 :    { (char *)"GDAL_GCP_set_GCPLine", _wrap_GDAL_GCP_set_GCPLine, METH_VARARGS, (char *)"GDAL_GCP_set_GCPLine(GCP gcp, double dfGCPLine)"},
   21478                 :    { (char *)"GDAL_GCP_get_Info", _wrap_GDAL_GCP_get_Info, METH_VARARGS, (char *)"GDAL_GCP_get_Info(GCP gcp) -> char"},
   21479                 :    { (char *)"GDAL_GCP_set_Info", _wrap_GDAL_GCP_set_Info, METH_VARARGS, (char *)"GDAL_GCP_set_Info(GCP gcp, char pszInfo)"},
   21480                 :    { (char *)"GDAL_GCP_get_Id", _wrap_GDAL_GCP_get_Id, METH_VARARGS, (char *)"GDAL_GCP_get_Id(GCP gcp) -> char"},
   21481                 :    { (char *)"GDAL_GCP_set_Id", _wrap_GDAL_GCP_set_Id, METH_VARARGS, (char *)"GDAL_GCP_set_Id(GCP gcp, char pszId)"},
   21482                 :    { (char *)"GCPsToGeoTransform", _wrap_GCPsToGeoTransform, METH_VARARGS, (char *)"GCPsToGeoTransform(int nGCPs, int bApproxOK = 1) -> RETURN_NONE"},
   21483                 :    { (char *)"delete_AsyncReader", _wrap_delete_AsyncReader, METH_VARARGS, (char *)"delete_AsyncReader(AsyncReader self)"},
   21484                 :    { (char *)"AsyncReader_GetNextUpdatedRegion", _wrap_AsyncReader_GetNextUpdatedRegion, METH_VARARGS, (char *)"AsyncReader_GetNextUpdatedRegion(AsyncReader self, double timeout) -> GDALAsyncStatusType"},
   21485                 :    { (char *)"AsyncReader_GetBuffer", _wrap_AsyncReader_GetBuffer, METH_VARARGS, (char *)"AsyncReader_GetBuffer(AsyncReader self)"},
   21486                 :    { (char *)"AsyncReader_LockBuffer", _wrap_AsyncReader_LockBuffer, METH_VARARGS, (char *)"AsyncReader_LockBuffer(AsyncReader self, double timeout) -> int"},
   21487                 :    { (char *)"AsyncReader_UnlockBuffer", _wrap_AsyncReader_UnlockBuffer, METH_VARARGS, (char *)"AsyncReader_UnlockBuffer(AsyncReader self)"},
   21488                 :    { (char *)"AsyncReader_swigregister", AsyncReader_swigregister, METH_VARARGS, NULL},
   21489                 :    { (char *)"Dataset_RasterXSize_get", _wrap_Dataset_RasterXSize_get, METH_VARARGS, (char *)"Dataset_RasterXSize_get(Dataset self) -> int"},
   21490                 :    { (char *)"Dataset_RasterYSize_get", _wrap_Dataset_RasterYSize_get, METH_VARARGS, (char *)"Dataset_RasterYSize_get(Dataset self) -> int"},
   21491                 :    { (char *)"Dataset_RasterCount_get", _wrap_Dataset_RasterCount_get, METH_VARARGS, (char *)"Dataset_RasterCount_get(Dataset self) -> int"},
   21492                 :    { (char *)"delete_Dataset", _wrap_delete_Dataset, METH_VARARGS, (char *)"delete_Dataset(Dataset self)"},
   21493                 :    { (char *)"Dataset_GetDriver", _wrap_Dataset_GetDriver, METH_VARARGS, (char *)"Dataset_GetDriver(Dataset self) -> Driver"},
   21494                 :    { (char *)"Dataset_GetRasterBand", _wrap_Dataset_GetRasterBand, METH_VARARGS, (char *)"Dataset_GetRasterBand(Dataset self, int nBand) -> Band"},
   21495                 :    { (char *)"Dataset_GetProjection", _wrap_Dataset_GetProjection, METH_VARARGS, (char *)"Dataset_GetProjection(Dataset self) -> char"},
   21496                 :    { (char *)"Dataset_GetProjectionRef", _wrap_Dataset_GetProjectionRef, METH_VARARGS, (char *)"Dataset_GetProjectionRef(Dataset self) -> char"},
   21497                 :    { (char *)"Dataset_SetProjection", _wrap_Dataset_SetProjection, METH_VARARGS, (char *)"Dataset_SetProjection(Dataset self, char prj) -> CPLErr"},
   21498                 :    { (char *)"Dataset_GetGeoTransform", (PyCFunction) _wrap_Dataset_GetGeoTransform, METH_VARARGS | METH_KEYWORDS, (char *)"Dataset_GetGeoTransform(Dataset self, int can_return_null = None)"},
   21499                 :    { (char *)"Dataset_SetGeoTransform", _wrap_Dataset_SetGeoTransform, METH_VARARGS, (char *)"Dataset_SetGeoTransform(Dataset self, double argin) -> CPLErr"},
   21500                 :    { (char *)"Dataset_BuildOverviews", (PyCFunction) _wrap_Dataset_BuildOverviews, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21501                 :     "Dataset_BuildOverviews(Dataset self, char resampling = \"NEAREST\", int overviewlist = 0, \n"
   21502                 :     "    GDALProgressFunc callback = None, \n"
   21503                 :     "    void callback_data = None) -> int\n"
   21504                 :     ""},
   21505                 :    { (char *)"Dataset_GetGCPCount", _wrap_Dataset_GetGCPCount, METH_VARARGS, (char *)"Dataset_GetGCPCount(Dataset self) -> int"},
   21506                 :    { (char *)"Dataset_GetGCPProjection", _wrap_Dataset_GetGCPProjection, METH_VARARGS, (char *)"Dataset_GetGCPProjection(Dataset self) -> char"},
   21507                 :    { (char *)"Dataset_GetGCPs", _wrap_Dataset_GetGCPs, METH_VARARGS, (char *)"Dataset_GetGCPs(Dataset self)"},
   21508                 :    { (char *)"Dataset_SetGCPs", _wrap_Dataset_SetGCPs, METH_VARARGS, (char *)"Dataset_SetGCPs(Dataset self, int nGCPs, char pszGCPProjection) -> CPLErr"},
   21509                 :    { (char *)"Dataset_FlushCache", _wrap_Dataset_FlushCache, METH_VARARGS, (char *)"Dataset_FlushCache(Dataset self)"},
   21510                 :    { (char *)"Dataset_AddBand", (PyCFunction) _wrap_Dataset_AddBand, METH_VARARGS | METH_KEYWORDS, (char *)"Dataset_AddBand(Dataset self, GDALDataType datatype = GDT_Byte, char options = None) -> CPLErr"},
   21511                 :    { (char *)"Dataset_CreateMaskBand", _wrap_Dataset_CreateMaskBand, METH_VARARGS, (char *)"Dataset_CreateMaskBand(Dataset self, int nFlags) -> CPLErr"},
   21512                 :    { (char *)"Dataset_GetFileList", _wrap_Dataset_GetFileList, METH_VARARGS, (char *)"Dataset_GetFileList(Dataset self) -> char"},
   21513                 :    { (char *)"Dataset_WriteRaster", (PyCFunction) _wrap_Dataset_WriteRaster, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21514                 :     "Dataset_WriteRaster(Dataset self, int xoff, int yoff, int xsize, int ysize, \n"
   21515                 :     "    GIntBig buf_len, int buf_xsize = None, int buf_ysize = None, \n"
   21516                 :     "    GDALDataType buf_type = None, \n"
   21517                 :     "    int band_list = 0, int buf_pixel_space = None, \n"
   21518                 :     "    int buf_line_space = None, int buf_band_space = None) -> CPLErr\n"
   21519                 :     ""},
   21520                 :    { (char *)"Dataset_BeginAsyncReader", (PyCFunction) _wrap_Dataset_BeginAsyncReader, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21521                 :     "Dataset_BeginAsyncReader(Dataset self, int xOff, int yOff, int xSize, int ySize, \n"
   21522                 :     "    int buf_len, int buf_xsize, int buf_ysize, \n"
   21523                 :     "    GDALDataType bufType = (GDALDataType) 0, int band_list = 0, \n"
   21524                 :     "    int nPixelSpace = 0, int nLineSpace = 0, \n"
   21525                 :     "    int nBandSpace = 0, char options = None) -> AsyncReader\n"
   21526                 :     ""},
   21527                 :    { (char *)"Dataset_EndAsyncReader", _wrap_Dataset_EndAsyncReader, METH_VARARGS, (char *)"Dataset_EndAsyncReader(Dataset self, AsyncReader ario)"},
   21528                 :    { (char *)"Dataset_ReadRaster1", (PyCFunction) _wrap_Dataset_ReadRaster1, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21529                 :     "Dataset_ReadRaster1(Dataset self, int xoff, int yoff, int xsize, int ysize, \n"
   21530                 :     "    int buf_xsize = None, int buf_ysize = None, \n"
   21531                 :     "    GDALDataType buf_type = None, int band_list = 0, \n"
   21532                 :     "    int buf_pixel_space = None, int buf_line_space = None, \n"
   21533                 :     "    int buf_band_space = None) -> CPLErr\n"
   21534                 :     ""},
   21535                 :    { (char *)"Dataset_swigregister", Dataset_swigregister, METH_VARARGS, NULL},
   21536                 :    { (char *)"Band_XSize_get", _wrap_Band_XSize_get, METH_VARARGS, (char *)"Band_XSize_get(Band self) -> int"},
   21537                 :    { (char *)"Band_YSize_get", _wrap_Band_YSize_get, METH_VARARGS, (char *)"Band_YSize_get(Band self) -> int"},
   21538                 :    { (char *)"Band_DataType_get", _wrap_Band_DataType_get, METH_VARARGS, (char *)"Band_DataType_get(Band self) -> GDALDataType"},
   21539                 :    { (char *)"Band_GetBand", _wrap_Band_GetBand, METH_VARARGS, (char *)"Band_GetBand(Band self) -> int"},
   21540                 :    { (char *)"Band_GetBlockSize", _wrap_Band_GetBlockSize, METH_VARARGS, (char *)"Band_GetBlockSize(Band self)"},
   21541                 :    { (char *)"Band_GetColorInterpretation", _wrap_Band_GetColorInterpretation, METH_VARARGS, (char *)"Band_GetColorInterpretation(Band self) -> GDALColorInterp"},
   21542                 :    { (char *)"Band_GetRasterColorInterpretation", _wrap_Band_GetRasterColorInterpretation, METH_VARARGS, (char *)"Band_GetRasterColorInterpretation(Band self) -> GDALColorInterp"},
   21543                 :    { (char *)"Band_SetColorInterpretation", _wrap_Band_SetColorInterpretation, METH_VARARGS, (char *)"Band_SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr"},
   21544                 :    { (char *)"Band_SetRasterColorInterpretation", _wrap_Band_SetRasterColorInterpretation, METH_VARARGS, (char *)"Band_SetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr"},
   21545                 :    { (char *)"Band_GetNoDataValue", _wrap_Band_GetNoDataValue, METH_VARARGS, (char *)"Band_GetNoDataValue(Band self)"},
   21546                 :    { (char *)"Band_SetNoDataValue", _wrap_Band_SetNoDataValue, METH_VARARGS, (char *)"Band_SetNoDataValue(Band self, double d) -> CPLErr"},
   21547                 :    { (char *)"Band_GetUnitType", _wrap_Band_GetUnitType, METH_VARARGS, (char *)"Band_GetUnitType(Band self) -> char"},
   21548                 :    { (char *)"Band_SetUnitType", _wrap_Band_SetUnitType, METH_VARARGS, (char *)"Band_SetUnitType(Band self, char val) -> CPLErr"},
   21549                 :    { (char *)"Band_GetRasterCategoryNames", _wrap_Band_GetRasterCategoryNames, METH_VARARGS, (char *)"Band_GetRasterCategoryNames(Band self) -> char"},
   21550                 :    { (char *)"Band_SetRasterCategoryNames", _wrap_Band_SetRasterCategoryNames, METH_VARARGS, (char *)"Band_SetRasterCategoryNames(Band self, char names) -> CPLErr"},
   21551                 :    { (char *)"Band_GetMinimum", _wrap_Band_GetMinimum, METH_VARARGS, (char *)"Band_GetMinimum(Band self)"},
   21552                 :    { (char *)"Band_GetMaximum", _wrap_Band_GetMaximum, METH_VARARGS, (char *)"Band_GetMaximum(Band self)"},
   21553                 :    { (char *)"Band_GetOffset", _wrap_Band_GetOffset, METH_VARARGS, (char *)"Band_GetOffset(Band self)"},
   21554                 :    { (char *)"Band_GetScale", _wrap_Band_GetScale, METH_VARARGS, (char *)"Band_GetScale(Band self)"},
   21555                 :    { (char *)"Band_SetOffset", _wrap_Band_SetOffset, METH_VARARGS, (char *)"Band_SetOffset(Band self, double val) -> CPLErr"},
   21556                 :    { (char *)"Band_SetScale", _wrap_Band_SetScale, METH_VARARGS, (char *)"Band_SetScale(Band self, double val) -> CPLErr"},
   21557                 :    { (char *)"Band_GetStatistics", _wrap_Band_GetStatistics, METH_VARARGS, (char *)"Band_GetStatistics(Band self, int approx_ok, int force) -> CPLErr"},
   21558                 :    { (char *)"Band_ComputeStatistics", _wrap_Band_ComputeStatistics, METH_VARARGS, (char *)"\n"
   21559                 :     "Band_ComputeStatistics(Band self, bool approx_ok, GDALProgressFunc callback = None, \n"
   21560                 :     "    void callback_data = None) -> CPLErr\n"
   21561                 :     ""},
   21562                 :    { (char *)"Band_SetStatistics", _wrap_Band_SetStatistics, METH_VARARGS, (char *)"Band_SetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr"},
   21563                 :    { (char *)"Band_GetOverviewCount", _wrap_Band_GetOverviewCount, METH_VARARGS, (char *)"Band_GetOverviewCount(Band self) -> int"},
   21564                 :    { (char *)"Band_GetOverview", _wrap_Band_GetOverview, METH_VARARGS, (char *)"Band_GetOverview(Band self, int i) -> Band"},
   21565                 :    { (char *)"Band_Checksum", (PyCFunction) _wrap_Band_Checksum, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21566                 :     "Band_Checksum(Band self, int xoff = 0, int yoff = 0, int xsize = None, \n"
   21567                 :     "    int ysize = None) -> int\n"
   21568                 :     ""},
   21569                 :    { (char *)"Band_ComputeRasterMinMax", _wrap_Band_ComputeRasterMinMax, METH_VARARGS, (char *)"Band_ComputeRasterMinMax(Band self, int approx_ok = 0)"},
   21570                 :    { (char *)"Band_ComputeBandStats", _wrap_Band_ComputeBandStats, METH_VARARGS, (char *)"Band_ComputeBandStats(Band self, int samplestep = 1)"},
   21571                 :    { (char *)"Band_Fill", _wrap_Band_Fill, METH_VARARGS, (char *)"Band_Fill(Band self, double real_fill, double imag_fill = 0.0) -> CPLErr"},
   21572                 :    { (char *)"Band_WriteRaster", (PyCFunction) _wrap_Band_WriteRaster, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21573                 :     "Band_WriteRaster(Band self, int xoff, int yoff, int xsize, int ysize, \n"
   21574                 :     "    GIntBig buf_len, int buf_xsize = None, int buf_ysize = None, \n"
   21575                 :     "    int buf_type = None, int buf_pixel_space = None, \n"
   21576                 :     "    int buf_line_space = None) -> CPLErr\n"
   21577                 :     ""},
   21578                 :    { (char *)"Band_FlushCache", _wrap_Band_FlushCache, METH_VARARGS, (char *)"Band_FlushCache(Band self)"},
   21579                 :    { (char *)"Band_GetRasterColorTable", _wrap_Band_GetRasterColorTable, METH_VARARGS, (char *)"Band_GetRasterColorTable(Band self) -> ColorTable"},
   21580                 :    { (char *)"Band_GetColorTable", _wrap_Band_GetColorTable, METH_VARARGS, (char *)"Band_GetColorTable(Band self) -> ColorTable"},
   21581                 :    { (char *)"Band_SetRasterColorTable", _wrap_Band_SetRasterColorTable, METH_VARARGS, (char *)"Band_SetRasterColorTable(Band self, ColorTable arg) -> int"},
   21582                 :    { (char *)"Band_SetColorTable", _wrap_Band_SetColorTable, METH_VARARGS, (char *)"Band_SetColorTable(Band self, ColorTable arg) -> int"},
   21583                 :    { (char *)"Band_GetDefaultRAT", _wrap_Band_GetDefaultRAT, METH_VARARGS, (char *)"Band_GetDefaultRAT(Band self) -> RasterAttributeTable"},
   21584                 :    { (char *)"Band_SetDefaultRAT", _wrap_Band_SetDefaultRAT, METH_VARARGS, (char *)"Band_SetDefaultRAT(Band self, RasterAttributeTable table) -> int"},
   21585                 :    { (char *)"Band_GetMaskBand", _wrap_Band_GetMaskBand, METH_VARARGS, (char *)"Band_GetMaskBand(Band self) -> Band"},
   21586                 :    { (char *)"Band_GetMaskFlags", _wrap_Band_GetMaskFlags, METH_VARARGS, (char *)"Band_GetMaskFlags(Band self) -> int"},
   21587                 :    { (char *)"Band_CreateMaskBand", _wrap_Band_CreateMaskBand, METH_VARARGS, (char *)"Band_CreateMaskBand(Band self, int nFlags) -> CPLErr"},
   21588                 :    { (char *)"Band_GetHistogram", (PyCFunction) _wrap_Band_GetHistogram, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21589                 :     "Band_GetHistogram(Band self, double min = -0.5, double max = 255.5, int buckets = 256, \n"
   21590                 :     "    int include_out_of_range = 0, \n"
   21591                 :     "    int approx_ok = 1, GDALProgressFunc callback = None, \n"
   21592                 :     "    void callback_data = None) -> CPLErr\n"
   21593                 :     ""},
   21594                 :    { (char *)"Band_GetDefaultHistogram", (PyCFunction) _wrap_Band_GetDefaultHistogram, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21595                 :     "Band_GetDefaultHistogram(Band self, double min_ret = None, double max_ret = None, \n"
   21596                 :     "    int buckets_ret = None, int ppanHistogram = None, \n"
   21597                 :     "    int force = 1, GDALProgressFunc callback = None, \n"
   21598                 :     "    void callback_data = None) -> CPLErr\n"
   21599                 :     ""},
   21600                 :    { (char *)"Band_SetDefaultHistogram", _wrap_Band_SetDefaultHistogram, METH_VARARGS, (char *)"Band_SetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr"},
   21601                 :    { (char *)"Band_HasArbitraryOverviews", _wrap_Band_HasArbitraryOverviews, METH_VARARGS, (char *)"Band_HasArbitraryOverviews(Band self) -> bool"},
   21602                 :    { (char *)"Band_GetCategoryNames", _wrap_Band_GetCategoryNames, METH_VARARGS, (char *)"Band_GetCategoryNames(Band self) -> char"},
   21603                 :    { (char *)"Band_SetCategoryNames", _wrap_Band_SetCategoryNames, METH_VARARGS, (char *)"Band_SetCategoryNames(Band self, char papszCategoryNames) -> CPLErr"},
   21604                 :    { (char *)"Band_ReadRaster1", (PyCFunction) _wrap_Band_ReadRaster1, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21605                 :     "Band_ReadRaster1(Band self, int xoff, int yoff, int xsize, int ysize, \n"
   21606                 :     "    int buf_xsize = None, int buf_ysize = None, \n"
   21607                 :     "    int buf_type = None, int buf_pixel_space = None, \n"
   21608                 :     "    int buf_line_space = None) -> CPLErr\n"
   21609                 :     ""},
   21610                 :    { (char *)"Band_ReadBlock", (PyCFunction) _wrap_Band_ReadBlock, METH_VARARGS | METH_KEYWORDS, (char *)"Band_ReadBlock(Band self, int xoff, int yoff) -> CPLErr"},
   21611                 :    { (char *)"Band_swigregister", Band_swigregister, METH_VARARGS, NULL},
   21612                 :    { (char *)"new_ColorTable", (PyCFunction) _wrap_new_ColorTable, METH_VARARGS | METH_KEYWORDS, (char *)"new_ColorTable(GDALPaletteInterp palette = GPI_RGB) -> ColorTable"},
   21613                 :    { (char *)"delete_ColorTable", _wrap_delete_ColorTable, METH_VARARGS, (char *)"delete_ColorTable(ColorTable self)"},
   21614                 :    { (char *)"ColorTable_Clone", _wrap_ColorTable_Clone, METH_VARARGS, (char *)"ColorTable_Clone(ColorTable self) -> ColorTable"},
   21615                 :    { (char *)"ColorTable_GetPaletteInterpretation", _wrap_ColorTable_GetPaletteInterpretation, METH_VARARGS, (char *)"ColorTable_GetPaletteInterpretation(ColorTable self) -> GDALPaletteInterp"},
   21616                 :    { (char *)"ColorTable_GetCount", _wrap_ColorTable_GetCount, METH_VARARGS, (char *)"ColorTable_GetCount(ColorTable self) -> int"},
   21617                 :    { (char *)"ColorTable_GetColorEntry", _wrap_ColorTable_GetColorEntry, METH_VARARGS, (char *)"ColorTable_GetColorEntry(ColorTable self, int entry) -> ColorEntry"},
   21618                 :    { (char *)"ColorTable_GetColorEntryAsRGB", _wrap_ColorTable_GetColorEntryAsRGB, METH_VARARGS, (char *)"ColorTable_GetColorEntryAsRGB(ColorTable self, int entry, ColorEntry centry) -> int"},
   21619                 :    { (char *)"ColorTable_SetColorEntry", _wrap_ColorTable_SetColorEntry, METH_VARARGS, (char *)"ColorTable_SetColorEntry(ColorTable self, int entry, ColorEntry centry)"},
   21620                 :    { (char *)"ColorTable_CreateColorRamp", _wrap_ColorTable_CreateColorRamp, METH_VARARGS, (char *)"\n"
   21621                 :     "ColorTable_CreateColorRamp(ColorTable self, int nStartIndex, ColorEntry startcolor, \n"
   21622                 :     "    int nEndIndex, ColorEntry endcolor)\n"
   21623                 :     ""},
   21624                 :    { (char *)"ColorTable_swigregister", ColorTable_swigregister, METH_VARARGS, NULL},
   21625                 :    { (char *)"new_RasterAttributeTable", _wrap_new_RasterAttributeTable, METH_VARARGS, (char *)"new_RasterAttributeTable() -> RasterAttributeTable"},
   21626                 :    { (char *)"delete_RasterAttributeTable", _wrap_delete_RasterAttributeTable, METH_VARARGS, (char *)"delete_RasterAttributeTable(RasterAttributeTable self)"},
   21627                 :    { (char *)"RasterAttributeTable_Clone", _wrap_RasterAttributeTable_Clone, METH_VARARGS, (char *)"RasterAttributeTable_Clone(RasterAttributeTable self) -> RasterAttributeTable"},
   21628                 :    { (char *)"RasterAttributeTable_GetColumnCount", _wrap_RasterAttributeTable_GetColumnCount, METH_VARARGS, (char *)"RasterAttributeTable_GetColumnCount(RasterAttributeTable self) -> int"},
   21629                 :    { (char *)"RasterAttributeTable_GetNameOfCol", _wrap_RasterAttributeTable_GetNameOfCol, METH_VARARGS, (char *)"RasterAttributeTable_GetNameOfCol(RasterAttributeTable self, int iCol) -> char"},
   21630                 :    { (char *)"RasterAttributeTable_GetUsageOfCol", _wrap_RasterAttributeTable_GetUsageOfCol, METH_VARARGS, (char *)"RasterAttributeTable_GetUsageOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldUsage"},
   21631                 :    { (char *)"RasterAttributeTable_GetTypeOfCol", _wrap_RasterAttributeTable_GetTypeOfCol, METH_VARARGS, (char *)"RasterAttributeTable_GetTypeOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldType"},
   21632                 :    { (char *)"RasterAttributeTable_GetColOfUsage", _wrap_RasterAttributeTable_GetColOfUsage, METH_VARARGS, (char *)"RasterAttributeTable_GetColOfUsage(RasterAttributeTable self, GDALRATFieldUsage eUsage) -> int"},
   21633                 :    { (char *)"RasterAttributeTable_GetRowCount", _wrap_RasterAttributeTable_GetRowCount, METH_VARARGS, (char *)"RasterAttributeTable_GetRowCount(RasterAttributeTable self) -> int"},
   21634                 :    { (char *)"RasterAttributeTable_GetValueAsString", _wrap_RasterAttributeTable_GetValueAsString, METH_VARARGS, (char *)"RasterAttributeTable_GetValueAsString(RasterAttributeTable self, int iRow, int iCol) -> char"},
   21635                 :    { (char *)"RasterAttributeTable_GetValueAsInt", _wrap_RasterAttributeTable_GetValueAsInt, METH_VARARGS, (char *)"RasterAttributeTable_GetValueAsInt(RasterAttributeTable self, int iRow, int iCol) -> int"},
   21636                 :    { (char *)"RasterAttributeTable_GetValueAsDouble", _wrap_RasterAttributeTable_GetValueAsDouble, METH_VARARGS, (char *)"RasterAttributeTable_GetValueAsDouble(RasterAttributeTable self, int iRow, int iCol) -> double"},
   21637                 :    { (char *)"RasterAttributeTable_SetValueAsString", _wrap_RasterAttributeTable_SetValueAsString, METH_VARARGS, (char *)"RasterAttributeTable_SetValueAsString(RasterAttributeTable self, int iRow, int iCol, char pszValue)"},
   21638                 :    { (char *)"RasterAttributeTable_SetValueAsInt", _wrap_RasterAttributeTable_SetValueAsInt, METH_VARARGS, (char *)"RasterAttributeTable_SetValueAsInt(RasterAttributeTable self, int iRow, int iCol, int nValue)"},
   21639                 :    { (char *)"RasterAttributeTable_SetValueAsDouble", _wrap_RasterAttributeTable_SetValueAsDouble, METH_VARARGS, (char *)"RasterAttributeTable_SetValueAsDouble(RasterAttributeTable self, int iRow, int iCol, double dfValue)"},
   21640                 :    { (char *)"RasterAttributeTable_SetRowCount", _wrap_RasterAttributeTable_SetRowCount, METH_VARARGS, (char *)"RasterAttributeTable_SetRowCount(RasterAttributeTable self, int nCount)"},
   21641                 :    { (char *)"RasterAttributeTable_CreateColumn", _wrap_RasterAttributeTable_CreateColumn, METH_VARARGS, (char *)"\n"
   21642                 :     "RasterAttributeTable_CreateColumn(RasterAttributeTable self, char pszName, GDALRATFieldType eType, \n"
   21643                 :     "    GDALRATFieldUsage eUsage) -> int\n"
   21644                 :     ""},
   21645                 :    { (char *)"RasterAttributeTable_GetLinearBinning", _wrap_RasterAttributeTable_GetLinearBinning, METH_VARARGS, (char *)"RasterAttributeTable_GetLinearBinning(RasterAttributeTable self) -> bool"},
   21646                 :    { (char *)"RasterAttributeTable_SetLinearBinning", _wrap_RasterAttributeTable_SetLinearBinning, METH_VARARGS, (char *)"RasterAttributeTable_SetLinearBinning(RasterAttributeTable self, double dfRow0Min, double dfBinSize) -> int"},
   21647                 :    { (char *)"RasterAttributeTable_GetRowOfValue", _wrap_RasterAttributeTable_GetRowOfValue, METH_VARARGS, (char *)"RasterAttributeTable_GetRowOfValue(RasterAttributeTable self, double dfValue) -> int"},
   21648                 :    { (char *)"RasterAttributeTable_swigregister", RasterAttributeTable_swigregister, METH_VARARGS, NULL},
   21649                 :    { (char *)"TermProgress_nocb", (PyCFunction) _wrap_TermProgress_nocb, METH_VARARGS | METH_KEYWORDS, (char *)"TermProgress_nocb(double dfProgress, char pszMessage = None, void pData = None) -> int"},
   21650                 :    { (char *)"ComputeMedianCutPCT", (PyCFunction) _wrap_ComputeMedianCutPCT, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21651                 :     "ComputeMedianCutPCT(Band red, Band green, Band blue, int num_colors, ColorTable colors, \n"
   21652                 :     "    GDALProgressFunc callback = None, \n"
   21653                 :     "    void callback_data = None) -> int\n"
   21654                 :     ""},
   21655                 :    { (char *)"DitherRGB2PCT", (PyCFunction) _wrap_DitherRGB2PCT, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21656                 :     "DitherRGB2PCT(Band red, Band green, Band blue, Band target, ColorTable colors, \n"
   21657                 :     "    GDALProgressFunc callback = None, \n"
   21658                 :     "    void callback_data = None) -> int\n"
   21659                 :     ""},
   21660                 :    { (char *)"ReprojectImage", _wrap_ReprojectImage, METH_VARARGS, (char *)"\n"
   21661                 :     "ReprojectImage(Dataset src_ds, Dataset dst_ds, char src_wkt = None, \n"
   21662                 :     "    char dst_wkt = None, GDALResampleAlg eResampleAlg = GRA_NearestNeighbour, \n"
   21663                 :     "    double WarpMemoryLimit = 0.0, \n"
   21664                 :     "    double maxerror = 0.0, GDALProgressFunc callback = None, \n"
   21665                 :     "    void callback_data = None) -> CPLErr\n"
   21666                 :     ""},
   21667                 :    { (char *)"ComputeProximity", (PyCFunction) _wrap_ComputeProximity, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21668                 :     "ComputeProximity(Band srcBand, Band proximityBand, char options = None, \n"
   21669                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21670                 :     ""},
   21671                 :    { (char *)"RasterizeLayer", (PyCFunction) _wrap_RasterizeLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21672                 :     "RasterizeLayer(Dataset dataset, int bands, OGRLayerShadow layer, void pfnTransformer = None, \n"
   21673                 :     "    void pTransformArg = None, \n"
   21674                 :     "    int burn_values = 0, char options = None, \n"
   21675                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21676                 :     ""},
   21677                 :    { (char *)"Polygonize", (PyCFunction) _wrap_Polygonize, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21678                 :     "Polygonize(Band srcBand, Band maskBand, OGRLayerShadow outLayer, \n"
   21679                 :     "    int iPixValField, char options = None, GDALProgressFunc callback = None, \n"
   21680                 :     "    void callback_data = None) -> int\n"
   21681                 :     ""},
   21682                 :    { (char *)"FillNodata", (PyCFunction) _wrap_FillNodata, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21683                 :     "FillNodata(Band targetBand, Band maskBand, double maxSearchDist, \n"
   21684                 :     "    int smoothingIterations, char options = None, \n"
   21685                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21686                 :     ""},
   21687                 :    { (char *)"SieveFilter", (PyCFunction) _wrap_SieveFilter, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21688                 :     "SieveFilter(Band srcBand, Band maskBand, Band dstBand, int threshold, \n"
   21689                 :     "    int connectedness = 4, char options = None, \n"
   21690                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21691                 :     ""},
   21692                 :    { (char *)"RegenerateOverviews", (PyCFunction) _wrap_RegenerateOverviews, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21693                 :     "RegenerateOverviews(Band srcBand, int overviewBandCount, char resampling = \"average\", \n"
   21694                 :     "    GDALProgressFunc callback = None, \n"
   21695                 :     "    void callback_data = None) -> int\n"
   21696                 :     ""},
   21697                 :    { (char *)"RegenerateOverview", (PyCFunction) _wrap_RegenerateOverview, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21698                 :     "RegenerateOverview(Band srcBand, Band overviewBand, char resampling = \"average\", \n"
   21699                 :     "    GDALProgressFunc callback = None, \n"
   21700                 :     "    void callback_data = None) -> int\n"
   21701                 :     ""},
   21702                 :    { (char *)"ContourGenerate", (PyCFunction) _wrap_ContourGenerate, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21703                 :     "ContourGenerate(Band srcBand, double contourInterval, double contourBase, \n"
   21704                 :     "    int fixedLevelCount, int useNoData, double noDataValue, \n"
   21705                 :     "    OGRLayerShadow dstLayer, int idField, \n"
   21706                 :     "    int elevField, GDALProgressFunc callback = None, \n"
   21707                 :     "    void callback_data = None) -> int\n"
   21708                 :     ""},
   21709                 :    { (char *)"AutoCreateWarpedVRT", _wrap_AutoCreateWarpedVRT, METH_VARARGS, (char *)"\n"
   21710                 :     "AutoCreateWarpedVRT(Dataset src_ds, char src_wkt = None, char dst_wkt = None, \n"
   21711                 :     "    GDALResampleAlg eResampleAlg = GRA_NearestNeighbour, \n"
   21712                 :     "    double maxerror = 0.0) -> Dataset\n"
   21713                 :     ""},
   21714                 :    { (char *)"new_Transformer", _wrap_new_Transformer, METH_VARARGS, (char *)"new_Transformer(Dataset src, Dataset dst, char options) -> Transformer"},
   21715                 :    { (char *)"delete_Transformer", _wrap_delete_Transformer, METH_VARARGS, (char *)"delete_Transformer(Transformer self)"},
   21716                 :    { (char *)"Transformer_TransformPoint", _wrap_Transformer_TransformPoint, METH_VARARGS, (char *)"\n"
   21717                 :     "TransformPoint(int bDstToSrc, double inout) -> int\n"
   21718                 :     "Transformer_TransformPoint(Transformer self, int bDstToSrc, double x, double y, \n"
   21719                 :     "    double z = 0.0) -> int\n"
   21720                 :     ""},
   21721                 :    { (char *)"Transformer_TransformPoints", _wrap_Transformer_TransformPoints, METH_VARARGS, (char *)"Transformer_TransformPoints(Transformer self, int bDstToSrc, int nCount) -> int"},
   21722                 :    { (char *)"Transformer_TransformGeolocations", (PyCFunction) _wrap_Transformer_TransformGeolocations, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21723                 :     "Transformer_TransformGeolocations(Transformer self, Band xBand, Band yBand, Band zBand, \n"
   21724                 :     "    GDALProgressFunc callback = None, void callback_data = None, \n"
   21725                 :     "    char options = None) -> int\n"
   21726                 :     ""},
   21727                 :    { (char *)"Transformer_swigregister", Transformer_swigregister, METH_VARARGS, NULL},
   21728                 :    { (char *)"ApplyGeoTransform", _wrap_ApplyGeoTransform, METH_VARARGS, (char *)"ApplyGeoTransform(double padfGeoTransform, double dfPixel, double dfLine)"},
   21729                 :    { (char *)"InvGeoTransform", _wrap_InvGeoTransform, METH_VARARGS, (char *)"InvGeoTransform(double gt_in) -> int"},
   21730                 :    { (char *)"VersionInfo", _wrap_VersionInfo, METH_VARARGS, (char *)"VersionInfo(char request = \"VERSION_NUM\") -> char"},
   21731                 :    { (char *)"AllRegister", _wrap_AllRegister, METH_VARARGS, (char *)"AllRegister()"},
   21732                 :    { (char *)"GDALDestroyDriverManager", _wrap_GDALDestroyDriverManager, METH_VARARGS, (char *)"GDALDestroyDriverManager()"},
   21733                 :    { (char *)"GetCacheMax", _wrap_GetCacheMax, METH_VARARGS, (char *)"GetCacheMax() -> GIntBig"},
   21734                 :    { (char *)"GetCacheUsed", _wrap_GetCacheUsed, METH_VARARGS, (char *)"GetCacheUsed() -> GIntBig"},
   21735                 :    { (char *)"SetCacheMax", _wrap_SetCacheMax, METH_VARARGS, (char *)"SetCacheMax(GIntBig nBytes)"},
   21736                 :    { (char *)"GetDataTypeSize", _wrap_GetDataTypeSize, METH_VARARGS, (char *)"GetDataTypeSize(GDALDataType eDataType) -> int"},
   21737                 :    { (char *)"DataTypeIsComplex", _wrap_DataTypeIsComplex, METH_VARARGS, (char *)"DataTypeIsComplex(GDALDataType eDataType) -> int"},
   21738                 :    { (char *)"GetDataTypeName", _wrap_GetDataTypeName, METH_VARARGS, (char *)"GetDataTypeName(GDALDataType eDataType) -> char"},
   21739                 :    { (char *)"GetDataTypeByName", _wrap_GetDataTypeByName, METH_VARARGS, (char *)"GetDataTypeByName(char pszDataTypeName) -> GDALDataType"},
   21740                 :    { (char *)"GetColorInterpretationName", _wrap_GetColorInterpretationName, METH_VARARGS, (char *)"GetColorInterpretationName(GDALColorInterp eColorInterp) -> char"},
   21741                 :    { (char *)"GetPaletteInterpretationName", _wrap_GetPaletteInterpretationName, METH_VARARGS, (char *)"GetPaletteInterpretationName(GDALPaletteInterp ePaletteInterp) -> char"},
   21742                 :    { (char *)"DecToDMS", _wrap_DecToDMS, METH_VARARGS, (char *)"DecToDMS(double arg0, char arg1, int arg2 = 2) -> char"},
   21743                 :    { (char *)"PackedDMSToDec", _wrap_PackedDMSToDec, METH_VARARGS, (char *)"PackedDMSToDec(double dfPacked) -> double"},
   21744                 :    { (char *)"DecToPackedDMS", _wrap_DecToPackedDMS, METH_VARARGS, (char *)"DecToPackedDMS(double dfDec) -> double"},
   21745                 :    { (char *)"ParseXMLString", _wrap_ParseXMLString, METH_VARARGS, (char *)"ParseXMLString(char pszXMLString) -> CPLXMLNode"},
   21746                 :    { (char *)"SerializeXMLTree", _wrap_SerializeXMLTree, METH_VARARGS, (char *)"SerializeXMLTree(CPLXMLNode xmlnode) -> retStringAndCPLFree"},
   21747                 :    { (char *)"GetDriverCount", _wrap_GetDriverCount, METH_VARARGS, (char *)"GetDriverCount() -> int"},
   21748                 :    { (char *)"GetDriverByName", _wrap_GetDriverByName, METH_VARARGS, (char *)"GetDriverByName(char name) -> Driver"},
   21749                 :    { (char *)"GetDriver", _wrap_GetDriver, METH_VARARGS, (char *)"GetDriver(int i) -> Driver"},
   21750                 :    { (char *)"Open", _wrap_Open, METH_VARARGS, (char *)"Open(char utf8_path, GDALAccess eAccess = GA_ReadOnly) -> Dataset"},
   21751                 :    { (char *)"OpenShared", _wrap_OpenShared, METH_VARARGS, (char *)"OpenShared(char utf8_path, GDALAccess eAccess = GA_ReadOnly) -> Dataset"},
   21752                 :    { (char *)"IdentifyDriver", _wrap_IdentifyDriver, METH_VARARGS, (char *)"IdentifyDriver(char utf8_path, char papszSiblings = None) -> Driver"},
   21753                 :    { (char *)"GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, (char *)"GeneralCmdLineProcessor(char papszArgv, int nOptions = 0) -> char"},
   21754                 :    { NULL, NULL, 0, NULL }
   21755                 : };
   21756                 : 
   21757                 : 
   21758                 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
   21759                 : 
   21760            2443 : static void *_p_GDALDriverShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   21761            2443 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDriverShadow *) x));
   21762                 : }
   21763             522 : static void *_p_GDALDatasetShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   21764             522 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDatasetShadow *) x));
   21765                 : }
   21766             284 : static void *_p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   21767             284 :     return (void *)((GDALMajorObjectShadow *)  ((GDALRasterBandShadow *) x));
   21768                 : }
   21769                 : static swig_type_info _swigt__p_CPLErrorHandler = {"_p_CPLErrorHandler", "CPLErrorHandler *", 0, 0, (void*)0, 0};
   21770                 : static swig_type_info _swigt__p_CPLXMLNode = {"_p_CPLXMLNode", "CPLXMLNode *", 0, 0, (void*)0, 0};
   21771                 : static swig_type_info _swigt__p_GByte = {"_p_GByte", "GByte *", 0, 0, (void*)0, 0};
   21772                 : static swig_type_info _swigt__p_GDALAsyncReaderShadow = {"_p_GDALAsyncReaderShadow", "GDALAsyncReaderShadow *", 0, 0, (void*)0, 0};
   21773                 : static swig_type_info _swigt__p_GDALColorEntry = {"_p_GDALColorEntry", "GDALColorEntry *", 0, 0, (void*)0, 0};
   21774                 : static swig_type_info _swigt__p_GDALColorTableShadow = {"_p_GDALColorTableShadow", "GDALColorTableShadow *", 0, 0, (void*)0, 0};
   21775                 : static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *", 0, 0, (void*)0, 0};
   21776                 : static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *", 0, 0, (void*)0, 0};
   21777                 : static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
   21778                 : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
   21779                 : static swig_type_info _swigt__p_GDALRasterAttributeTableShadow = {"_p_GDALRasterAttributeTableShadow", "GDALRasterAttributeTableShadow *", 0, 0, (void*)0, 0};
   21780                 : static swig_type_info _swigt__p_GDALRasterBandShadow = {"_p_GDALRasterBandShadow", "GDALRasterBandShadow *", 0, 0, (void*)0, 0};
   21781                 : static swig_type_info _swigt__p_GDALTransformerInfoShadow = {"_p_GDALTransformerInfoShadow", "GDALTransformerInfoShadow *", 0, 0, (void*)0, 0};
   21782                 : static swig_type_info _swigt__p_GDAL_GCP = {"_p_GDAL_GCP", "GDAL_GCP *", 0, 0, (void*)0, 0};
   21783                 : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
   21784                 : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
   21785                 : static swig_type_info _swigt__p_StatBuf = {"_p_StatBuf", "StatBuf *", 0, 0, (void*)0, 0};
   21786                 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
   21787                 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
   21788                 : 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};
   21789                 : static swig_type_info _swigt__p_int = {"_p_int", "CPLErr *|GDALRATFieldType *|int *|GDALColorInterp *|GDALAccess *|GDALPaletteInterp *|GDALDataType *|GDALAsyncStatusType *|GDALRATFieldUsage *|GDALResampleAlg *", 0, 0, (void*)0, 0};
   21790                 : static swig_type_info _swigt__p_p_GDALRasterBandShadow = {"_p_p_GDALRasterBandShadow", "GDALRasterBandShadow **", 0, 0, (void*)0, 0};
   21791                 : static swig_type_info _swigt__p_p_GDAL_GCP = {"_p_p_GDAL_GCP", "GDAL_GCP **", 0, 0, (void*)0, 0};
   21792                 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
   21793                 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
   21794                 : static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
   21795                 : static swig_type_info _swigt__p_void = {"_p_void", "VSILFILE *|void *", 0, 0, (void*)0, 0};
   21796                 : 
   21797                 : static swig_type_info *swig_type_initial[] = {
   21798                 :   &_swigt__p_CPLErrorHandler,
   21799                 :   &_swigt__p_CPLXMLNode,
   21800                 :   &_swigt__p_GByte,
   21801                 :   &_swigt__p_GDALAsyncReaderShadow,
   21802                 :   &_swigt__p_GDALColorEntry,
   21803                 :   &_swigt__p_GDALColorTableShadow,
   21804                 :   &_swigt__p_GDALDatasetShadow,
   21805                 :   &_swigt__p_GDALDriverShadow,
   21806                 :   &_swigt__p_GDALMajorObjectShadow,
   21807                 :   &_swigt__p_GDALProgressFunc,
   21808                 :   &_swigt__p_GDALRasterAttributeTableShadow,
   21809                 :   &_swigt__p_GDALRasterBandShadow,
   21810                 :   &_swigt__p_GDALTransformerInfoShadow,
   21811                 :   &_swigt__p_GDAL_GCP,
   21812                 :   &_swigt__p_GIntBig,
   21813                 :   &_swigt__p_OGRLayerShadow,
   21814                 :   &_swigt__p_StatBuf,
   21815                 :   &_swigt__p_char,
   21816                 :   &_swigt__p_double,
   21817                 :   &_swigt__p_f_double_p_q_const__char_p_void__int,
   21818                 :   &_swigt__p_int,
   21819                 :   &_swigt__p_p_GDALRasterBandShadow,
   21820                 :   &_swigt__p_p_GDAL_GCP,
   21821                 :   &_swigt__p_p_char,
   21822                 :   &_swigt__p_p_int,
   21823                 :   &_swigt__p_p_void,
   21824                 :   &_swigt__p_void,
   21825                 : };
   21826                 : 
   21827                 : static swig_cast_info _swigc__p_CPLErrorHandler[] = {  {&_swigt__p_CPLErrorHandler, 0, 0, 0},{0, 0, 0, 0}};
   21828                 : static swig_cast_info _swigc__p_CPLXMLNode[] = {  {&_swigt__p_CPLXMLNode, 0, 0, 0},{0, 0, 0, 0}};
   21829                 : static swig_cast_info _swigc__p_GByte[] = {  {&_swigt__p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   21830                 : static swig_cast_info _swigc__p_GDALAsyncReaderShadow[] = {  {&_swigt__p_GDALAsyncReaderShadow, 0, 0, 0},{0, 0, 0, 0}};
   21831                 : static swig_cast_info _swigc__p_GDALColorEntry[] = {  {&_swigt__p_GDALColorEntry, 0, 0, 0},{0, 0, 0, 0}};
   21832                 : static swig_cast_info _swigc__p_GDALColorTableShadow[] = {  {&_swigt__p_GDALColorTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   21833                 : static swig_cast_info _swigc__p_GDALDatasetShadow[] = {  {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   21834                 : static swig_cast_info _swigc__p_GDALDriverShadow[] = {  {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
   21835                 : 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}};
   21836                 : static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
   21837                 : static swig_cast_info _swigc__p_GDALRasterAttributeTableShadow[] = {  {&_swigt__p_GDALRasterAttributeTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   21838                 : static swig_cast_info _swigc__p_GDALRasterBandShadow[] = {  {&_swigt__p_GDALRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   21839                 : static swig_cast_info _swigc__p_GDALTransformerInfoShadow[] = {  {&_swigt__p_GDALTransformerInfoShadow, 0, 0, 0},{0, 0, 0, 0}};
   21840                 : static swig_cast_info _swigc__p_GDAL_GCP[] = {  {&_swigt__p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   21841                 : static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
   21842                 : static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   21843                 : static swig_cast_info _swigc__p_StatBuf[] = {  {&_swigt__p_StatBuf, 0, 0, 0},{0, 0, 0, 0}};
   21844                 : static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
   21845                 : static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
   21846                 : 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}};
   21847                 : static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
   21848                 : static swig_cast_info _swigc__p_p_GDALRasterBandShadow[] = {  {&_swigt__p_p_GDALRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   21849                 : static swig_cast_info _swigc__p_p_GDAL_GCP[] = {  {&_swigt__p_p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   21850                 : static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
   21851                 : static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
   21852                 : static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
   21853                 : static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
   21854                 : 
   21855                 : static swig_cast_info *swig_cast_initial[] = {
   21856                 :   _swigc__p_CPLErrorHandler,
   21857                 :   _swigc__p_CPLXMLNode,
   21858                 :   _swigc__p_GByte,
   21859                 :   _swigc__p_GDALAsyncReaderShadow,
   21860                 :   _swigc__p_GDALColorEntry,
   21861                 :   _swigc__p_GDALColorTableShadow,
   21862                 :   _swigc__p_GDALDatasetShadow,
   21863                 :   _swigc__p_GDALDriverShadow,
   21864                 :   _swigc__p_GDALMajorObjectShadow,
   21865                 :   _swigc__p_GDALProgressFunc,
   21866                 :   _swigc__p_GDALRasterAttributeTableShadow,
   21867                 :   _swigc__p_GDALRasterBandShadow,
   21868                 :   _swigc__p_GDALTransformerInfoShadow,
   21869                 :   _swigc__p_GDAL_GCP,
   21870                 :   _swigc__p_GIntBig,
   21871                 :   _swigc__p_OGRLayerShadow,
   21872                 :   _swigc__p_StatBuf,
   21873                 :   _swigc__p_char,
   21874                 :   _swigc__p_double,
   21875                 :   _swigc__p_f_double_p_q_const__char_p_void__int,
   21876                 :   _swigc__p_int,
   21877                 :   _swigc__p_p_GDALRasterBandShadow,
   21878                 :   _swigc__p_p_GDAL_GCP,
   21879                 :   _swigc__p_p_char,
   21880                 :   _swigc__p_p_int,
   21881                 :   _swigc__p_p_void,
   21882                 :   _swigc__p_void,
   21883                 : };
   21884                 : 
   21885                 : 
   21886                 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
   21887                 : 
   21888                 : static swig_const_info swig_const_table[] = {
   21889                 : { 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 },
   21890                 : {0, 0, 0, 0.0, 0, 0}};
   21891                 : 
   21892                 : #ifdef __cplusplus
   21893                 : }
   21894                 : #endif
   21895                 : /* -----------------------------------------------------------------------------
   21896                 :  * Type initialization:
   21897                 :  * This problem is tough by the requirement that no dynamic 
   21898                 :  * memory is used. Also, since swig_type_info structures store pointers to 
   21899                 :  * swig_cast_info structures and swig_cast_info structures store pointers back
   21900                 :  * to swig_type_info structures, we need some lookup code at initialization. 
   21901                 :  * The idea is that swig generates all the structures that are needed. 
   21902                 :  * The runtime then collects these partially filled structures. 
   21903                 :  * The SWIG_InitializeModule function takes these initial arrays out of 
   21904                 :  * swig_module, and does all the lookup, filling in the swig_module.types
   21905                 :  * array with the correct data and linking the correct swig_cast_info
   21906                 :  * structures together.
   21907                 :  *
   21908                 :  * The generated swig_type_info structures are assigned staticly to an initial 
   21909                 :  * array. We just loop through that array, and handle each type individually.
   21910                 :  * First we lookup if this type has been already loaded, and if so, use the
   21911                 :  * loaded structure instead of the generated one. Then we have to fill in the
   21912                 :  * cast linked list. The cast data is initially stored in something like a
   21913                 :  * two-dimensional array. Each row corresponds to a type (there are the same
   21914                 :  * number of rows as there are in the swig_type_initial array). Each entry in
   21915                 :  * a column is one of the swig_cast_info structures for that type.
   21916                 :  * The cast_initial array is actually an array of arrays, because each row has
   21917                 :  * a variable number of columns. So to actually build the cast linked list,
   21918                 :  * we find the array of casts associated with the type, and loop through it 
   21919                 :  * adding the casts to the list. The one last trick we need to do is making
   21920                 :  * sure the type pointer in the swig_cast_info struct is correct.
   21921                 :  *
   21922                 :  * First off, we lookup the cast->type name to see if it is already loaded. 
   21923                 :  * There are three cases to handle:
   21924                 :  *  1) If the cast->type has already been loaded AND the type we are adding
   21925                 :  *     casting info to has not been loaded (it is in this module), THEN we
   21926                 :  *     replace the cast->type pointer with the type pointer that has already
   21927                 :  *     been loaded.
   21928                 :  *  2) If BOTH types (the one we are adding casting info to, and the 
   21929                 :  *     cast->type) are loaded, THEN the cast info has already been loaded by
   21930                 :  *     the previous module so we just ignore it.
   21931                 :  *  3) Finally, if cast->type has not already been loaded, then we add that
   21932                 :  *     swig_cast_info to the linked list (because the cast->type) pointer will
   21933                 :  *     be correct.
   21934                 :  * ----------------------------------------------------------------------------- */
   21935                 : 
   21936                 : #ifdef __cplusplus
   21937                 : extern "C" {
   21938                 : #if 0
   21939                 : } /* c-mode */
   21940                 : #endif
   21941                 : #endif
   21942                 : 
   21943                 : #if 0
   21944                 : #define SWIGRUNTIME_DEBUG
   21945                 : #endif
   21946                 : 
   21947                 : 
   21948                 : SWIGRUNTIME void
   21949               6 : SWIG_InitializeModule(void *clientdata) {
   21950                 :   size_t i;
   21951                 :   swig_module_info *module_head, *iter;
   21952                 :   int found, init;
   21953                 :   
   21954               6 :   clientdata = clientdata;
   21955                 :   
   21956                 :   /* check to see if the circular list has been setup, if not, set it up */
   21957               6 :   if (swig_module.next==0) {
   21958                 :     /* Initialize the swig_module */
   21959               6 :     swig_module.type_initial = swig_type_initial;
   21960               6 :     swig_module.cast_initial = swig_cast_initial;
   21961               6 :     swig_module.next = &swig_module;
   21962               6 :     init = 1;
   21963                 :   } else {
   21964               0 :     init = 0;
   21965                 :   }
   21966                 :   
   21967                 :   /* Try and load any already created modules */
   21968               6 :   module_head = SWIG_GetModule(clientdata);
   21969               6 :   if (!module_head) {
   21970                 :     /* This is the first module loaded for this interpreter */
   21971                 :     /* so set the swig module into the interpreter */
   21972                 :     SWIG_SetModule(clientdata, &swig_module);
   21973               6 :     module_head = &swig_module;
   21974                 :   } else {
   21975                 :     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
   21976               0 :     found=0;
   21977               0 :     iter=module_head;
   21978               0 :     do {
   21979               0 :       if (iter==&swig_module) {
   21980               0 :         found=1;
   21981               0 :         break;
   21982                 :       }
   21983               0 :       iter=iter->next;
   21984                 :     } while (iter!= module_head);
   21985                 :     
   21986                 :     /* if the is found in the list, then all is done and we may leave */
   21987               0 :     if (found) return;
   21988                 :     /* otherwise we must add out module into the list */
   21989               0 :     swig_module.next = module_head->next;
   21990               0 :     module_head->next = &swig_module;
   21991                 :   }
   21992                 :   
   21993                 :   /* When multiple interpeters are used, a module could have already been initialized in
   21994                 :        a different interpreter, but not yet have a pointer in this interpreter.
   21995                 :        In this case, we do not want to continue adding types... everything should be
   21996                 :        set up already */
   21997               6 :   if (init == 0) return;
   21998                 :   
   21999                 :   /* Now work on filling in swig_module.types */
   22000                 : #ifdef SWIGRUNTIME_DEBUG
   22001                 :   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
   22002                 : #endif
   22003             168 :   for (i = 0; i < swig_module.size; ++i) {
   22004             162 :     swig_type_info *type = 0;
   22005                 :     swig_type_info *ret;
   22006                 :     swig_cast_info *cast;
   22007                 :     
   22008                 : #ifdef SWIGRUNTIME_DEBUG
   22009                 :     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
   22010                 : #endif
   22011                 :     
   22012                 :     /* if there is another module already loaded */
   22013             162 :     if (swig_module.next != &swig_module) {
   22014               0 :       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
   22015                 :     }
   22016             162 :     if (type) {
   22017                 :       /* Overwrite clientdata field */
   22018                 : #ifdef SWIGRUNTIME_DEBUG
   22019                 :       printf("SWIG_InitializeModule: found type %s\n", type->name);
   22020                 : #endif
   22021               0 :       if (swig_module.type_initial[i]->clientdata) {
   22022               0 :         type->clientdata = swig_module.type_initial[i]->clientdata;
   22023                 : #ifdef SWIGRUNTIME_DEBUG
   22024                 :         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
   22025                 : #endif
   22026                 :       }
   22027                 :     } else {
   22028             162 :       type = swig_module.type_initial[i];
   22029                 :     }
   22030                 :     
   22031                 :     /* Insert casting types */
   22032             162 :     cast = swig_module.cast_initial[i];
   22033             504 :     while (cast->type) {
   22034                 :       /* Don't need to add information already in the list */
   22035             180 :       ret = 0;
   22036                 : #ifdef SWIGRUNTIME_DEBUG
   22037                 :       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
   22038                 : #endif
   22039             180 :       if (swig_module.next != &swig_module) {
   22040               0 :         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
   22041                 : #ifdef SWIGRUNTIME_DEBUG
   22042                 :         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
   22043                 : #endif
   22044                 :       }
   22045             180 :       if (ret) {
   22046               0 :         if (type == swig_module.type_initial[i]) {
   22047                 : #ifdef SWIGRUNTIME_DEBUG
   22048                 :           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
   22049                 : #endif
   22050               0 :           cast->type = ret;
   22051               0 :           ret = 0;
   22052                 :         } else {
   22053                 :           /* Check for casting already in the list */
   22054               0 :           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
   22055                 : #ifdef SWIGRUNTIME_DEBUG
   22056                 :           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
   22057                 : #endif
   22058               0 :           if (!ocast) ret = 0;
   22059                 :         }
   22060                 :       }
   22061                 :       
   22062             180 :       if (!ret) {
   22063                 : #ifdef SWIGRUNTIME_DEBUG
   22064                 :         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
   22065                 : #endif
   22066             180 :         if (type->cast) {
   22067              18 :           type->cast->prev = cast;
   22068              18 :           cast->next = type->cast;
   22069                 :         }
   22070             180 :         type->cast = cast;
   22071                 :       }
   22072             180 :       cast++;
   22073                 :     }
   22074                 :     /* Set entry in modules->types array equal to the type */
   22075             162 :     swig_module.types[i] = type;
   22076                 :   }
   22077               6 :   swig_module.types[i] = 0;
   22078                 :   
   22079                 : #ifdef SWIGRUNTIME_DEBUG
   22080                 :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   22081                 :   for (i = 0; i < swig_module.size; ++i) {
   22082                 :     int j = 0;
   22083                 :     swig_cast_info *cast = swig_module.cast_initial[i];
   22084                 :     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
   22085                 :     while (cast->type) {
   22086                 :       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
   22087                 :       cast++;
   22088                 :       ++j;
   22089                 :     }
   22090                 :     printf("---- Total casts: %d\n",j);
   22091                 :   }
   22092                 :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   22093                 : #endif
   22094                 : }
   22095                 : 
   22096                 : /* This function will propagate the clientdata field of type to
   22097                 : * any new swig_type_info structures that have been added into the list
   22098                 : * of equivalent types.  It is like calling
   22099                 : * SWIG_TypeClientData(type, clientdata) a second time.
   22100                 : */
   22101                 : SWIGRUNTIME void
   22102                 : SWIG_PropagateClientData(void) {
   22103                 :   size_t i;
   22104                 :   swig_cast_info *equiv;
   22105                 :   static int init_run = 0;
   22106                 :   
   22107                 :   if (init_run) return;
   22108                 :   init_run = 1;
   22109                 :   
   22110                 :   for (i = 0; i < swig_module.size; i++) {
   22111                 :     if (swig_module.types[i]->clientdata) {
   22112                 :       equiv = swig_module.types[i]->cast;
   22113                 :       while (equiv) {
   22114                 :         if (!equiv->converter) {
   22115                 :           if (equiv->type && !equiv->type->clientdata)
   22116                 :           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
   22117                 :         }
   22118                 :         equiv = equiv->next;
   22119                 :       }
   22120                 :     }
   22121                 :   }
   22122                 : }
   22123                 : 
   22124                 : #ifdef __cplusplus
   22125                 : #if 0
   22126                 : {
   22127                 :   /* c-mode */
   22128                 : #endif
   22129                 : }
   22130                 : #endif
   22131                 : 
   22132                 : 
   22133                 : 
   22134                 : #ifdef __cplusplus
   22135                 : extern "C" {
   22136                 : #endif
   22137                 :   
   22138                 :   /* Python-specific SWIG API */
   22139                 : #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
   22140                 : #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
   22141                 : #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
   22142                 :   
   22143                 :   /* -----------------------------------------------------------------------------
   22144                 :    * global variable support code.
   22145                 :    * ----------------------------------------------------------------------------- */
   22146                 :   
   22147                 :   typedef struct swig_globalvar {
   22148                 :     char       *name;                  /* Name of global variable */
   22149                 :     PyObject *(*get_attr)(void);       /* Return the current value */
   22150                 :     int       (*set_attr)(PyObject *); /* Set the value */
   22151                 :     struct swig_globalvar *next;
   22152                 :   } swig_globalvar;
   22153                 :   
   22154                 :   typedef struct swig_varlinkobject {
   22155                 :     PyObject_HEAD
   22156                 :     swig_globalvar *vars;
   22157                 :   } swig_varlinkobject;
   22158                 :   
   22159                 :   SWIGINTERN PyObject *
   22160                 :   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
   22161                 : #if PY_VERSION_HEX >= 0x03000000
   22162                 :     return PyUnicode_InternFromString("<Swig global variables>");
   22163                 : #else
   22164                 :     return PyString_FromString("<Swig global variables>");
   22165                 : #endif
   22166                 :   }
   22167                 :   
   22168                 :   SWIGINTERN PyObject *
   22169                 :   swig_varlink_str(swig_varlinkobject *v) {
   22170                 : #if PY_VERSION_HEX >= 0x03000000
   22171                 :     PyObject *str = PyUnicode_InternFromString("(");
   22172                 :     PyObject *tail;
   22173                 :     PyObject *joined;
   22174                 :     swig_globalvar *var;
   22175                 :     for (var = v->vars; var; var=var->next) {
   22176                 :       tail = PyUnicode_FromString(var->name);
   22177                 :       joined = PyUnicode_Concat(str, tail);
   22178                 :       Py_DecRef(str);
   22179                 :       Py_DecRef(tail);
   22180                 :       str = joined;
   22181                 :       if (var->next) {
   22182                 :         tail = PyUnicode_InternFromString(", ");
   22183                 :         joined = PyUnicode_Concat(str, tail);
   22184                 :         Py_DecRef(str);
   22185                 :         Py_DecRef(tail);
   22186                 :         str = joined;
   22187                 :       }
   22188                 :     }
   22189                 :     tail = PyUnicode_InternFromString(")");
   22190                 :     joined = PyUnicode_Concat(str, tail);
   22191                 :     Py_DecRef(str);
   22192                 :     Py_DecRef(tail);
   22193                 :     str = joined;
   22194                 : #else
   22195                 :     PyObject *str = PyString_FromString("(");
   22196                 :     swig_globalvar *var;
   22197                 :     for (var = v->vars; var; var=var->next) {
   22198                 :       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
   22199                 :       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
   22200                 :     }
   22201                 :     PyString_ConcatAndDel(&str,PyString_FromString(")"));
   22202                 : #endif
   22203                 :     return str;
   22204                 :   }
   22205                 :   
   22206                 :   SWIGINTERN int
   22207                 :   swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
   22208                 :     char *tmp;
   22209                 :     PyObject *str = swig_varlink_str(v);
   22210                 :     fprintf(fp,"Swig global variables ");
   22211                 :     fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
   22212                 :     SWIG_Python_str_DelForPy3(tmp);
   22213                 :     Py_DECREF(str);
   22214                 :     return 0;
   22215                 :   }
   22216                 :   
   22217                 :   SWIGINTERN void
   22218                 :   swig_varlink_dealloc(swig_varlinkobject *v) {
   22219                 :     swig_globalvar *var = v->vars;
   22220                 :     while (var) {
   22221                 :       swig_globalvar *n = var->next;
   22222                 :       free(var->name);
   22223                 :       free(var);
   22224                 :       var = n;
   22225                 :     }
   22226                 :   }
   22227                 :   
   22228                 :   SWIGINTERN PyObject *
   22229                 :   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
   22230                 :     PyObject *res = NULL;
   22231                 :     swig_globalvar *var = v->vars;
   22232                 :     while (var) {
   22233                 :       if (strcmp(var->name,n) == 0) {
   22234                 :         res = (*var->get_attr)();
   22235                 :         break;
   22236                 :       }
   22237                 :       var = var->next;
   22238                 :     }
   22239                 :     if (res == NULL && !PyErr_Occurred()) {
   22240                 :       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
   22241                 :     }
   22242                 :     return res;
   22243                 :   }
   22244                 :   
   22245                 :   SWIGINTERN int
   22246                 :   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
   22247                 :     int res = 1;
   22248                 :     swig_globalvar *var = v->vars;
   22249                 :     while (var) {
   22250                 :       if (strcmp(var->name,n) == 0) {
   22251                 :         res = (*var->set_attr)(p);
   22252                 :         break;
   22253                 :       }
   22254                 :       var = var->next;
   22255                 :     }
   22256                 :     if (res == 1 && !PyErr_Occurred()) {
   22257                 :       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
   22258                 :     }
   22259                 :     return res;
   22260                 :   }
   22261                 :   
   22262                 :   SWIGINTERN PyTypeObject*
   22263                 :   swig_varlink_type(void) {
   22264                 :     static char varlink__doc__[] = "Swig var link object";
   22265                 :     static PyTypeObject varlink_type;
   22266                 :     static int type_init = 0;  
   22267                 :     if (!type_init) {
   22268                 :       const PyTypeObject tmp
   22269                 :       = {
   22270                 :         /* PyObject header changed in Python 3 */
   22271                 : #if PY_VERSION_HEX >= 0x03000000
   22272                 :         PyVarObject_HEAD_INIT(&PyType_Type, 0)
   22273                 : #else
   22274                 :         PyObject_HEAD_INIT(NULL)
   22275                 :         0,                                  /* Number of items in variable part (ob_size) */
   22276                 : #endif
   22277                 :         (char *)"swigvarlink",              /* Type name (tp_name) */
   22278                 :         sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
   22279                 :         0,                                  /* Itemsize (tp_itemsize) */
   22280                 :         (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
   22281                 :         (printfunc) swig_varlink_print,     /* Print (tp_print) */
   22282                 :         (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
   22283                 :         (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
   22284                 :         0,                                  /* tp_compare */
   22285                 :         (reprfunc) swig_varlink_repr,       /* tp_repr */
   22286                 :         0,                                  /* tp_as_number */
   22287                 :         0,                                  /* tp_as_sequence */
   22288                 :         0,                                  /* tp_as_mapping */
   22289                 :         0,                                  /* tp_hash */
   22290                 :         0,                                  /* tp_call */
   22291                 :         (reprfunc) swig_varlink_str,        /* tp_str */
   22292                 :         0,                                  /* tp_getattro */
   22293                 :         0,                                  /* tp_setattro */
   22294                 :         0,                                  /* tp_as_buffer */
   22295                 :         0,                                  /* tp_flags */
   22296                 :         varlink__doc__,                     /* tp_doc */
   22297                 :         0,                                  /* tp_traverse */
   22298                 :         0,                                  /* tp_clear */
   22299                 :         0,                                  /* tp_richcompare */
   22300                 :         0,                                  /* tp_weaklistoffset */
   22301                 : #if PY_VERSION_HEX >= 0x02020000
   22302                 :         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
   22303                 : #endif
   22304                 : #if PY_VERSION_HEX >= 0x02030000
   22305                 :         0,                                  /* tp_del */
   22306                 : #endif
   22307                 : #ifdef COUNT_ALLOCS
   22308                 :         0,0,0,0                             /* tp_alloc -> tp_next */
   22309                 : #endif
   22310                 :       };
   22311                 :       varlink_type = tmp;
   22312                 :       /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
   22313                 : #if PY_VERSION_HEX < 0x03000000
   22314                 :       varlink_type.ob_type = &PyType_Type;
   22315                 : #endif
   22316                 :       type_init = 1;
   22317                 :     }
   22318                 :     return &varlink_type;
   22319                 :   }
   22320                 :   
   22321                 :   /* Create a variable linking object for use later */
   22322                 :   SWIGINTERN PyObject *
   22323                 :   SWIG_Python_newvarlink(void) {
   22324                 :     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
   22325                 :     if (result) {
   22326                 :       result->vars = 0;
   22327                 :     }
   22328                 :     return ((PyObject*) result);
   22329                 :   }
   22330                 :   
   22331                 :   SWIGINTERN void 
   22332                 :   SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
   22333                 :     swig_varlinkobject *v = (swig_varlinkobject *) p;
   22334                 :     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
   22335                 :     if (gv) {
   22336                 :       size_t size = strlen(name)+1;
   22337                 :       gv->name = (char *)malloc(size);
   22338                 :       if (gv->name) {
   22339                 :         strncpy(gv->name,name,size);
   22340                 :         gv->get_attr = get_attr;
   22341                 :         gv->set_attr = set_attr;
   22342                 :         gv->next = v->vars;
   22343                 :       }
   22344                 :     }
   22345                 :     v->vars = gv;
   22346                 :   }
   22347                 :   
   22348                 :   SWIGINTERN PyObject *
   22349                 :   SWIG_globals(void) {
   22350                 :     static PyObject *_SWIG_globals = 0; 
   22351                 :     if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
   22352                 :     return _SWIG_globals;
   22353                 :   }
   22354                 :   
   22355                 :   /* -----------------------------------------------------------------------------
   22356                 :    * constants/methods manipulation
   22357                 :    * ----------------------------------------------------------------------------- */
   22358                 :   
   22359                 :   /* Install Constants */
   22360                 :   SWIGINTERN void
   22361               6 :   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
   22362               6 :     PyObject *obj = 0;
   22363                 :     size_t i;
   22364              12 :     for (i = 0; constants[i].type; ++i) {
   22365               6 :       switch(constants[i].type) {
   22366                 :       case SWIG_PY_POINTER:
   22367               6 :         obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
   22368               6 :         break;
   22369                 :       case SWIG_PY_BINARY:
   22370               0 :         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
   22371               0 :         break;
   22372                 :       default:
   22373               0 :         obj = 0;
   22374                 :         break;
   22375                 :       }
   22376               6 :       if (obj) {
   22377               6 :         PyDict_SetItemString(d, constants[i].name, obj);
   22378               6 :         Py_DECREF(obj);
   22379                 :       }
   22380                 :     }
   22381               6 :   }
   22382                 :   
   22383                 :   /* -----------------------------------------------------------------------------*/
   22384                 :   /* Fix SwigMethods to carry the callback ptrs when needed */
   22385                 :   /* -----------------------------------------------------------------------------*/
   22386                 :   
   22387                 :   SWIGINTERN void
   22388               6 :   SWIG_Python_FixMethods(PyMethodDef *methods,
   22389                 :     swig_const_info *const_table,
   22390                 :     swig_type_info **types,
   22391                 :     swig_type_info **types_initial) {
   22392                 :     size_t i;
   22393            1668 :     for (i = 0; methods[i].ml_name; ++i) {
   22394            1662 :       const char *c = methods[i].ml_doc;
   22395            3252 :       if (c && (c = strstr(c, "swig_ptr: "))) {
   22396                 :         int j;
   22397               0 :         swig_const_info *ci = 0;
   22398               0 :         const char *name = c + 10;
   22399               0 :         for (j = 0; const_table[j].type; ++j) {
   22400               0 :           if (strncmp(const_table[j].name, name, 
   22401               0 :               strlen(const_table[j].name)) == 0) {
   22402               0 :             ci = &(const_table[j]);
   22403               0 :             break;
   22404                 :           }
   22405                 :         }
   22406               0 :         if (ci) {
   22407               0 :           size_t shift = (ci->ptype) - types;
   22408               0 :           swig_type_info *ty = types_initial[shift];
   22409               0 :           size_t ldoc = (c - methods[i].ml_doc);
   22410               0 :           size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
   22411               0 :           char *ndoc = (char*)malloc(ldoc + lptr + 10);
   22412               0 :           if (ndoc) {
   22413               0 :             char *buff = ndoc;
   22414               0 :             void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
   22415               0 :             if (ptr) {
   22416               0 :               strncpy(buff, methods[i].ml_doc, ldoc);
   22417               0 :               buff += ldoc;
   22418                 :               strncpy(buff, "swig_ptr: ", 10);
   22419               0 :               buff += 10;
   22420               0 :               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
   22421               0 :               methods[i].ml_doc = ndoc;
   22422                 :             }
   22423                 :           }
   22424                 :         }
   22425                 :       }
   22426                 :     }
   22427               6 :   } 
   22428                 :   
   22429                 : #ifdef __cplusplus
   22430                 : }
   22431                 : #endif
   22432                 : 
   22433                 : /* -----------------------------------------------------------------------------*
   22434                 :  *  Partial Init method
   22435                 :  * -----------------------------------------------------------------------------*/
   22436                 : 
   22437                 : #ifdef __cplusplus
   22438                 : extern "C"
   22439                 : #endif
   22440                 : 
   22441                 : SWIGEXPORT 
   22442                 : #if PY_VERSION_HEX >= 0x03000000
   22443                 : PyObject*
   22444                 : #else
   22445                 : void
   22446                 : #endif
   22447               6 : SWIG_init(void) {
   22448                 :   PyObject *m, *d;  
   22449                 : #if PY_VERSION_HEX >= 0x03000000
   22450                 :   static struct PyModuleDef SWIG_module = {
   22451                 :     PyModuleDef_HEAD_INIT,
   22452                 :     (char *) SWIG_name,
   22453                 :     NULL,
   22454                 :     -1,
   22455                 :     SwigMethods,
   22456                 :     NULL,
   22457                 :     NULL,
   22458                 :     NULL,
   22459                 :     NULL
   22460                 :   };
   22461                 : #endif
   22462                 :   
   22463                 :   /* Fix SwigMethods to carry the callback ptrs when needed */
   22464               6 :   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   22465                 :   
   22466                 : #if PY_VERSION_HEX >= 0x03000000
   22467                 :   m = PyModule_Create(&SWIG_module);
   22468                 : #else
   22469               6 :   m = Py_InitModule((char *) SWIG_name, SwigMethods);
   22470                 : #endif
   22471               6 :   d = PyModule_GetDict(m);
   22472                 :   
   22473               6 :   SWIG_InitializeModule(0);
   22474               6 :   SWIG_InstallConstants(d,swig_const_table);
   22475                 :   
   22476                 :   
   22477                 :   
   22478                 :   /* gdal_python.i %init code */
   22479               6 :   if ( GDALGetDriverCount() == 0 ) {
   22480               6 :     GDALAllRegister();
   22481                 :   }
   22482                 :   
   22483               6 :   SWIG_Python_SetConstant(d, "VSI_STAT_EXISTS_FLAG",SWIG_From_int(static_cast< int >(0x1)));
   22484               6 :   SWIG_Python_SetConstant(d, "VSI_STAT_NATURE_FLAG",SWIG_From_int(static_cast< int >(0x2)));
   22485               6 :   SWIG_Python_SetConstant(d, "VSI_STAT_SIZE_FLAG",SWIG_From_int(static_cast< int >(0x4)));
   22486                 :   
   22487                 : #if PY_VERSION_HEX >= 0x03000000
   22488                 :   return m;
   22489                 : #else
   22490                 :   return;
   22491                 : #endif
   22492              12 : }
   22493                 : 

Generated by: LCOV version 1.7