LCOV - code coverage report
Current view: directory - swig/python/extensions - gdal_wrap.cpp (source / functions) Found Hit Coverage
Test: gdal_filtered.info Lines: 11014 6396 58.1 %
Date: 2013-03-30 Functions: 437 319 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            3329 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
     427            3329 :   if (ty) {
     428            3329 :     swig_cast_info *iter = ty->cast;
     429            6996 :     while (iter) {
     430            3667 :       if (strcmp(iter->type->name, c) == 0) {
     431            3329 :         if (iter == ty->cast)
     432            3059 :           return iter;
     433                 :         /* Move iter to the top of the linked list */
     434             270 :         iter->prev->next = iter->next;
     435             270 :         if (iter->next)
     436             270 :           iter->next->prev = iter->prev;
     437             270 :         iter->next = ty->cast;
     438             270 :         iter->prev = 0;
     439             270 :         if (ty->cast) ty->cast->prev = iter;
     440             270 :         ty->cast = iter;
     441             270 :         return iter;
     442                 :       }
     443             338 :       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            3329 :   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             132 : SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
     533             132 :   swig_cast_info *cast = ti->cast;
     534                 :   /* if (ti->clientdata == clientdata) return; */
     535             132 :   ti->clientdata = clientdata;
     536                 :   
     537             432 :   while (cast) {
     538             168 :     if (!cast->converter) {
     539             132 :       swig_type_info *tc = cast->type;
     540             132 :       if (!tc->clientdata) {
     541               0 :   SWIG_TypeClientData(tc, clientdata);
     542                 :       }
     543                 :     }    
     544             168 :     cast = cast->next;
     545                 :   }
     546             132 : }
     547                 : SWIGRUNTIME void
     548                 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
     549             132 :   SWIG_TypeClientData(ti, clientdata);
     550             132 :   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               7 : SWIG_MangledTypeQueryModule(swig_module_info *start, 
     563                 :                             swig_module_info *end, 
     564                 :                 const char *name) {
     565               7 :   swig_module_info *iter = start;
     566               0 :   do {
     567               7 :     if (iter->size) {
     568               7 :       register size_t l = 0;
     569               7 :       register size_t r = iter->size - 1;
     570              28 :       do {
     571                 :   /* since l+r >= 0, we can (>> 1) instead (/ 2) */
     572              35 :   register size_t i = (l + r) >> 1; 
     573              35 :   const char *iname = iter->types[i]->name;
     574              35 :   if (iname) {
     575              35 :     register int compare = strcmp(name, iname);
     576              35 :     if (compare == 0) {     
     577               7 :       return iter->types[i];
     578              28 :     } else if (compare < 0) {
     579              14 :       if (i) {
     580              14 :         r = i - 1;
     581                 :       } else {
     582                 :         break;
     583                 :       }
     584              14 :     } else if (compare > 0) {
     585              14 :       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               7 : 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               7 :   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
     612               7 :   if (ret) {
     613               7 :     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              12 :   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              36 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
    1172              36 :   PyDict_SetItemString(d, (char*) name, obj);
    1173              36 :   Py_DECREF(obj);                            
    1174              36 : }
    1175                 : 
    1176                 : /* Append a value to the result obj */
    1177                 : 
    1178                 : SWIGINTERN PyObject*
    1179            2556 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
    1180                 : #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
    1181            2556 :   if (!result) {
    1182              82 :     result = obj;
    1183            2474 :   } else if (result == Py_None) {
    1184            2173 :     Py_DECREF(result);
    1185            2173 :     result = obj;
    1186                 :   } else {
    1187             301 :     if (!PyList_Check(result)) {
    1188             134 :       PyObject *o2 = result;
    1189             134 :       result = PyList_New(1);
    1190             134 :       PyList_SetItem(result, 0, o2);
    1191                 :     }
    1192             301 :     PyList_Append(result,obj);
    1193             301 :     Py_DECREF(obj);
    1194                 :   }
    1195            2556 :   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           38404 :   PyObject *none = Py_None;
    1330           38404 :   Py_INCREF(none);
    1331           38404 :   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             132 : SwigPyClientData_New(PyObject* obj)
    1362                 : {
    1363             132 :   if (!obj) {
    1364               0 :     return 0;
    1365                 :   } else {
    1366             132 :     SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    1367                 :     /* the klass element */
    1368             132 :     data->klass = obj;
    1369             132 :     Py_INCREF(data->klass);
    1370                 :     /* the newraw method and newargs arguments used to create a new raw instance */
    1371             132 :     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             132 :       data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
    1380                 : #endif
    1381             132 :       if (data->newraw) {
    1382             132 :   Py_INCREF(data->newraw);
    1383             132 :   data->newargs = PyTuple_New(1);
    1384             132 :   PyTuple_SetItem(data->newargs, 0, obj);
    1385                 :       } else {
    1386               0 :   data->newargs = obj;
    1387                 :       }
    1388             132 :       Py_INCREF(data->newargs);
    1389                 :     }
    1390                 :     /* the destroy method, aka as the C++ delete method */
    1391             132 :     data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
    1392             132 :     if (PyErr_Occurred()) {
    1393              36 :       PyErr_Clear();
    1394              36 :       data->destroy = 0;
    1395                 :     }
    1396             132 :     if (data->destroy) {
    1397                 :       int flags;
    1398              96 :       Py_INCREF(data->destroy);
    1399              96 :       flags = PyCFunction_GET_FLAGS(data->destroy);
    1400                 : #ifdef METH_O
    1401              96 :       data->delargs = !(flags & (METH_O));
    1402                 : #else
    1403                 :       data->delargs = 0;
    1404                 : #endif
    1405                 :     } else {
    1406              36 :       data->delargs = 0;
    1407                 :     }
    1408             132 :     data->implicitconv = 0;
    1409             132 :     return data;
    1410                 :   }
    1411                 : }
    1412                 : 
    1413                 : SWIGRUNTIME void 
    1414                 : SwigPyClientData_Del(SwigPyClientData* data)
    1415                 : {
    1416             134 :   Py_XDECREF(data->newraw);
    1417             134 :   Py_XDECREF(data->newargs);
    1418             134 :   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         2762016 : SwigPyObject_type(void) {
    1556         2762016 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
    1557         2762016 :   return type;
    1558                 : }
    1559                 : 
    1560                 : SWIGRUNTIMEINLINE int
    1561         2288000 : SwigPyObject_Check(PyObject *op) {
    1562                 :   return (Py_TYPE(op) == SwigPyObject_type())
    1563         2288000 :     || (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          237008 : SwigPyObject_dealloc(PyObject *v)
    1571                 : {
    1572          237008 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1573          237008 :   PyObject *next = sobj->next;
    1574          237008 :   if (sobj->own == SWIG_POINTER_OWN) {
    1575           23997 :     swig_type_info *ty = sobj->ty;
    1576           23997 :     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    1577           23997 :     PyObject *destroy = data ? data->destroy : 0;
    1578           23997 :     if (destroy) {
    1579                 :       /* destroy is always a VARARGS method */
    1580                 :       PyObject *res;
    1581           23997 :       if (data->delargs) {
    1582                 :   /* we need to create a temporary object to carry the destroy operation */
    1583           23997 :   PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
    1584           23997 :   res = SWIG_Python_CallFunctor(destroy, tmp);
    1585           23997 :   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           23997 :       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          237008 :   Py_XDECREF(next);
    1601          237008 :   PyObject_DEL(v);
    1602          237008 : }
    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              12 : _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              12 :   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              12 :       };
    1851              12 :     swigpyobject_type = tmp;
    1852                 :     /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
    1853                 : #if PY_VERSION_HEX < 0x03000000
    1854              12 :     swigpyobject_type.ob_type = &PyType_Type;
    1855                 : #endif
    1856              12 :     type_init = 1;
    1857                 :   }
    1858              12 :   return &swigpyobject_type;
    1859                 : }
    1860                 : 
    1861                 : SWIGRUNTIME PyObject *
    1862          237008 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    1863                 : {
    1864          237008 :   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    1865          237008 :   if (sobj) {
    1866          237008 :     sobj->ptr  = ptr;
    1867          237008 :     sobj->ty   = ty;
    1868          237008 :     sobj->own  = own;
    1869          237008 :     sobj->next = 0;
    1870                 :   }
    1871          237008 :   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              12 :     return SWIG_Python_str_FromChar("this");
    2076                 : }
    2077                 : 
    2078                 : SWIGRUNTIME PyObject *
    2079         1344626 : SWIG_This(void)
    2080                 : {
    2081         1344638 :   static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
    2082         1344626 :   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         1156349 : SWIG_Python_GetSwigThis(PyObject *pyobj) 
    2094                 : {
    2095         1156349 :   if (SwigPyObject_Check(pyobj)) {
    2096           24251 :     return (SwigPyObject *) pyobj;
    2097                 :   } else {
    2098         1132098 :     PyObject *obj = 0;
    2099                 : #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
    2100         1132098 :     if (PyInstance_Check(pyobj)) {
    2101               0 :       obj = _PyInstance_Lookup(pyobj, SWIG_This());      
    2102                 :     } else {
    2103         1132098 :       PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    2104         1132098 :       if (dictptr != NULL) {
    2105         1132021 :   PyObject *dict = *dictptr;
    2106         1132021 :   obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
    2107                 :       } else {
    2108                 : #ifdef PyWeakref_CheckProxy
    2109              77 :   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              77 :   obj = PyObject_GetAttr(pyobj,SWIG_This());
    2115              77 :   if (obj) {
    2116               0 :     Py_DECREF(obj);
    2117                 :   } else {
    2118              77 :     if (PyErr_Occurred()) PyErr_Clear();
    2119              77 :     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         1132021 :     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         1132021 :     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         1156646 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
    2160         1156646 :   if (!obj) return SWIG_ERROR;
    2161         1156646 :   if (obj == Py_None) {
    2162             301 :     if (ptr) *ptr = 0;
    2163             301 :     return SWIG_OK;
    2164                 :   } else {
    2165         1156345 :     SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    2166         1156345 :     if (own)
    2167               0 :       *own = 0;
    2168         1156345 :     while (sobj) {
    2169         1155898 :       void *vptr = sobj->ptr;
    2170         1155898 :       if (ty) {
    2171         1155654 :   swig_type_info *to = sobj->ty;
    2172         1155654 :   if (to == ty) {
    2173                 :     /* no type cast needed */
    2174         1152325 :     if (ptr) *ptr = vptr;
    2175                 :     break;
    2176                 :   } else {
    2177            3329 :     swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    2178            3329 :     if (!tc) {
    2179               0 :       sobj = (SwigPyObject *)sobj->next;
    2180                 :     } else {
    2181            3329 :       if (ptr) {
    2182            3329 :               int newmemory = 0;
    2183            3329 :               *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
    2184            3329 :               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             244 :   if (ptr) *ptr = vptr;
    2195                 :   break;
    2196                 :       }
    2197                 :     }
    2198         1156345 :     if (sobj) {
    2199         1155898 :       if (own)
    2200               0 :         *own = *own | sobj->own;
    2201         1155898 :       if (flags & SWIG_POINTER_DISOWN) {
    2202           23997 :   sobj->own = 0;
    2203                 :       }
    2204         1155898 :       return SWIG_OK;
    2205                 :     } else {
    2206             447 :       int res = SWIG_ERROR;
    2207             447 :       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             447 :       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          212864 : SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
    2306                 : {
    2307                 : #if (PY_VERSION_HEX >= 0x02020000)
    2308          212864 :   PyObject *inst = 0;
    2309          212864 :   PyObject *newraw = data->newraw;
    2310          212864 :   if (newraw) {
    2311          212864 :     inst = PyObject_Call(newraw, data->newargs, NULL);
    2312          212864 :     if (inst) {
    2313                 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
    2314          212864 :       PyObject **dictptr = _PyObject_GetDictPtr(inst);
    2315          212864 :       if (dictptr != NULL) {
    2316          212864 :   PyObject *dict = *dictptr;
    2317          212864 :   if (dict == NULL) {
    2318          212864 :     dict = PyDict_New();
    2319          212864 :     *dictptr = dict;
    2320          212864 :     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          212864 :   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          215379 : SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
    2415          215379 :   if (!ptr) {
    2416            2368 :     return SWIG_Py_Void();
    2417                 :   } else {
    2418          213011 :     int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2419          213011 :     PyObject *robj = SwigPyObject_New(ptr, type, own);
    2420          213011 :     SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    2421          213011 :     if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    2422          212864 :       PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    2423          212864 :       if (inst) {
    2424          212864 :   Py_DECREF(robj);
    2425          212864 :   robj = inst;
    2426                 :       }
    2427                 :     }
    2428          213011 :     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              12 :   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              12 :             (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
    2460                 : #endif
    2461              12 :     if (PyErr_Occurred()) {
    2462              12 :       PyErr_Clear();
    2463              12 :       type_pointer = (void *)0;
    2464                 :     }
    2465                 : #endif
    2466                 :   }
    2467              12 :   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              12 : SWIG_Python_DestroyModule(void *vptr)
    2518                 : {
    2519              12 :   swig_module_info *swig_module = (swig_module_info *) vptr;
    2520              12 :   swig_type_info **types = swig_module->types;
    2521                 :   size_t i;
    2522                 : #endif
    2523             336 :   for (i =0; i < swig_module->size; ++i) {
    2524             324 :     swig_type_info *ty = types[i];
    2525             324 :     if (ty->owndata) {
    2526             134 :       SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
    2527             134 :       if (data) SwigPyClientData_Del(data);
    2528                 :     }
    2529                 :   }
    2530              12 :   Py_DECREF(SWIG_This());
    2531              12 : }
    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              12 :   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              12 :   PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
    2550                 : #endif
    2551              12 :   if (pointer && module) {
    2552              12 :     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                 : #include "cpl_http.h"
    2857                 : 
    2858                 : #include "gdal.h"
    2859                 : #include "gdal_priv.h"
    2860                 : #include "gdal_alg.h"
    2861                 : #include "gdalwarper.h"
    2862                 : 
    2863                 : typedef void GDALMajorObjectShadow;
    2864                 : typedef void GDALDriverShadow;
    2865                 : typedef void GDALDatasetShadow;
    2866                 : typedef void GDALRasterBandShadow;
    2867                 : typedef void GDALColorTableShadow;
    2868                 : typedef void GDALRasterAttributeTableShadow;
    2869                 : typedef void GDALTransformerInfoShadow;
    2870                 : typedef void GDALAsyncReaderShadow;
    2871                 : 
    2872                 : /* use this to not return the int returned by GDAL */
    2873                 : typedef int RETURN_NONE;
    2874                 : 
    2875                 : 
    2876                 : 
    2877                 : int bUseExceptions=0;
    2878                 : CPLErrorHandler pfnPreviousHandler = CPLDefaultErrorHandler;
    2879                 : 
    2880                 : void CPL_STDCALL 
    2881               1 : PythonBindingErrorHandler(CPLErr eclass, int code, const char *msg ) 
    2882                 : {
    2883                 :   /* 
    2884                 :   ** Generally we want to supress error reporting if we have exceptions
    2885                 :   ** enabled as the error message will be in the exception thrown in 
    2886                 :   ** Python.  
    2887                 :   */
    2888                 : 
    2889                 :   /* If the error class is CE_Fatal, we want to have a message issued
    2890                 :      because the CPL support code does an abort() before any exception
    2891                 :      can be generated */
    2892               1 :   if (eclass == CE_Fatal ) {
    2893               0 :     pfnPreviousHandler(eclass, code, msg );
    2894                 :   }
    2895                 : 
    2896                 :   /*
    2897                 :   ** We do not want to interfere with warnings or debug messages since
    2898                 :   ** they won't be translated into exceptions.
    2899                 :   */
    2900               1 :   if (eclass == CE_Warning || eclass == CE_Debug ) {
    2901               0 :     pfnPreviousHandler(eclass, code, msg );
    2902                 :   }
    2903               1 : }
    2904                 : 
    2905                 : 
    2906                 : 
    2907               1 : int GetUseExceptions() {
    2908               1 :   return bUseExceptions;
    2909                 : }
    2910                 : 
    2911               1 : void UseExceptions() {
    2912               1 :   bUseExceptions = 1;
    2913                 :   pfnPreviousHandler = 
    2914               1 :     CPLSetErrorHandler( (CPLErrorHandler) PythonBindingErrorHandler );
    2915               1 : }
    2916                 : 
    2917               1 : void DontUseExceptions() {
    2918               1 :   bUseExceptions = 0;
    2919               1 :   CPLSetErrorHandler( pfnPreviousHandler );
    2920               1 : }
    2921                 : 
    2922                 : 
    2923                 :   #define SWIG_From_long   PyInt_FromLong 
    2924                 : 
    2925                 : 
    2926                 : SWIGINTERNINLINE PyObject *
    2927                 : SWIG_From_int  (int value)
    2928                 : {    
    2929          896468 :   return SWIG_From_long  (value);
    2930                 : }
    2931                 : 
    2932                 : 
    2933                 : 
    2934                 : /* Return a PyObject* from a NULL terminated C String */
    2935           34696 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
    2936                 : {
    2937           34696 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    2938         2636204 :   while(*pszIter != 0)
    2939                 :   {
    2940         2566836 :     if (*pszIter > 127)
    2941                 :     {
    2942              24 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "ignore");
    2943              24 :         if (pyObj != NULL)
    2944              24 :             return pyObj;
    2945                 : #if PY_VERSION_HEX >= 0x03000000
    2946                 :         return PyBytes_FromString(pszStr);
    2947                 : #else
    2948               0 :         return PyString_FromString(pszStr);
    2949                 : #endif
    2950                 :     }
    2951         2566812 :     pszIter ++;
    2952                 :   }
    2953                 : #if PY_VERSION_HEX >= 0x03000000
    2954                 :   return PyUnicode_FromString(pszStr); 
    2955                 : #else
    2956           34672 :   return PyString_FromString(pszStr);
    2957                 : #endif
    2958                 : }
    2959                 : 
    2960                 : /* Return a NULL terminated c String from a PyObject */
    2961                 : /* Result must be freed with GDALPythonFreeCStr */
    2962           24343 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
    2963                 : {
    2964           24343 :   *pbToFree = 0;
    2965           24343 :   if (PyUnicode_Check(pyObject))
    2966                 :   {
    2967                 :       char *pszStr;
    2968                 :       char *pszNewStr;
    2969                 :       Py_ssize_t nLen;
    2970               3 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
    2971                 : #if PY_VERSION_HEX >= 0x03000000
    2972                 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    2973                 : #else
    2974               3 :       PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    2975                 : #endif
    2976               3 :       pszNewStr = (char *) malloc(nLen+1);
    2977               3 :       memcpy(pszNewStr, pszStr, nLen+1);
    2978               3 :       Py_XDECREF(pyUTF8Str);
    2979               3 :       *pbToFree = 1;
    2980               3 :       return pszNewStr;
    2981                 :   }
    2982                 :   else 
    2983                 :   {
    2984                 : #if PY_VERSION_HEX >= 0x03000000
    2985                 :       return PyBytes_AsString(pyObject);
    2986                 : #else
    2987           24340 :       return PyString_AsString(pyObject);
    2988                 : #endif
    2989                 :   }
    2990                 : }
    2991                 : 
    2992           24343 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
    2993                 : {
    2994           24343 :    if (bToFree)
    2995               3 :        free(ptr);
    2996           24343 : }
    2997                 : 
    2998                 : 
    2999                 : 
    3000              35 : int wrapper_VSIFReadL( void **buf, int nMembSize, int nMembCount, VSILFILE *fp)
    3001                 : {
    3002              35 :     GIntBig buf_size = nMembSize * nMembCount;
    3003                 : 
    3004              35 :     if (buf_size == 0)
    3005                 :     {
    3006               0 :         *buf = NULL;
    3007               0 :         return 0;
    3008                 :     }
    3009                 : #if PY_VERSION_HEX >= 0x03000000 
    3010                 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size ); 
    3011                 :     if (*buf == NULL)
    3012                 :     {
    3013                 :         *buf = Py_None;
    3014                 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    3015                 :         return 0;
    3016                 :     }
    3017                 :     PyObject* o = (PyObject*) *buf;
    3018                 :     char *data = PyBytes_AsString(o); 
    3019                 :     GIntBig nRet = (GIntBig)VSIFReadL( data, nMembSize, nMembCount, fp );
    3020                 :     if (nRet * nMembSize < buf_size)
    3021                 :     {
    3022                 :         _PyBytes_Resize(&o, nRet * nMembSize);
    3023                 :         *buf = o;
    3024                 :     }
    3025                 :     return nRet;
    3026                 : #else 
    3027              35 :     *buf = (void *)PyString_FromStringAndSize( NULL, buf_size ); 
    3028              35 :     if (*buf == NULL)
    3029                 :     {
    3030               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    3031               0 :         return 0;
    3032                 :     }
    3033              35 :     PyObject* o = (PyObject*) *buf;
    3034              35 :     char *data = PyString_AsString(o); 
    3035              35 :     GIntBig nRet = (GIntBig)VSIFReadL( data, nMembSize, nMembCount, fp );
    3036              35 :     if (nRet * nMembSize < buf_size)
    3037                 :     {
    3038              13 :         _PyString_Resize(&o, nRet * nMembSize);
    3039              13 :         *buf = o;
    3040                 :     }
    3041              35 :     return nRet;
    3042                 : #endif
    3043                 : }
    3044                 : 
    3045                 : 
    3046                 : #include <limits.h>
    3047                 : #if !defined(SWIG_NO_LLONG_MAX)
    3048                 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
    3049                 : #   define LLONG_MAX __LONG_LONG_MAX__
    3050                 : #   define LLONG_MIN (-LLONG_MAX - 1LL)
    3051                 : #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
    3052                 : # endif
    3053                 : #endif
    3054                 : 
    3055                 : 
    3056                 : SWIGINTERN int
    3057          170724 : SWIG_AsVal_double (PyObject *obj, double *val)
    3058                 : {
    3059          170724 :   int res = SWIG_TypeError;
    3060          170724 :   if (PyFloat_Check(obj)) {
    3061            2767 :     if (val) *val = PyFloat_AsDouble(obj);
    3062            2767 :     return SWIG_OK;
    3063          167957 :   } else if (PyInt_Check(obj)) {
    3064          167957 :     if (val) *val = PyInt_AsLong(obj);
    3065          167957 :     return SWIG_OK;
    3066               0 :   } else if (PyLong_Check(obj)) {
    3067               0 :     double v = PyLong_AsDouble(obj);
    3068               0 :     if (!PyErr_Occurred()) {
    3069               0 :       if (val) *val = v;
    3070               0 :       return SWIG_OK;
    3071                 :     } else {
    3072               0 :       PyErr_Clear();
    3073                 :     }
    3074                 :   }
    3075                 : #ifdef SWIG_PYTHON_CAST_MODE
    3076                 :   {
    3077                 :     int dispatch = 0;
    3078                 :     double d = PyFloat_AsDouble(obj);
    3079                 :     if (!PyErr_Occurred()) {
    3080                 :       if (val) *val = d;
    3081                 :       return SWIG_AddCast(SWIG_OK);
    3082                 :     } else {
    3083                 :       PyErr_Clear();
    3084                 :     }
    3085                 :     if (!dispatch) {
    3086                 :       long v = PyLong_AsLong(obj);
    3087                 :       if (!PyErr_Occurred()) {
    3088                 :   if (val) *val = v;
    3089                 :   return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
    3090                 :       } else {
    3091                 :   PyErr_Clear();
    3092                 :       }
    3093                 :     }
    3094                 :   }
    3095                 : #endif
    3096               0 :   return res;
    3097                 : }
    3098                 : 
    3099                 : 
    3100                 : #include <float.h>
    3101                 : 
    3102                 : 
    3103                 : #include <math.h>
    3104                 : 
    3105                 : 
    3106                 : SWIGINTERNINLINE int
    3107                 : SWIG_CanCastAsInteger(double *d, double min, double max) {
    3108                 :   double x = *d;
    3109                 :   if ((min <= x && x <= max)) {
    3110                 :    double fx = floor(x);
    3111                 :    double cx = ceil(x);
    3112                 :    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
    3113                 :    if ((errno == EDOM) || (errno == ERANGE)) {
    3114                 :      errno = 0;
    3115                 :    } else {
    3116                 :      double summ, reps, diff;
    3117                 :      if (rd < x) {
    3118                 :        diff = x - rd;
    3119                 :      } else if (rd > x) {
    3120                 :        diff = rd - x;
    3121                 :      } else {
    3122                 :        return 1;
    3123                 :      }
    3124                 :      summ = rd + x;
    3125                 :      reps = diff/summ;
    3126                 :      if (reps < 8*DBL_EPSILON) {
    3127                 :        *d = rd;
    3128                 :        return 1;
    3129                 :      }
    3130                 :    }
    3131                 :   }
    3132                 :   return 0;
    3133                 : }
    3134                 : 
    3135                 : 
    3136                 : SWIGINTERN int
    3137         1577257 : SWIG_AsVal_long (PyObject *obj, long* val)
    3138                 : {
    3139         1577257 :   if (PyInt_Check(obj)) {
    3140         1577257 :     if (val) *val = PyInt_AsLong(obj);
    3141         1577257 :     return SWIG_OK;
    3142               0 :   } else if (PyLong_Check(obj)) {
    3143               0 :     long v = PyLong_AsLong(obj);
    3144               0 :     if (!PyErr_Occurred()) {
    3145               0 :       if (val) *val = v;
    3146               0 :       return SWIG_OK;
    3147                 :     } else {
    3148               0 :       PyErr_Clear();
    3149                 :     }
    3150                 :   }
    3151                 : #ifdef SWIG_PYTHON_CAST_MODE
    3152                 :   {
    3153                 :     int dispatch = 0;
    3154                 :     long v = PyInt_AsLong(obj);
    3155                 :     if (!PyErr_Occurred()) {
    3156                 :       if (val) *val = v;
    3157                 :       return SWIG_AddCast(SWIG_OK);
    3158                 :     } else {
    3159                 :       PyErr_Clear();
    3160                 :     }
    3161                 :     if (!dispatch) {
    3162                 :       double d;
    3163                 :       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
    3164                 :       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
    3165                 :   if (val) *val = (long)(d);
    3166                 :   return res;
    3167                 :       }
    3168                 :     }
    3169                 :   }
    3170                 : #endif
    3171               0 :   return SWIG_TypeError;
    3172                 : }
    3173                 : 
    3174                 : 
    3175                 : SWIGINTERN int
    3176         1577257 : SWIG_AsVal_int (PyObject * obj, int *val)
    3177                 : {
    3178                 :   long v;
    3179         1577257 :   int res = SWIG_AsVal_long (obj, &v);
    3180         1577257 :   if (SWIG_IsOK(res)) {
    3181         1577257 :     if ((v < INT_MIN || v > INT_MAX)) {
    3182               0 :       return SWIG_OverflowError;
    3183                 :     } else {
    3184         1577257 :       if (val) *val = static_cast< int >(v);
    3185                 :     }
    3186                 :   }  
    3187         1577257 :   return res;
    3188                 : }
    3189                 : 
    3190                 : 
    3191                 : 
    3192                 : typedef struct {
    3193                 :     PyObject *psPyCallback;
    3194                 :     PyObject *psPyCallbackData;
    3195                 :     int nLastReported;
    3196                 : } PyProgressData;
    3197                 : 
    3198                 : /************************************************************************/
    3199                 : /*                          PyProgressProxy()                           */
    3200                 : /************************************************************************/
    3201                 : 
    3202                 : int CPL_STDCALL
    3203             525 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
    3204                 : 
    3205                 : {
    3206             525 :     PyProgressData *psInfo = (PyProgressData *) pData;
    3207                 :     PyObject *psArgs, *psResult;
    3208             525 :     int      bContinue = TRUE;
    3209                 : 
    3210             525 :     if( psInfo->nLastReported == (int) (100.0 * dfComplete) )
    3211             100 :         return TRUE;
    3212                 : 
    3213             425 :     if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
    3214               0 :         return TRUE;
    3215                 : 
    3216             425 :     psInfo->nLastReported = (int) (100.0 * dfComplete);
    3217                 :     
    3218             425 :     if( pszMessage == NULL )
    3219             396 :         pszMessage = "";
    3220                 : 
    3221             425 :     if( psInfo->psPyCallbackData == NULL )
    3222             396 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    3223                 :     else
    3224                 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, 
    3225              29 :                          psInfo->psPyCallbackData );
    3226                 : 
    3227             425 :     psResult = PyEval_CallObject( psInfo->psPyCallback, psArgs);
    3228             425 :     Py_XDECREF(psArgs);
    3229                 : 
    3230             425 :     if( psResult == NULL )
    3231                 :     {
    3232               0 :         return TRUE;
    3233                 :     }
    3234                 : 
    3235             425 :     if( psResult == Py_None )
    3236                 :     {
    3237               0 :   Py_XDECREF(Py_None);
    3238               0 :         return TRUE;
    3239                 :     }
    3240                 : 
    3241             425 :     if( !PyArg_Parse( psResult, "i", &bContinue ) )
    3242                 :     {
    3243               0 :         PyErr_SetString(PyExc_ValueError, "bad progress return value");
    3244               0 :   return FALSE;
    3245                 :     }
    3246                 : 
    3247             425 :     Py_XDECREF(psResult);
    3248                 : 
    3249             425 :     return bContinue;    
    3250                 : }
    3251                 : 
    3252                 : 
    3253                 : typedef char retStringAndCPLFree;
    3254                 : 
    3255                 : 
    3256            6291 :   void Debug( const char *msg_class, const char *message ) {
    3257            6291 :     CPLDebug( msg_class, "%s", message );
    3258            6291 :   }
    3259                 : 
    3260               0 :   CPLErr SetErrorHandler( char const * pszCallbackName = NULL )
    3261                 :   {
    3262               0 :     CPLErrorHandler pfnHandler = NULL;
    3263               0 :     if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
    3264               0 :       pfnHandler = CPLQuietErrorHandler;
    3265               0 :     else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
    3266               0 :       pfnHandler = CPLDefaultErrorHandler;
    3267               0 :     else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
    3268               0 :       pfnHandler = CPLLoggingErrorHandler;
    3269                 : 
    3270               0 :     if ( pfnHandler == NULL )
    3271               0 :       return CE_Fatal;
    3272                 : 
    3273               0 :     CPLSetErrorHandler( pfnHandler );
    3274                 : 
    3275               0 :     return CE_None;
    3276                 :   }
    3277                 : 
    3278                 : 
    3279                 : SWIGINTERN swig_type_info*
    3280                 : SWIG_pchar_descriptor(void)
    3281                 : {
    3282                 :   static int init = 0;
    3283                 :   static swig_type_info* info = 0;
    3284             357 :   if (!init) {
    3285               7 :     info = SWIG_TypeQuery("_p_char");
    3286               7 :     init = 1;
    3287                 :   }
    3288             357 :   return info;
    3289                 : }
    3290                 : 
    3291                 : 
    3292                 : SWIGINTERN int
    3293           25185 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
    3294                 : {
    3295                 : #if PY_VERSION_HEX>=0x03000000
    3296                 :   if (PyUnicode_Check(obj))
    3297                 : #else  
    3298           25185 :   if (PyString_Check(obj))
    3299                 : #endif
    3300                 :   {
    3301                 :     char *cstr; Py_ssize_t len;
    3302                 : #if PY_VERSION_HEX>=0x03000000
    3303                 :     if (!alloc && cptr) {
    3304                 :         /* We can't allow converting without allocation, since the internal
    3305                 :            representation of string in Python 3 is UCS-2/UCS-4 but we require
    3306                 :            a UTF-8 representation.
    3307                 :            TODO(bhy) More detailed explanation */
    3308                 :         return SWIG_RuntimeError;
    3309                 :     }
    3310                 :     obj = PyUnicode_AsUTF8String(obj);
    3311                 :     PyBytes_AsStringAndSize(obj, &cstr, &len);
    3312                 :     if(alloc) *alloc = SWIG_NEWOBJ;
    3313                 : #else
    3314           24828 :     PyString_AsStringAndSize(obj, &cstr, &len);
    3315                 : #endif
    3316           24828 :     if (cptr) {
    3317           24802 :       if (alloc) {
    3318                 :   /* 
    3319                 :      In python the user should not be able to modify the inner
    3320                 :      string representation. To warranty that, if you define
    3321                 :      SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
    3322                 :      buffer is always returned.
    3323                 : 
    3324                 :      The default behavior is just to return the pointer value,
    3325                 :      so, be careful.
    3326                 :   */ 
    3327                 : #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
    3328                 :   if (*alloc != SWIG_OLDOBJ) 
    3329                 : #else
    3330           24802 :   if (*alloc == SWIG_NEWOBJ) 
    3331                 : #endif
    3332                 :     {
    3333               0 :       *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
    3334               0 :       *alloc = SWIG_NEWOBJ;
    3335                 :     }
    3336                 :   else {
    3337           24802 :     *cptr = cstr;
    3338           24802 :     *alloc = SWIG_OLDOBJ;
    3339                 :   }
    3340                 :       } else {
    3341                 :         #if PY_VERSION_HEX>=0x03000000
    3342                 :         assert(0); /* Should never reach here in Python 3 */
    3343                 :         #endif
    3344               0 :   *cptr = SWIG_Python_str_AsChar(obj);
    3345                 :       }
    3346                 :     }
    3347           24828 :     if (psize) *psize = len + 1;
    3348                 : #if PY_VERSION_HEX>=0x03000000
    3349                 :     Py_XDECREF(obj);
    3350                 : #endif
    3351           24828 :     return SWIG_OK;
    3352                 :   } else {
    3353             357 :     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3354             357 :     if (pchar_descriptor) {
    3355             357 :       void* vptr = 0;
    3356             357 :       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
    3357             279 :   if (cptr) *cptr = (char *) vptr;
    3358             279 :   if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
    3359             279 :   if (alloc) *alloc = SWIG_OLDOBJ;
    3360             279 :   return SWIG_OK;
    3361                 :       }
    3362                 :     }
    3363                 :   }
    3364              78 :   return SWIG_TypeError;
    3365                 : }
    3366                 : 
    3367                 : 
    3368                 : 
    3369                 : 
    3370                 : 
    3371               1 : void CPL_STDCALL PyCPLErrorHandler(CPLErr eErrClass, int err_no, const char* pszErrorMsg)
    3372                 : {
    3373               1 :     void* user_data = CPLGetErrorHandlerUserData();
    3374                 :     PyObject *psArgs;
    3375                 : 
    3376               1 :     psArgs = Py_BuildValue("(iis)", eErrClass, err_no, pszErrorMsg );
    3377               1 :     PyEval_CallObject( (PyObject*)user_data, psArgs);
    3378               1 :     Py_XDECREF(psArgs);
    3379               1 : }
    3380                 : 
    3381                 : 
    3382            1220 :   CPLErr PushErrorHandler( CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL )
    3383                 :   {
    3384            1220 :     if( pfnErrorHandler == NULL )
    3385               0 :         CPLPushErrorHandler(CPLQuietErrorHandler);
    3386                 :     else
    3387            1220 :         CPLPushErrorHandlerEx(pfnErrorHandler, user_data);
    3388            1220 :     return CE_None;
    3389                 :   }
    3390                 : 
    3391                 : 
    3392               1 :   void Error( CPLErr msg_class = CE_Failure, int err_code = 0, const char* msg = "error" ) {
    3393               1 :     CPLError( msg_class, err_code, "%s", msg );
    3394               1 :   }
    3395                 : 
    3396                 : 
    3397               0 : retStringAndCPLFree* EscapeString(int len, char *bin_string , int scheme=CPLES_SQL) {
    3398               0 :     return CPLEscapeString(bin_string, len, scheme);
    3399                 : } 
    3400                 : 
    3401                 : 
    3402                 : SWIGINTERNINLINE PyObject *
    3403                 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
    3404                 : {
    3405           31881 :   if (carray) {
    3406           31763 :     if (size > INT_MAX) {
    3407               0 :       swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3408                 :       return pchar_descriptor ? 
    3409               0 :   SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    3410                 :     } else {
    3411                 : #if PY_VERSION_HEX >= 0x03000000
    3412                 :       return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
    3413                 : #else
    3414           31763 :       return PyString_FromStringAndSize(carray, static_cast< int >(size));
    3415                 : #endif
    3416                 :     }
    3417                 :   } else {
    3418             118 :     return SWIG_Py_Void();
    3419                 :   }
    3420                 : }
    3421                 : 
    3422                 : 
    3423                 : SWIGINTERNINLINE PyObject * 
    3424           31881 : SWIG_FromCharPtr(const char *cptr)
    3425                 : { 
    3426           63762 :   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
    3427                 : }
    3428                 : 
    3429                 : 
    3430             595 : const char *wrapper_CPLGetConfigOption( const char * pszKey, const char * pszDefault = NULL )
    3431                 : {
    3432             595 :     return CPLGetConfigOption( pszKey, pszDefault );
    3433                 : }
    3434                 : 
    3435                 : 
    3436              19 : void wrapper_VSIFileFromMemBuffer( const char* utf8_path, int nBytes, const GByte *pabyData)
    3437                 : {
    3438              19 :     GByte* pabyDataDup = (GByte*)VSIMalloc(nBytes);
    3439              19 :     if (pabyDataDup == NULL)
    3440                 :             return;
    3441              19 :     memcpy(pabyDataDup, pabyData, nBytes);
    3442              19 :     VSIFCloseL(VSIFileFromMemBuffer(utf8_path, (GByte*) pabyDataDup, nBytes, TRUE));
    3443                 : }
    3444                 : 
    3445                 : 
    3446                 : 
    3447               0 : int wrapper_HasThreadSupport()
    3448                 : {
    3449               0 :     return strcmp(CPLGetThreadingModel(), "stub") != 0;
    3450                 : }
    3451                 : 
    3452                 : 
    3453                 : typedef struct
    3454                 : {
    3455                 :   int     mode;
    3456                 :   GIntBig size;
    3457                 :   GIntBig mtime;
    3458                 : } StatBuf;
    3459                 : 
    3460                 : SWIGINTERN StatBuf *new_StatBuf(StatBuf *psStatBuf){
    3461            2072 :     StatBuf *self = (StatBuf*) CPLMalloc( sizeof( StatBuf ) );
    3462            2072 :     self->mode = psStatBuf->mode;
    3463            2072 :     self->size = psStatBuf->size;
    3464            2072 :     self->mtime = psStatBuf->mtime;
    3465            2072 :     return self;
    3466                 :   }
    3467                 : SWIGINTERN void delete_StatBuf(StatBuf *self){
    3468            2072 :     CPLFree(self);
    3469                 :   }
    3470                 : SWIGINTERN int StatBuf_IsDirectory(StatBuf *self){
    3471            2353 :      return (self->mode & S_IFDIR) != 0;
    3472                 :   }
    3473                 : 
    3474            2074 : int wrapper_VSIStatL( const char * utf8_path, StatBuf *psStatBufOut, int nFlags = 0 )
    3475                 : {
    3476                 :     VSIStatBufL sStat;
    3477                 :     memset(&sStat, 0, sizeof(sStat));
    3478                 :     memset(psStatBufOut, 0, sizeof(StatBuf));
    3479            2074 :     int nRet = VSIStatExL(utf8_path, &sStat, nFlags);
    3480            2074 :     psStatBufOut->mode = sStat.st_mode;
    3481            2074 :     psStatBufOut->size = (GIntBig)sStat.st_size;
    3482            2074 :     psStatBufOut->mtime = (GIntBig)sStat.st_mtime;
    3483            2074 :     return nRet;
    3484                 : }
    3485                 : 
    3486                 : 
    3487              64 : int wrapper_VSIFWriteL( int nLen, char *pBuf, int size, int memb, VSILFILE * f)
    3488                 : {
    3489              64 :     if (nLen < size * memb)
    3490                 :     {
    3491               0 :         CPLError(CE_Failure, CPLE_AppDefined, "Inconsistant buffer size with 'size' and 'memb' values");
    3492               0 :         return 0;
    3493                 :     }
    3494              64 :     return VSIFWriteL(pBuf, size, memb, f);
    3495                 : }
    3496                 : 
    3497                 : SWIGINTERN char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
    3498              71 :     return GDALGetDescription( self );
    3499                 :   }
    3500                 : SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    3501              26 :     GDALSetDescription( self, pszNewDesc );
    3502                 :   }
    3503                 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
    3504            2688 :     return GDALGetMetadata( self, pszDomain );
    3505                 :   }
    3506                 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    3507             161 :     return GDALGetMetadata( self, pszDomain );
    3508                 :   }
    3509                 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
    3510              77 :     return GDALSetMetadata( self, papszMetadata, pszDomain );
    3511                 :   }
    3512                 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_1(GDALMajorObjectShadow *self,char *pszMetadataString,char const *pszDomain=""){
    3513                 :     char *tmpList[2];
    3514               5 :     tmpList[0] = pszMetadataString;
    3515               5 :     tmpList[1] = 0;
    3516               5 :     return GDALSetMetadata( self, tmpList, pszDomain );
    3517                 :   }
    3518                 : SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
    3519             175 :     return GDALGetMetadataItem( self, pszName, pszDomain);
    3520                 :   }
    3521                 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
    3522              39 :     return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
    3523                 :   }
    3524                 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_Create(GDALDriverShadow *self,char const *utf8_path,int xsize,int ysize,int bands=1,GDALDataType eType=GDT_Byte,char **options=0){
    3525                 : 
    3526                 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(    self, 
    3527                 :                                                                 utf8_path, 
    3528                 :                                                                 xsize, 
    3529                 :                                                                 ysize, 
    3530                 :                                                                 bands, 
    3531                 :                                                                 eType, 
    3532            7004 :                                                                 options );
    3533            7004 :     return ds;
    3534                 :   }
    3535                 : 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){
    3536                 : 
    3537                 :     GDALDatasetShadow *ds = (GDALDatasetShadow*) GDALCreateCopy(    self, 
    3538                 :                                                                     utf8_path, 
    3539                 :                                                                     src, 
    3540                 :                                                                     strict, 
    3541                 :                                                                     options, 
    3542                 :                                                                     callback, 
    3543            2069 :                                                                     callback_data );
    3544            2069 :     return ds;
    3545                 :   }
    3546                 : SWIGINTERN int GDALDriverShadow_Delete(GDALDriverShadow *self,char const *utf8_path){
    3547            1323 :     return GDALDeleteDataset( self, utf8_path );
    3548                 :   }
    3549                 : SWIGINTERN int GDALDriverShadow_Rename(GDALDriverShadow *self,char const *newName,char const *oldName){
    3550               1 :     return GDALRenameDataset( self, newName, oldName );
    3551                 :   }
    3552                 : SWIGINTERN int GDALDriverShadow_CopyFiles(GDALDriverShadow *self,char const *newName,char const *oldName){
    3553               1 :     return GDALCopyDatasetFiles( self, newName, oldName );
    3554                 :   }
    3555                 : SWIGINTERN int GDALDriverShadow_Register(GDALDriverShadow *self){
    3556              75 :     return GDALRegisterDriver( self );
    3557                 :   }
    3558                 : SWIGINTERN void GDALDriverShadow_Deregister(GDALDriverShadow *self){
    3559              72 :     GDALDeregisterDriver( self );
    3560                 :   }
    3561                 : 
    3562           23169 : char const *GDALDriverShadow_ShortName_get( GDALDriverShadow *h ) {
    3563           23169 :   return GDALGetDriverShortName( h );
    3564                 : }
    3565              17 : char const *GDALDriverShadow_LongName_get( GDALDriverShadow *h ) {
    3566              17 :   return GDALGetDriverLongName( h );
    3567                 : }
    3568               0 : char const *GDALDriverShadow_HelpTopic_get( GDALDriverShadow *h ) {
    3569               0 :   return GDALGetDriverHelpTopic( h );
    3570                 : }
    3571                 : 
    3572                 : 
    3573                 : SWIGINTERN int
    3574               0 : SWIG_AsVal_short (PyObject * obj, short *val)
    3575                 : {
    3576                 :   long v;
    3577               0 :   int res = SWIG_AsVal_long (obj, &v);
    3578               0 :   if (SWIG_IsOK(res)) {
    3579               0 :     if ((v < SHRT_MIN || v > SHRT_MAX)) {
    3580               0 :       return SWIG_OverflowError;
    3581                 :     } else {
    3582               0 :       if (val) *val = static_cast< short >(v);
    3583                 :     }
    3584                 :   }  
    3585               0 :   return res;
    3586                 : }
    3587                 : 
    3588                 : 
    3589                 : SWIGINTERNINLINE PyObject *
    3590                 : SWIG_From_short  (short value)
    3591                 : {    
    3592               0 :   return SWIG_From_long  (value);
    3593                 : }
    3594                 : 
    3595                 : 
    3596                 :   #define SWIG_From_double   PyFloat_FromDouble 
    3597                 : 
    3598            5559 : 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=""){
    3599                 : 
    3600            5559 :     GDAL_GCP *self = (GDAL_GCP*) CPLMalloc( sizeof( GDAL_GCP ) );
    3601            5559 :     self->dfGCPX = x;
    3602            5559 :     self->dfGCPY = y;
    3603            5559 :     self->dfGCPZ = z;
    3604            5559 :     self->dfGCPPixel = pixel;
    3605            5559 :     self->dfGCPLine = line;
    3606            5559 :     self->pszInfo =  CPLStrdup( (info == 0) ? "" : info );
    3607            5559 :     self->pszId = CPLStrdup( (id==0)? "" : id );
    3608            5559 :     return self;
    3609                 :   }
    3610                 : SWIGINTERN void delete_GDAL_GCP(GDAL_GCP *self){
    3611            5559 :     if ( self->pszInfo )
    3612            5559 :       CPLFree( self->pszInfo );
    3613            5559 :     if ( self->pszId )
    3614            5559 :       CPLFree( self->pszId );
    3615            5559 :     CPLFree( self );
    3616                 :   }
    3617                 : 
    3618                 : 
    3619            2774 : double GDAL_GCP_GCPX_get( GDAL_GCP *gcp ) {
    3620            2774 :   return gcp->dfGCPX;
    3621                 : }
    3622               8 : void GDAL_GCP_GCPX_set( GDAL_GCP *gcp, double dfGCPX ) {
    3623               8 :   gcp->dfGCPX = dfGCPX;
    3624               8 : }
    3625            2774 : double GDAL_GCP_GCPY_get( GDAL_GCP *gcp ) {
    3626            2774 :   return gcp->dfGCPY;
    3627                 : }
    3628               8 : void GDAL_GCP_GCPY_set( GDAL_GCP *gcp, double dfGCPY ) {
    3629               8 :   gcp->dfGCPY = dfGCPY;
    3630               8 : }
    3631            2748 : double GDAL_GCP_GCPZ_get( GDAL_GCP *gcp ) {
    3632            2748 :   return gcp->dfGCPZ;
    3633                 : }
    3634               0 : void GDAL_GCP_GCPZ_set( GDAL_GCP *gcp, double dfGCPZ ) {
    3635               0 :   gcp->dfGCPZ = dfGCPZ;
    3636               0 : }
    3637            2782 : double GDAL_GCP_GCPPixel_get( GDAL_GCP *gcp ) {
    3638            2782 :   return gcp->dfGCPPixel;
    3639                 : }
    3640              16 : void GDAL_GCP_GCPPixel_set( GDAL_GCP *gcp, double dfGCPPixel ) {
    3641              16 :   gcp->dfGCPPixel = dfGCPPixel;
    3642              16 : }
    3643            2782 : double GDAL_GCP_GCPLine_get( GDAL_GCP *gcp ) {
    3644            2782 :   return gcp->dfGCPLine;
    3645                 : }
    3646              16 : void GDAL_GCP_GCPLine_set( GDAL_GCP *gcp, double dfGCPLine ) {
    3647              16 :   gcp->dfGCPLine = dfGCPLine;
    3648              16 : }
    3649               4 : const char * GDAL_GCP_Info_get( GDAL_GCP *gcp ) {
    3650               4 :   return gcp->pszInfo;
    3651                 : }
    3652               0 : void GDAL_GCP_Info_set( GDAL_GCP *gcp, const char * pszInfo ) {
    3653               0 :   if ( gcp->pszInfo ) 
    3654               0 :     CPLFree( gcp->pszInfo );
    3655               0 :   gcp->pszInfo = CPLStrdup(pszInfo);
    3656               0 : }
    3657               4 : const char * GDAL_GCP_Id_get( GDAL_GCP *gcp ) {
    3658               4 :   return gcp->pszId;
    3659                 : }
    3660               0 : void GDAL_GCP_Id_set( GDAL_GCP *gcp, const char * pszId ) {
    3661               0 :   if ( gcp->pszId ) 
    3662               0 :     CPLFree( gcp->pszId );
    3663               0 :   gcp->pszId = CPLStrdup(pszId);
    3664               0 : }
    3665                 : 
    3666                 : 
    3667                 : 
    3668                 : /* Duplicate, but transposed names for C# because 
    3669                 : *  the C# module outputs backwards names
    3670                 : */
    3671               0 : double GDAL_GCP_get_GCPX( GDAL_GCP *gcp ) {
    3672               0 :   return gcp->dfGCPX;
    3673                 : }
    3674               0 : void GDAL_GCP_set_GCPX( GDAL_GCP *gcp, double dfGCPX ) {
    3675               0 :   gcp->dfGCPX = dfGCPX;
    3676               0 : }
    3677               0 : double GDAL_GCP_get_GCPY( GDAL_GCP *gcp ) {
    3678               0 :   return gcp->dfGCPY;
    3679                 : }
    3680               0 : void GDAL_GCP_set_GCPY( GDAL_GCP *gcp, double dfGCPY ) {
    3681               0 :   gcp->dfGCPY = dfGCPY;
    3682               0 : }
    3683               0 : double GDAL_GCP_get_GCPZ( GDAL_GCP *gcp ) {
    3684               0 :   return gcp->dfGCPZ;
    3685                 : }
    3686               0 : void GDAL_GCP_set_GCPZ( GDAL_GCP *gcp, double dfGCPZ ) {
    3687               0 :   gcp->dfGCPZ = dfGCPZ;
    3688               0 : }
    3689               0 : double GDAL_GCP_get_GCPPixel( GDAL_GCP *gcp ) {
    3690               0 :   return gcp->dfGCPPixel;
    3691                 : }
    3692               0 : void GDAL_GCP_set_GCPPixel( GDAL_GCP *gcp, double dfGCPPixel ) {
    3693               0 :   gcp->dfGCPPixel = dfGCPPixel;
    3694               0 : }
    3695               0 : double GDAL_GCP_get_GCPLine( GDAL_GCP *gcp ) {
    3696               0 :   return gcp->dfGCPLine;
    3697                 : }
    3698               0 : void GDAL_GCP_set_GCPLine( GDAL_GCP *gcp, double dfGCPLine ) {
    3699               0 :   gcp->dfGCPLine = dfGCPLine;
    3700               0 : }
    3701               0 : const char * GDAL_GCP_get_Info( GDAL_GCP *gcp ) {
    3702               0 :   return gcp->pszInfo;
    3703                 : }
    3704               0 : void GDAL_GCP_set_Info( GDAL_GCP *gcp, const char * pszInfo ) {
    3705               0 :   if ( gcp->pszInfo ) 
    3706               0 :     CPLFree( gcp->pszInfo );
    3707               0 :   gcp->pszInfo = CPLStrdup(pszInfo);
    3708               0 : }
    3709               0 : const char * GDAL_GCP_get_Id( GDAL_GCP *gcp ) {
    3710               0 :   return gcp->pszId;
    3711                 : }
    3712               0 : void GDAL_GCP_set_Id( GDAL_GCP *gcp, const char * pszId ) {
    3713               0 :   if ( gcp->pszId ) 
    3714               0 :     CPLFree( gcp->pszId );
    3715               0 :   gcp->pszId = CPLStrdup(pszId);
    3716               0 : }
    3717                 : 
    3718                 : 
    3719                 : 
    3720                 : #define t_output_helper SWIG_Python_AppendOutput
    3721                 : 
    3722                 : 
    3723                 : static PyObject *
    3724            1865 : CreateTupleFromDoubleArray( double *first, unsigned int size ) {
    3725            1865 :   PyObject *out = PyTuple_New( size );
    3726            9971 :   for( unsigned int i=0; i<size; i++ ) {
    3727            8106 :     PyObject *val = PyFloat_FromDouble( *first );
    3728            8106 :     ++first;
    3729            8106 :     PyTuple_SetItem( out, i, val );
    3730                 :   }
    3731            1865 :   return out;
    3732                 : }
    3733                 : 
    3734                 : 
    3735                 : /* Returned size is in bytes or 0 if an error occured */
    3736                 : static
    3737          337752 : GIntBig ComputeDatasetRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    3738                 :                                 int nBands, int* bandMap, int nBandMapArrayLength,
    3739                 :                                 int nPixelSpace, int nLineSpace, int nBandSpace,
    3740                 :                                 int bSpacingShouldBeMultipleOfPixelSize )
    3741                 : {
    3742                 : #if SIZEOF_VOIDP == 8
    3743          337752 :     const GIntBig MAX_INT = (((GIntBig)0x7fffffff) << 32) | 0xffffffff;
    3744                 : #else
    3745                 :     const GIntBig MAX_INT = 0x7fffffff;
    3746                 : #endif
    3747          337752 :     const GIntBig MAX_INT32 = 0x7fffffff;
    3748          337752 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    3749                 :     {
    3750               2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    3751               2 :         return 0;
    3752                 :     }
    3753                 : 
    3754          337750 :     if (nPixelSpace < 0 || nLineSpace < 0 || nBandSpace < 0)
    3755                 :     {
    3756               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    3757               0 :         return 0;
    3758                 :     }
    3759                 : 
    3760          337750 :     if (nPixelSize == 0)
    3761                 :     {
    3762               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    3763               0 :         return 0;
    3764                 :     }
    3765                 : 
    3766          337750 :     if( nPixelSpace == 0 )
    3767          337750 :         nPixelSpace = nPixelSize;
    3768               0 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    3769                 :     {
    3770               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    3771               0 :         return 0;
    3772                 :     }
    3773                 : 
    3774          337750 :     if( nLineSpace == 0 )
    3775                 :     {
    3776          337750 :         if (nPixelSpace > MAX_INT32 / buf_xsize)
    3777                 :         {
    3778               0 :             CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow for nLineSpace");
    3779               0 :             return 0;
    3780                 :         }
    3781          337750 :         nLineSpace = nPixelSpace * buf_xsize;
    3782                 :     }
    3783               0 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    3784                 :     {
    3785               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    3786               0 :         return 0;
    3787                 :     }
    3788                 : 
    3789          337750 :     if( nBandSpace == 0 )
    3790                 :     {
    3791          337750 :         if (nLineSpace > MAX_INT32 / buf_ysize)
    3792                 :         {
    3793               0 :             CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow for nBandSpace");
    3794               0 :             return 0;
    3795                 :         }
    3796          337750 :         nBandSpace = nLineSpace * buf_ysize;
    3797                 :     }
    3798               0 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nBandSpace % nPixelSize) != 0 )
    3799                 :     {
    3800               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    3801               0 :         return 0;
    3802                 :     }
    3803                 : 
    3804          337750 :     if (nBands <= 0 || (bandMap != NULL && nBands > nBandMapArrayLength))
    3805                 :     {
    3806               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Invalid band count");
    3807               0 :         return 0;
    3808                 :     }
    3809                 : 
    3810          337750 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + (GIntBig)(nBands - 1) * nBandSpace + nPixelSize;
    3811                 :     if (nRet > MAX_INT)
    3812                 :     {
    3813                 :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    3814                 :         return 0;
    3815                 :     }
    3816                 : 
    3817          337750 :     return nRet;
    3818                 : }
    3819                 : 
    3820                 : 
    3821                 : typedef struct
    3822                 : {
    3823                 :     GDALAsyncReaderH  hAsyncReader;
    3824                 :     void             *pyObject;
    3825                 : } GDALAsyncReaderWrapper;
    3826                 : 
    3827                 : typedef void* GDALAsyncReaderWrapperH;
    3828                 : 
    3829               3 : static GDALAsyncReaderH AsyncReaderWrapperGetReader(GDALAsyncReaderWrapperH hWrapper)
    3830                 : {
    3831               3 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    3832               3 :     if (psWrapper->hAsyncReader == NULL)
    3833                 :     {
    3834               0 :         CPLError(CE_Failure, CPLE_AppDefined, "AsyncReader object is defunct");
    3835                 :     }
    3836               3 :     return psWrapper->hAsyncReader;
    3837                 : }
    3838                 : 
    3839                 : static void* AsyncReaderWrapperGetPyObject(GDALAsyncReaderWrapperH hWrapper)
    3840                 : {
    3841               1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    3842               1 :     return psWrapper->pyObject;
    3843                 : }
    3844                 : 
    3845                 : static void DeleteAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
    3846                 : {
    3847               1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    3848               1 :     if (psWrapper->hAsyncReader != NULL)
    3849                 :     {
    3850                 :         CPLError(CE_Failure, CPLE_AppDefined,
    3851               0 :                  "Native AsyncReader object will leak. EndAsyncReader() should have been called before");
    3852                 :     }
    3853               1 :     CPLFree(psWrapper);
    3854                 : }
    3855                 : 
    3856                 : 
    3857                 : 
    3858                 : static GDALAsyncReaderWrapper* CreateAsyncReaderWrapper(GDALAsyncReaderH  hAsyncReader,
    3859                 :                                                         void             *pyObject)
    3860                 : {
    3861               1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper* )CPLMalloc(sizeof(GDALAsyncReaderWrapper));
    3862               1 :     psWrapper->hAsyncReader = hAsyncReader;
    3863               1 :     psWrapper->pyObject = pyObject;
    3864               1 :     Py_INCREF((PyObject*) psWrapper->pyObject);
    3865               1 :     return psWrapper;
    3866                 : }
    3867                 : 
    3868                 : static void DisableAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
    3869                 : {
    3870               1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    3871               1 :     if (psWrapper->pyObject)
    3872                 :     {
    3873               1 :         Py_XDECREF((PyObject*) psWrapper->pyObject);
    3874                 :     }
    3875               1 :     psWrapper->pyObject = NULL;
    3876               1 :     psWrapper->hAsyncReader = NULL;
    3877                 : }
    3878                 : 
    3879                 : 
    3880                 : SWIGINTERN void delete_GDALAsyncReaderShadow(GDALAsyncReaderShadow *self){
    3881                 :         DeleteAsyncReaderWrapper(self);
    3882                 :     }
    3883                 : SWIGINTERN GDALAsyncStatusType GDALAsyncReaderShadow_GetNextUpdatedRegion(GDALAsyncReaderShadow *self,double timeout,int *xoff,int *yoff,int *buf_xsize,int *buf_ysize){
    3884               1 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    3885               1 :         if (hReader == NULL)
    3886                 :         {
    3887               0 :             *xoff = 0;
    3888               0 :             *yoff = 0;
    3889               0 :             *buf_xsize = 0;
    3890               0 :             *buf_ysize = 0;
    3891               0 :             return GARIO_ERROR;
    3892                 :         }
    3893               1 :         return GDALARGetNextUpdatedRegion(hReader, timeout, xoff, yoff, buf_xsize, buf_ysize );
    3894                 :     }
    3895                 : SWIGINTERN void GDALAsyncReaderShadow_GetBuffer(GDALAsyncReaderShadow *self,void **ppRetPyObject){
    3896               1 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    3897               1 :         if (hReader == NULL)
    3898                 :         {
    3899               0 :             *ppRetPyObject = NULL;
    3900                 :             return;
    3901                 :         }
    3902               1 :         *ppRetPyObject = AsyncReaderWrapperGetPyObject(self);
    3903               1 :         Py_INCREF((PyObject*)*ppRetPyObject);
    3904                 :     }
    3905                 : SWIGINTERN int GDALAsyncReaderShadow_LockBuffer(GDALAsyncReaderShadow *self,double timeout){
    3906               0 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    3907               0 :         if (hReader == NULL)
    3908                 :         {
    3909               0 :             return 0;
    3910                 :         }
    3911               0 :         return GDALARLockBuffer(hReader,timeout);
    3912                 :     }
    3913                 : SWIGINTERN void GDALAsyncReaderShadow_UnlockBuffer(GDALAsyncReaderShadow *self){
    3914               0 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    3915               0 :         if (hReader == NULL)
    3916                 :         {
    3917                 :             return;
    3918                 :         }
    3919               0 :         GDALARUnlockBuffer(hReader);
    3920                 :     }
    3921                 : SWIGINTERN void delete_GDALDatasetShadow(GDALDatasetShadow *self){
    3922           16328 :     if ( GDALDereferenceDataset( self ) <= 0 ) {
    3923           11321 :       GDALClose(self);
    3924                 :     }
    3925                 :   }
    3926                 : SWIGINTERN GDALDriverShadow *GDALDatasetShadow_GetDriver(GDALDatasetShadow *self){
    3927             550 :     return (GDALDriverShadow*) GDALGetDatasetDriver( self );
    3928                 :   }
    3929                 : SWIGINTERN GDALRasterBandShadow *GDALDatasetShadow_GetRasterBand(GDALDatasetShadow *self,int nBand){
    3930          183419 :     return (GDALRasterBandShadow*) GDALGetRasterBand( self, nBand );
    3931                 :   }
    3932                 : SWIGINTERN char const *GDALDatasetShadow_GetProjection(GDALDatasetShadow *self){
    3933             386 :     return GDALGetProjectionRef( self );
    3934                 :   }
    3935                 : SWIGINTERN char const *GDALDatasetShadow_GetProjectionRef(GDALDatasetShadow *self){
    3936             196 :     return GDALGetProjectionRef( self );
    3937                 :   }
    3938                 : SWIGINTERN CPLErr GDALDatasetShadow_SetProjection(GDALDatasetShadow *self,char const *prj){
    3939             926 :     return GDALSetProjection( self, prj );
    3940                 :   }
    3941                 : SWIGINTERN void GDALDatasetShadow_GetGeoTransform(GDALDatasetShadow *self,double argout[6],int *isvalid,int *can_return_null=0){
    3942            1113 :     if (can_return_null && *can_return_null)
    3943                 :     {
    3944             102 :         *isvalid = (GDALGetGeoTransform( self, argout ) == CE_None );
    3945                 :     }
    3946                 :     else
    3947                 :     {
    3948            1011 :         *isvalid = TRUE;
    3949            1011 :         if ( GDALGetGeoTransform( self, argout ) != CE_None ) {
    3950              19 :             argout[0] = 0.0;
    3951              19 :             argout[1] = 1.0;
    3952              19 :             argout[2] = 0.0;
    3953              19 :             argout[3] = 0.0;
    3954              19 :             argout[4] = 0.0;
    3955              19 :             argout[5] = 1.0;
    3956                 :         }
    3957                 :     }
    3958                 :   }
    3959                 : SWIGINTERN CPLErr GDALDatasetShadow_SetGeoTransform(GDALDatasetShadow *self,double argin[6]){
    3960             910 :     return GDALSetGeoTransform( self, argin );
    3961                 :   }
    3962                 : SWIGINTERN int GDALDatasetShadow_BuildOverviews(GDALDatasetShadow *self,char const *resampling="NEAREST",int overviewlist=0,int *pOverviews=0,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    3963                 : 
    3964                 :     return GDALBuildOverviews(  self, 
    3965                 :                                 resampling ? resampling : "NEAREST", 
    3966                 :                                 overviewlist, 
    3967                 :                                 pOverviews, 
    3968                 :                                 0, 
    3969                 :                                 0, 
    3970                 :                                 callback, 
    3971             180 :                                 callback_data);
    3972                 :   }
    3973                 : SWIGINTERN int GDALDatasetShadow_GetGCPCount(GDALDatasetShadow *self){
    3974              32 :     return GDALGetGCPCount( self );
    3975                 :   }
    3976                 : SWIGINTERN char const *GDALDatasetShadow_GetGCPProjection(GDALDatasetShadow *self){
    3977              26 :     return GDALGetGCPProjection( self );
    3978                 :   }
    3979                 : SWIGINTERN void GDALDatasetShadow_GetGCPs(GDALDatasetShadow *self,int *nGCPs,GDAL_GCP const **pGCPs){
    3980              47 :     *nGCPs = GDALGetGCPCount( self );
    3981              47 :     *pGCPs = GDALGetGCPs( self );
    3982                 :   }
    3983                 : SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,char const *pszGCPProjection){
    3984              11 :     return GDALSetGCPs( self, nGCPs, pGCPs, pszGCPProjection );
    3985                 :   }
    3986                 : SWIGINTERN void GDALDatasetShadow_FlushCache(GDALDatasetShadow *self){
    3987              21 :     GDALFlushCache( self );
    3988                 :   }
    3989                 : SWIGINTERN CPLErr GDALDatasetShadow_AddBand(GDALDatasetShadow *self,GDALDataType datatype=GDT_Byte,char **options=0){
    3990              11 :     return GDALAddBand( self, datatype, options );
    3991                 :   }
    3992                 : SWIGINTERN CPLErr GDALDatasetShadow_CreateMaskBand(GDALDatasetShadow *self,int nFlags){
    3993              20 :       return GDALCreateDatasetMaskBand( self, nFlags );
    3994                 :   }
    3995                 : SWIGINTERN char **GDALDatasetShadow_GetFileList(GDALDatasetShadow *self){
    3996              39 :     return GDALGetFileList( self );
    3997                 :   }
    3998          170104 : 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){
    3999                 :     CPLErr eErr;
    4000          170104 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    4001          170104 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    4002                 :     GDALDataType ntype;
    4003          170104 :     if ( buf_type != 0 ) {
    4004          170104 :       ntype = (GDALDataType) *buf_type;
    4005                 :     } else {
    4006               0 :       int lastband = GDALGetRasterCount( self ) - 1;
    4007               0 :       if (lastband < 0)
    4008               0 :         return CE_Failure;
    4009               0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    4010                 :     }
    4011                 : 
    4012          170104 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    4013          170104 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    4014          170104 :     int band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    4015                 : 
    4016                 :     GIntBig min_buffer_size =
    4017                 :       ComputeDatasetRasterIOSize (nxsize, nysize, GDALGetDataTypeSize( ntype ) / 8,
    4018                 :                                   band_list ? band_list : GDALGetRasterCount(self), pband_list, band_list,
    4019          170104 :                                   pixel_space, line_space, band_space, FALSE);
    4020          170104 :     if (min_buffer_size == 0)
    4021               1 :         return CE_Failure;
    4022                 : 
    4023          170103 :     if ( buf_len < min_buffer_size )
    4024                 :     {
    4025               1 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    4026               1 :         return CE_Failure;
    4027                 :     }
    4028                 : 
    4029                 :     eErr = GDALDatasetRasterIO( self, GF_Write, xoff, yoff, xsize, ysize,
    4030                 :                                 (void*) buf_string, nxsize, nysize, ntype,
    4031          170102 :                                 band_list, pband_list, pixel_space, line_space, band_space );
    4032                 : 
    4033          170102 :     return eErr;
    4034                 :   }
    4035               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){
    4036                 : 
    4037               1 :     if ((options != NULL) && (buf_xsize ==0) && (buf_ysize == 0))
    4038                 :     {
    4039                 :         // calculate an appropriate buffer size
    4040               0 :         const char* pszLevel = CSLFetchNameValue(options, "LEVEL");
    4041               0 :         if (pszLevel)
    4042                 :         {
    4043                 :             // round up
    4044                 :             int nLevel = atoi(pszLevel);
    4045               0 :             int nRes = 2 << (nLevel - 1);
    4046               0 :             buf_xsize = ceil(xSize / (1.0 * nRes));
    4047               0 :             buf_ysize = ceil(ySize / (1.0 * nRes));
    4048                 :         }
    4049                 :     }
    4050                 :     
    4051               1 :     int nxsize = (buf_xsize == 0) ? xSize : buf_xsize;
    4052               1 :     int nysize = (buf_ysize == 0) ? ySize : buf_ysize;
    4053                 :     
    4054                 :     GDALDataType ntype;
    4055               1 :     if (bufType != 0) {
    4056               1 :         ntype = (GDALDataType) bufType;
    4057                 :     } 
    4058                 :     else {
    4059               0 :         ntype = GDT_Byte;
    4060                 :     }
    4061                 :     
    4062               1 :     int nBCount = (band_list) != 0 ? band_list : GDALGetRasterCount(self);
    4063               1 :     int nMinSize = nxsize * nysize * nBCount * (GDALGetDataTypeSize(ntype) / 8);
    4064               1 :     if (buf_string == NULL || buf_len < nMinSize)
    4065                 :     {
    4066               0 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer is too small");
    4067               0 :         return NULL;
    4068                 :     }
    4069                 :     
    4070               1 :     bool myBandList = false;
    4071                 :     int* pBandList;
    4072                 :     
    4073               1 :     if (band_list != 0){
    4074               1 :         myBandList = false;
    4075               1 :         pBandList = pband_list;
    4076                 :     }        
    4077                 :     else
    4078                 :     {
    4079               0 :         myBandList = true;
    4080               0 :         pBandList = (int*)CPLMalloc(sizeof(int) * nBCount);
    4081               0 :         for (int i = 0; i < nBCount; ++i) {
    4082               0 :             pBandList[i] = i + 1;
    4083                 :         }
    4084                 :     }
    4085                 : 
    4086                 :     GDALAsyncReaderH hAsyncReader =
    4087                 :             GDALBeginAsyncReader(self, xOff, yOff, xSize, ySize, (void*) buf_string, nxsize, nysize, ntype, nBCount, pBandList, nPixelSpace, nLineSpace,
    4088               1 :     nBandSpace, options);
    4089               1 :     if (hAsyncReader)
    4090                 :     {
    4091               1 :         return (GDALAsyncReader*) CreateAsyncReaderWrapper(hAsyncReader, pyObject);
    4092                 :     }
    4093                 :     else
    4094                 :     {
    4095               0 :         return NULL;
    4096                 :     }
    4097                 :     
    4098                 :     if ( myBandList ) {
    4099                 :        CPLFree( pBandList );
    4100                 :     }
    4101                 : 
    4102                 :   }
    4103                 : SWIGINTERN void GDALDatasetShadow_EndAsyncReader(GDALDatasetShadow *self,GDALAsyncReaderShadow *ario){
    4104               1 :     if( ario == NULL ) return;
    4105               1 :     GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(ario);
    4106               1 :     if (hReader == NULL)
    4107                 :     {
    4108                 :         return;
    4109                 :     }
    4110               1 :     GDALEndAsyncReader(self, hReader);
    4111                 :     DisableAsyncReaderWrapper(ario);
    4112                 :   }
    4113          167648 : 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){
    4114          167648 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    4115          167648 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    4116                 :     GDALDataType ntype;
    4117          167648 :     if ( buf_type != 0 ) {
    4118          167648 :       ntype = (GDALDataType) *buf_type;
    4119                 :     } else {
    4120               0 :       int lastband = GDALGetRasterCount( self ) - 1;
    4121               0 :       if (lastband < 0)
    4122                 :       {
    4123               0 :           *buf = NULL;
    4124               0 :           return CE_Failure;
    4125                 :       }
    4126               0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    4127                 :     }
    4128                 : 
    4129          167648 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    4130          167648 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    4131          167648 :     int band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    4132                 : 
    4133                 :     GIntBig buf_size = ComputeDatasetRasterIOSize (nxsize, nysize, GDALGetDataTypeSize( ntype ) / 8,
    4134                 :                                                band_list ? band_list : GDALGetRasterCount(self), pband_list, band_list,
    4135          167648 :                                                pixel_space, line_space, band_space, FALSE);
    4136          167648 :     if (buf_size == 0)
    4137                 :     {
    4138               1 :         *buf = NULL;
    4139               1 :         return CE_Failure;
    4140                 :     }
    4141                 : 
    4142                 : #if PY_VERSION_HEX >= 0x03000000 
    4143                 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size ); 
    4144                 :     if (*buf == NULL)
    4145                 :     {
    4146                 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4147                 :         return CE_Failure;
    4148                 :     }
    4149                 :     char *data = PyBytes_AsString( (PyObject *)*buf ); 
    4150                 : #else 
    4151          167647 :     *buf = (void *)PyString_FromStringAndSize( NULL, buf_size ); 
    4152          167647 :     if (*buf == NULL)
    4153                 :     {
    4154               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4155               0 :         return CE_Failure;
    4156                 :     }
    4157          167647 :     char *data = PyString_AsString( (PyObject *)*buf ); 
    4158                 : #endif
    4159                 : 
    4160                 :     CPLErr eErr = GDALDatasetRasterIO(self, GF_Read, xoff, yoff, xsize, ysize,
    4161                 :                                (void*) data, nxsize, nysize, ntype,
    4162          167647 :                                band_list, pband_list, pixel_space, line_space, band_space );
    4163          167647 :     if (eErr == CE_Failure)
    4164                 :     {
    4165               2 :         Py_DECREF((PyObject*)*buf);
    4166               2 :         *buf = NULL;
    4167                 :     }
    4168          167647 :     return eErr;
    4169                 : }
    4170                 : 
    4171            4156 : int GDALDatasetShadow_RasterXSize_get( GDALDatasetShadow *h ) {
    4172            4156 :   return GDALGetRasterXSize( h );
    4173                 : }
    4174           12535 : int GDALDatasetShadow_RasterYSize_get( GDALDatasetShadow *h ) {
    4175           12535 :   return GDALGetRasterYSize( h );
    4176                 : }
    4177          336663 : int GDALDatasetShadow_RasterCount_get( GDALDatasetShadow *h ) {
    4178          336663 :   return GDALGetRasterCount( h );
    4179                 : }
    4180                 : 
    4181                 : 
    4182                 : /* Returned size is in bytes or 0 if an error occured */
    4183                 : static
    4184            1778 : GIntBig ComputeBandRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    4185                 :                              int nPixelSpace, int nLineSpace,
    4186                 :                              int bSpacingShouldBeMultipleOfPixelSize )
    4187                 : {
    4188                 : #if SIZEOF_VOIDP == 8
    4189            1778 :     const GIntBig MAX_INT = (((GIntBig)0x7fffffff) << 32) | 0xffffffff;
    4190                 : #else
    4191                 :     const GIntBig MAX_INT = 0x7fffffff;
    4192                 : #endif
    4193            1778 :     const GIntBig MAX_INT32 = 0x7fffffff;
    4194            1778 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    4195                 :     {
    4196               2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    4197               2 :         return 0;
    4198                 :     }
    4199                 : 
    4200            1776 :     if (nPixelSpace < 0 || nLineSpace < 0)
    4201                 :     {
    4202               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    4203               0 :         return 0;
    4204                 :     }
    4205                 : 
    4206            1776 :     if (nPixelSize == 0)
    4207                 :     {
    4208               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    4209               0 :         return 0;
    4210                 :     }
    4211                 : 
    4212            1776 :     if( nPixelSpace == 0 )
    4213            1776 :         nPixelSpace = nPixelSize;
    4214               0 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    4215                 :     {
    4216               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    4217               0 :         return 0;
    4218                 :     }
    4219                 : 
    4220            1776 :     if( nLineSpace == 0 )
    4221                 :     {
    4222            1776 :         if (nPixelSpace > MAX_INT32 / buf_xsize)
    4223                 :         {
    4224               0 :             CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow for nLineSpace");
    4225               0 :             return 0;
    4226                 :         }
    4227            1776 :         nLineSpace = nPixelSpace * buf_xsize;
    4228                 :     }
    4229               0 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    4230                 :     {
    4231               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    4232               0 :         return 0;
    4233                 :     }
    4234                 : 
    4235            1776 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + nPixelSize;
    4236                 :     if (nRet > MAX_INT)
    4237                 :     {
    4238                 :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    4239                 :         return 0;
    4240                 :     }
    4241                 : 
    4242            1776 :     return nRet;
    4243                 : }
    4244                 : 
    4245                 : 
    4246                 : static
    4247                 : CPLErr WriteRaster_internal( GDALRasterBandShadow *obj,
    4248                 :                              int xoff, int yoff, int xsize, int ysize,
    4249                 :                              int buf_xsize, int buf_ysize,
    4250                 :                              GDALDataType buf_type,
    4251                 :                              GIntBig buf_size, char *buffer,
    4252                 :                              int pixel_space, int line_space)
    4253                 : {
    4254                 :     GIntBig min_buffer_size = ComputeBandRasterIOSize (buf_xsize, buf_ysize, GDALGetDataTypeSize( buf_type ) / 8,
    4255            1380 :                                                    pixel_space, line_space, FALSE );
    4256            1380 :     if ( min_buffer_size == 0 )
    4257               1 :       return CE_Failure;
    4258                 :       
    4259            1379 :     if ( buf_size < min_buffer_size ) {
    4260               1 :       CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    4261               1 :       return CE_Failure;
    4262                 :     }
    4263                 : 
    4264                 :     return GDALRasterIO( obj, GF_Write, xoff, yoff, xsize, ysize, 
    4265            1378 :             (void *) buffer, buf_xsize, buf_ysize, buf_type, pixel_space, line_space );
    4266                 : }
    4267                 : 
    4268                 : SWIGINTERN int GDALRasterBandShadow_GetBand(GDALRasterBandShadow *self){
    4269               0 :     return GDALGetBandNumber(self);
    4270                 :   }
    4271                 : SWIGINTERN void GDALRasterBandShadow_GetBlockSize(GDALRasterBandShadow *self,int *pnBlockXSize,int *pnBlockYSize){
    4272              33 :       GDALGetBlockSize(self, pnBlockXSize, pnBlockYSize);
    4273                 :   }
    4274                 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetColorInterpretation(GDALRasterBandShadow *self){
    4275              27 :     return GDALGetRasterColorInterpretation( self );
    4276                 :   }
    4277                 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetRasterColorInterpretation(GDALRasterBandShadow *self){
    4278             164 :     return GDALGetRasterColorInterpretation( self );
    4279                 :   }
    4280                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    4281              16 :     return GDALSetRasterColorInterpretation( self, val );
    4282                 :   }
    4283                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    4284              57 :     return GDALSetRasterColorInterpretation( self, val );
    4285                 :   }
    4286                 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValue(GDALRasterBandShadow *self,double *val,int *hasval){
    4287             123 :     *val = GDALGetRasterNoDataValue( self, hasval );
    4288                 :   }
    4289                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValue(GDALRasterBandShadow *self,double d){
    4290              58 :     return GDALSetRasterNoDataValue( self, d );
    4291                 :   }
    4292                 : SWIGINTERN char const *GDALRasterBandShadow_GetUnitType(GDALRasterBandShadow *self){
    4293              30 :       return GDALGetRasterUnitType( self );
    4294                 :   }
    4295                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetUnitType(GDALRasterBandShadow *self,char const *val){
    4296               8 :     return GDALSetRasterUnitType( self, val );
    4297                 :   }
    4298                 : SWIGINTERN char **GDALRasterBandShadow_GetRasterCategoryNames(GDALRasterBandShadow *self){
    4299              18 :     return GDALGetRasterCategoryNames( self );
    4300                 :   }
    4301                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterCategoryNames(GDALRasterBandShadow *self,char **names){
    4302               0 :     return GDALSetRasterCategoryNames( self, names );
    4303                 :   }
    4304                 : SWIGINTERN void GDALRasterBandShadow_GetMinimum(GDALRasterBandShadow *self,double *val,int *hasval){
    4305              37 :     *val = GDALGetRasterMinimum( self, hasval );
    4306                 :   }
    4307                 : SWIGINTERN void GDALRasterBandShadow_GetMaximum(GDALRasterBandShadow *self,double *val,int *hasval){
    4308              31 :     *val = GDALGetRasterMaximum( self, hasval );
    4309                 :   }
    4310                 : SWIGINTERN void GDALRasterBandShadow_GetOffset(GDALRasterBandShadow *self,double *val,int *hasval){
    4311              38 :     *val = GDALGetRasterOffset( self, hasval );
    4312                 :   }
    4313                 : SWIGINTERN void GDALRasterBandShadow_GetScale(GDALRasterBandShadow *self,double *val,int *hasval){
    4314              38 :     *val = GDALGetRasterScale( self, hasval );
    4315                 :   }
    4316                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetOffset(GDALRasterBandShadow *self,double val){
    4317               8 :     return GDALSetRasterOffset( self, val );
    4318                 :   }
    4319                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetScale(GDALRasterBandShadow *self,double val){
    4320               8 :     return GDALSetRasterScale( self, val );
    4321                 :   }
    4322                 : SWIGINTERN CPLErr GDALRasterBandShadow_GetStatistics(GDALRasterBandShadow *self,int approx_ok,int force,double *min,double *max,double *mean,double *stddev){
    4323              72 :     if (min) *min = 0;
    4324              72 :     if (max) *max = 0;
    4325              72 :     if (mean) *mean = 0;
    4326              72 :     if (stddev) *stddev = -1; /* This is the only way to recognize from Python if GetRasterStatistics() has updated the values */
    4327                 :     return GDALGetRasterStatistics( self, approx_ok, force, 
    4328              72 :             min, max, mean, stddev );
    4329                 :   }
    4330                 : 
    4331                 : SWIGINTERN int
    4332                 : SWIG_AsVal_bool (PyObject *obj, bool *val)
    4333                 : {
    4334              10 :   int r = PyObject_IsTrue(obj);
    4335              10 :   if (r == -1)
    4336               0 :     return SWIG_ERROR;
    4337              10 :   if (val) *val = r ? true : false;
    4338              10 :   return SWIG_OK;
    4339                 : }
    4340                 : 
    4341                 : 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){
    4342              10 :     return GDALComputeRasterStatistics( self, approx_ok, min, max, mean, stddev, callback, callback_data );
    4343                 :   }
    4344                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetStatistics(GDALRasterBandShadow *self,double min,double max,double mean,double stddev){
    4345               3 :     return GDALSetRasterStatistics( self, min, max, mean, stddev );
    4346                 :   }
    4347                 : SWIGINTERN int GDALRasterBandShadow_GetOverviewCount(GDALRasterBandShadow *self){
    4348              94 :     return GDALGetOverviewCount( self );
    4349                 :   }
    4350                 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetOverview(GDALRasterBandShadow *self,int i){
    4351             289 :     return (GDALRasterBandShadow*) GDALGetOverview( self, i );
    4352                 :   }
    4353                 : SWIGINTERN int GDALRasterBandShadow_Checksum(GDALRasterBandShadow *self,int xoff=0,int yoff=0,int *xsize=0,int *ysize=0){
    4354            2433 :     int nxsize = (xsize!=0) ? *xsize : GDALGetRasterBandXSize( self );
    4355            2433 :     int nysize = (ysize!=0) ? *ysize : GDALGetRasterBandYSize( self );
    4356            2433 :     return GDALChecksumImage( self, xoff, yoff, nxsize, nysize );
    4357                 :   }
    4358                 : SWIGINTERN void GDALRasterBandShadow_ComputeRasterMinMax(GDALRasterBandShadow *self,double argout[2],int approx_ok=0){
    4359             747 :     GDALComputeRasterMinMax( self, approx_ok, argout );
    4360                 :   }
    4361                 : SWIGINTERN void GDALRasterBandShadow_ComputeBandStats(GDALRasterBandShadow *self,double argout[2],int samplestep=1){
    4362                 :     GDALComputeBandStats( self, samplestep, argout+0, argout+1, 
    4363              12 :                           NULL, NULL );
    4364                 :   }
    4365                 : SWIGINTERN CPLErr GDALRasterBandShadow_Fill(GDALRasterBandShadow *self,double real_fill,double imag_fill=0.0){
    4366          168032 :     return GDALFillRaster( self, real_fill, imag_fill );
    4367                 :   }
    4368            1380 : 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){
    4369            1380 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    4370            1380 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    4371                 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    4372            1380 :                                         : (GDALDataType)*buf_type;
    4373            1380 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    4374            1380 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    4375                 :     return WriteRaster_internal( self, xoff, yoff, xsize, ysize,
    4376            1380 :                                  nxsize, nysize, ntype, buf_len, buf_string, pixel_space, line_space );
    4377                 :   }
    4378                 : SWIGINTERN void GDALRasterBandShadow_FlushCache(GDALRasterBandShadow *self){
    4379              11 :     GDALFlushRasterCache( self );
    4380                 :   }
    4381                 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetRasterColorTable(GDALRasterBandShadow *self){
    4382              64 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    4383                 :   }
    4384                 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetColorTable(GDALRasterBandShadow *self){
    4385              19 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    4386                 :   }
    4387                 : SWIGINTERN int GDALRasterBandShadow_SetRasterColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    4388              17 :     return GDALSetRasterColorTable( self, arg );
    4389                 :   }
    4390                 : SWIGINTERN int GDALRasterBandShadow_SetColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    4391               7 :     return GDALSetRasterColorTable( self, arg );
    4392                 :   }
    4393                 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterBandShadow_GetDefaultRAT(GDALRasterBandShadow *self){ 
    4394              25 :       return (GDALRasterAttributeTableShadow*) GDALGetDefaultRAT(self);
    4395                 :   }
    4396                 : SWIGINTERN int GDALRasterBandShadow_SetDefaultRAT(GDALRasterBandShadow *self,GDALRasterAttributeTableShadow *table){
    4397               2 :       return GDALSetDefaultRAT(self, table);
    4398                 :   }
    4399                 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetMaskBand(GDALRasterBandShadow *self){
    4400             132 :       return (GDALRasterBandShadow *) GDALGetMaskBand( self );
    4401                 :   }
    4402                 : SWIGINTERN int GDALRasterBandShadow_GetMaskFlags(GDALRasterBandShadow *self){
    4403              90 :       return GDALGetMaskFlags( self );
    4404                 :   }
    4405                 : SWIGINTERN CPLErr GDALRasterBandShadow_CreateMaskBand(GDALRasterBandShadow *self,int nFlags){
    4406              12 :       return GDALCreateMaskBand( self, nFlags );
    4407                 :   }
    4408                 : 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){
    4409               9 :     CPLErrorReset(); 
    4410                 :     CPLErr err = GDALGetRasterHistogram( self, min, max, buckets, panHistogram,
    4411                 :                                          include_out_of_range, approx_ok,
    4412               9 :                                          callback, callback_data );
    4413               9 :     return err;
    4414                 :   }
    4415                 : 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){
    4416                 :     return GDALGetDefaultHistogram( self, min_ret, max_ret, buckets_ret,
    4417                 :                                     ppanHistogram, force, 
    4418              10 :                                     callback, callback_data );
    4419                 : }
    4420                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetDefaultHistogram(GDALRasterBandShadow *self,double min,double max,int buckets_in,int *panHistogram_in){
    4421                 :     return GDALSetDefaultHistogram( self, min, max, 
    4422               6 :                   buckets_in, panHistogram_in );
    4423                 : }
    4424                 : SWIGINTERN bool GDALRasterBandShadow_HasArbitraryOverviews(GDALRasterBandShadow *self){
    4425              20 :       return (GDALHasArbitraryOverviews( self ) != 0) ? true : false;
    4426                 :   }
    4427                 : 
    4428                 : SWIGINTERNINLINE PyObject*
    4429                 :   SWIG_From_bool  (bool value)
    4430                 : {
    4431              20 :   return PyBool_FromLong(value ? 1 : 0);
    4432                 : }
    4433                 : 
    4434                 : SWIGINTERN char **GDALRasterBandShadow_GetCategoryNames(GDALRasterBandShadow *self){
    4435              12 :     return GDALGetRasterCategoryNames( self );
    4436                 :   }
    4437                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetCategoryNames(GDALRasterBandShadow *self,char **papszCategoryNames){
    4438               4 :     return GDALSetRasterCategoryNames( self, papszCategoryNames );
    4439                 :   }
    4440             398 : 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){
    4441             398 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    4442             398 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    4443                 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    4444             398 :                                         : (GDALDataType)*buf_type;
    4445             398 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    4446             398 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    4447                 : 
    4448                 :     GIntBig buf_size = ComputeBandRasterIOSize( nxsize, nysize, GDALGetDataTypeSize( ntype ) / 8,
    4449             398 :                                             pixel_space, line_space, FALSE ); 
    4450             398 :     if (buf_size == 0)
    4451                 :     {
    4452               1 :         *buf = NULL;
    4453               1 :         return CE_Failure;
    4454                 :     }
    4455                 : #if PY_VERSION_HEX >= 0x03000000 
    4456                 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size ); 
    4457                 :     if (*buf == NULL)
    4458                 :     {
    4459                 :         *buf = Py_None;
    4460                 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4461                 :         return CE_Failure;
    4462                 :     }
    4463                 :     char *data = PyBytes_AsString( (PyObject *)*buf ); 
    4464                 : #else 
    4465             397 :     *buf = (void *)PyString_FromStringAndSize( NULL, buf_size ); 
    4466             397 :     if (*buf == NULL)
    4467                 :     {
    4468               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4469               0 :         return CE_Failure;
    4470                 :     }
    4471             397 :     char *data = PyString_AsString( (PyObject *)*buf ); 
    4472                 : #endif
    4473                 :     CPLErr eErr = GDALRasterIO( self, GF_Read, xoff, yoff, xsize, ysize, 
    4474                 :                          (void *) data, nxsize, nysize, ntype, 
    4475             397 :                          pixel_space, line_space ); 
    4476             397 :     if (eErr == CE_Failure)
    4477                 :     {
    4478               1 :         Py_DECREF((PyObject*)*buf);
    4479               1 :         *buf = NULL;
    4480                 :     }
    4481             397 :     return eErr;
    4482                 :   }
    4483               1 : SWIGINTERN CPLErr GDALRasterBandShadow_ReadBlock(GDALRasterBandShadow *self,int xoff,int yoff,void **buf){
    4484                 : 
    4485                 :     int nBlockXSize, nBlockYSize;
    4486               1 :     GDALGetBlockSize(self, &nBlockXSize, &nBlockYSize);
    4487               1 :     int nDataTypeSize = (GDALGetDataTypeSize(GDALGetRasterDataType(self)) / 8);
    4488               1 :     GIntBig buf_size = (GIntBig)nBlockXSize * nBlockYSize * nDataTypeSize;
    4489                 : 
    4490                 : #if PY_VERSION_HEX >= 0x03000000 
    4491                 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size ); 
    4492                 :     if (*buf == NULL)
    4493                 :     {
    4494                 :         *buf = Py_None;
    4495                 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4496                 :         return CE_Failure;
    4497                 :     }
    4498                 :     char *data = PyBytes_AsString( (PyObject *)*buf ); 
    4499                 : #else 
    4500               1 :     *buf = (void *)PyString_FromStringAndSize( NULL, buf_size ); 
    4501               1 :     if (*buf == NULL)
    4502                 :     {
    4503               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4504               0 :         return CE_Failure;
    4505                 :     }
    4506               1 :     char *data = PyString_AsString( (PyObject *)*buf ); 
    4507                 : #endif
    4508               1 :     CPLErr eErr = GDALReadBlock( self, xoff, yoff, (void *) data); 
    4509               1 :     if (eErr == CE_Failure)
    4510                 :     {
    4511               0 :         Py_DECREF((PyObject*)*buf);
    4512               0 :         *buf = NULL;
    4513                 :     }
    4514               1 :     return eErr;
    4515                 :   }
    4516                 : 
    4517            3632 : GDALDataType GDALRasterBandShadow_DataType_get( GDALRasterBandShadow *h ) {
    4518            3632 :   return GDALGetRasterDataType( h );
    4519                 : }
    4520            8306 : int GDALRasterBandShadow_XSize_get( GDALRasterBandShadow *h ) {
    4521            8306 :   return GDALGetRasterBandXSize( h );
    4522                 : }
    4523            8267 : int GDALRasterBandShadow_YSize_get( GDALRasterBandShadow *h ) {
    4524            8267 :   return GDALGetRasterBandYSize( h );
    4525                 : }
    4526                 : 
    4527                 : SWIGINTERN GDALColorTableShadow *new_GDALColorTableShadow(GDALPaletteInterp palette=GPI_RGB){
    4528              24 :         return (GDALColorTableShadow*) GDALCreateColorTable(palette);
    4529                 :     }
    4530                 : SWIGINTERN void delete_GDALColorTableShadow(GDALColorTableShadow *self){
    4531              25 :         GDALDestroyColorTable(self);
    4532                 :     }
    4533                 : SWIGINTERN GDALColorTableShadow *GDALColorTableShadow_Clone(GDALColorTableShadow *self){
    4534               1 :         return (GDALColorTableShadow*) GDALCloneColorTable (self);
    4535                 :     }
    4536                 : SWIGINTERN GDALPaletteInterp GDALColorTableShadow_GetPaletteInterpretation(GDALColorTableShadow *self){
    4537               2 :         return GDALGetPaletteInterpretation(self);
    4538                 :     }
    4539                 : SWIGINTERN int GDALColorTableShadow_GetColorEntryCount(GDALColorTableShadow *self){
    4540              23 :         return GDALGetColorEntryCount(self);
    4541                 :     }
    4542                 : SWIGINTERN GDALColorEntry *GDALColorTableShadow_GetColorEntry(GDALColorTableShadow *self,int entry){
    4543            1525 :         return (GDALColorEntry*) GDALGetColorEntry(self, entry);
    4544                 :     }
    4545                 : SWIGINTERN int GDALColorTableShadow_GetColorEntryAsRGB(GDALColorTableShadow *self,int entry,GDALColorEntry *centry){
    4546               0 :         return GDALGetColorEntryAsRGB(self, entry, centry);
    4547                 :     }
    4548                 : SWIGINTERN void GDALColorTableShadow_SetColorEntry(GDALColorTableShadow *self,int entry,GDALColorEntry const *centry){
    4549              56 :         GDALSetColorEntry(self, entry, centry);
    4550                 :     }
    4551                 : SWIGINTERN void GDALColorTableShadow_CreateColorRamp(GDALColorTableShadow *self,int nStartIndex,GDALColorEntry const *startcolor,int nEndIndex,GDALColorEntry const *endcolor){
    4552               1 :         GDALCreateColorRamp(self, nStartIndex, startcolor, nEndIndex, endcolor);
    4553                 :     }
    4554                 : SWIGINTERN GDALRasterAttributeTableShadow *new_GDALRasterAttributeTableShadow(){
    4555                 :         return (GDALRasterAttributeTableShadow*) 
    4556               2 :     GDALCreateRasterAttributeTable();
    4557                 :     }
    4558                 : SWIGINTERN void delete_GDALRasterAttributeTableShadow(GDALRasterAttributeTableShadow *self){
    4559               3 :         GDALDestroyRasterAttributeTable(self);
    4560                 :     }
    4561                 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterAttributeTableShadow_Clone(GDALRasterAttributeTableShadow *self){
    4562               1 :         return (GDALRasterAttributeTableShadow*) GDALRATClone(self);
    4563                 :     }
    4564                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColumnCount(GDALRasterAttributeTableShadow *self){ 
    4565               5 :         return GDALRATGetColumnCount( self );
    4566                 :     }
    4567                 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetNameOfCol(GDALRasterAttributeTableShadow *self,int iCol){ 
    4568               4 :         return GDALRATGetNameOfCol( self, iCol );
    4569                 :     }
    4570                 : SWIGINTERN GDALRATFieldUsage GDALRasterAttributeTableShadow_GetUsageOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    4571               6 :         return GDALRATGetUsageOfCol( self, iCol );
    4572                 :     }
    4573                 : SWIGINTERN GDALRATFieldType GDALRasterAttributeTableShadow_GetTypeOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    4574               6 :         return GDALRATGetTypeOfCol( self, iCol );
    4575                 :     }
    4576                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColOfUsage(GDALRasterAttributeTableShadow *self,GDALRATFieldUsage eUsage){
    4577               0 :         return GDALRATGetColOfUsage( self, eUsage );
    4578                 :     }
    4579                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowCount(GDALRasterAttributeTableShadow *self){ 
    4580               3 :         return GDALRATGetRowCount( self );
    4581                 :     }
    4582                 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol){ 
    4583               0 :         return GDALRATGetValueAsString( self, iRow, iCol );
    4584                 :     }
    4585                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol){ 
    4586               6 :         return GDALRATGetValueAsInt( self, iRow, iCol );
    4587                 :     }
    4588                 : SWIGINTERN double GDALRasterAttributeTableShadow_GetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol){ 
    4589               0 :         return GDALRATGetValueAsDouble( self, iRow, iCol );
    4590                 :     }
    4591                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol,char const *pszValue){ 
    4592               0 :         GDALRATSetValueAsString( self, iRow, iCol, pszValue );
    4593                 :     }
    4594                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol,int nValue){ 
    4595               6 :         GDALRATSetValueAsInt( self, iRow, iCol, nValue );
    4596                 :     }
    4597                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol,double dfValue){ 
    4598               0 :         GDALRATSetValueAsDouble( self, iRow, iCol, dfValue );
    4599                 :     }
    4600                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetRowCount(GDALRasterAttributeTableShadow *self,int nCount){
    4601               1 :         GDALRATSetRowCount( self, nCount );
    4602                 :     }
    4603                 : SWIGINTERN int GDALRasterAttributeTableShadow_CreateColumn(GDALRasterAttributeTableShadow *self,char const *pszName,GDALRATFieldType eType,GDALRATFieldUsage eUsage){
    4604               2 :         return GDALRATCreateColumn( self, pszName, eType, eUsage );
    4605                 :     }
    4606                 : SWIGINTERN bool GDALRasterAttributeTableShadow_GetLinearBinning(GDALRasterAttributeTableShadow *self,double *pdfRow0Min,double *pdfBinSize){
    4607               0 :         return (GDALRATGetLinearBinning(self, pdfRow0Min, pdfBinSize) != 0) ? true : false;
    4608                 :     }
    4609                 : SWIGINTERN int GDALRasterAttributeTableShadow_SetLinearBinning(GDALRasterAttributeTableShadow *self,double dfRow0Min,double dfBinSize){
    4610               0 :         return GDALRATSetLinearBinning(self, dfRow0Min, dfBinSize);
    4611                 :     }
    4612                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowOfValue(GDALRasterAttributeTableShadow *self,double dfValue){
    4613               2 :         return GDALRATGetRowOfValue( self, dfValue );
    4614                 :     }
    4615                 : 
    4616                 : #include "gdalgrid.h"
    4617                 : 
    4618                 : #ifdef DEBUG 
    4619                 : typedef struct OGRLayerHS OGRLayerShadow;
    4620                 : typedef struct OGRGeometryHS OGRGeometryShadow;
    4621                 : #else
    4622                 : typedef void OGRLayerShadow;
    4623                 : typedef void OGRGeometryShadow;
    4624                 : #endif
    4625                 : 
    4626                 : 
    4627            2062 : int GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
    4628            2062 :   return GDALTermProgress( dfProgress, pszMessage, pData);
    4629                 : }
    4630                 : 
    4631                 : 
    4632               3 : int  ComputeMedianCutPCT ( GDALRasterBandShadow *red,
    4633                 :                               GDALRasterBandShadow *green,
    4634                 :                               GDALRasterBandShadow *blue,
    4635                 :                               int num_colors,
    4636                 :                               GDALColorTableShadow* colors,
    4637                 :                               GDALProgressFunc callback = NULL,
    4638                 :                               void* callback_data=NULL) {
    4639                 : 
    4640               3 :     CPLErrorReset();
    4641                 : 
    4642                 :     int err = GDALComputeMedianCutPCT( red,
    4643                 :                                           green,
    4644                 :                                           blue,
    4645                 :                                           NULL,
    4646                 :                                           num_colors,
    4647                 :                                           colors,
    4648                 :                                           callback,
    4649               3 :                                           callback_data);
    4650                 :     
    4651               3 :     return err;
    4652                 : }
    4653                 : 
    4654                 : 
    4655               4 : int  DitherRGB2PCT ( GDALRasterBandShadow *red,
    4656                 :                      GDALRasterBandShadow *green,
    4657                 :                      GDALRasterBandShadow *blue,
    4658                 :                      GDALRasterBandShadow *target,
    4659                 :                      GDALColorTableShadow *colors,
    4660                 :                      GDALProgressFunc callback = NULL,
    4661                 :                      void* callback_data=NULL) {
    4662                 : 
    4663               4 :     CPLErrorReset();
    4664                 :     int err;
    4665                 :     err = GDALDitherRGB2PCT(  red,
    4666                 :                                   green,
    4667                 :                                   blue,
    4668                 :                                   target,
    4669                 :                                   colors,
    4670                 :                                   callback,
    4671               4 :                                   callback_data);
    4672                 :     
    4673               4 :     return err;
    4674                 : }
    4675                 : 
    4676                 : 
    4677               9 : CPLErr  ReprojectImage ( GDALDatasetShadow *src_ds,
    4678                 :                          GDALDatasetShadow *dst_ds,
    4679                 :                          const char *src_wkt=NULL,
    4680                 :                          const char *dst_wkt=NULL,
    4681                 :                          GDALResampleAlg eResampleAlg=GRA_NearestNeighbour,
    4682                 :                          double WarpMemoryLimit=0.0,
    4683                 :                          double maxerror = 0.0,
    4684                 :        GDALProgressFunc callback = NULL,
    4685                 :                        void* callback_data=NULL) {
    4686                 : 
    4687               9 :     CPLErrorReset();
    4688                 : 
    4689                 :     CPLErr err = GDALReprojectImage( src_ds,
    4690                 :                                      src_wkt,
    4691                 :                                      dst_ds,
    4692                 :                                      dst_wkt,
    4693                 :                                      eResampleAlg,
    4694                 :                                      WarpMemoryLimit,
    4695                 :                                      maxerror,
    4696                 :                                      callback,
    4697                 :                                      callback_data,
    4698               9 :                                      NULL);
    4699                 :     
    4700               9 :     return err;
    4701                 : }
    4702                 : 
    4703                 : 
    4704               4 : int  ComputeProximity( GDALRasterBandShadow *srcBand,
    4705                 :                        GDALRasterBandShadow *proximityBand,
    4706                 :                        char **options = NULL,
    4707                 :                        GDALProgressFunc callback=NULL,
    4708                 :                        void* callback_data=NULL) {
    4709                 : 
    4710               4 :     CPLErrorReset();
    4711                 : 
    4712                 :     return GDALComputeProximity( srcBand, proximityBand, options,
    4713               4 :                                  callback, callback_data );
    4714                 : }
    4715                 : 
    4716                 : 
    4717               4 : int  RasterizeLayer( GDALDatasetShadow *dataset,
    4718                 :                  int bands, int *band_list,
    4719                 :                  OGRLayerShadow *layer,
    4720                 :                  void *pfnTransformer = NULL,
    4721                 :                  void *pTransformArg = NULL, 
    4722                 :      int burn_values = 0, double *burn_values_list = NULL, 
    4723                 :                  char **options = NULL,
    4724                 :                  GDALProgressFunc callback=NULL,
    4725                 :                  void* callback_data=NULL) {
    4726                 : 
    4727                 :     CPLErr eErr;
    4728                 : 
    4729               4 :     CPLErrorReset();
    4730                 : 
    4731               4 :     if( burn_values == 0 )
    4732                 :     {
    4733               1 :         burn_values_list = (double *) CPLMalloc(sizeof(double)*bands);
    4734               4 :         for( int i = 0; i < bands; i++ )
    4735               3 :             burn_values_list[i] = 255.0;
    4736                 :     }
    4737               3 :     else if( burn_values != bands )
    4738                 :     {
    4739                 :         CPLError( CE_Failure, CPLE_AppDefined, 
    4740               0 :                   "Did not get the expected number of burn values in RasterizeLayer()" );
    4741               0 :         return CE_Failure;
    4742                 :     }
    4743                 : 
    4744                 :     eErr = GDALRasterizeLayers( dataset, bands, band_list,
    4745                 :                                 1, &layer, 
    4746                 :                                 (GDALTransformerFunc) pfnTransformer, 
    4747                 :                                 pTransformArg,
    4748                 :                                 burn_values_list, options, 
    4749               4 :                                 callback, callback_data );
    4750                 : 
    4751               4 :     if( burn_values == 0 )
    4752               1 :         CPLFree( burn_values_list );
    4753                 : 
    4754               4 :     return eErr;
    4755                 : }
    4756                 : 
    4757                 : 
    4758               6 : int  Polygonize( GDALRasterBandShadow *srcBand,
    4759                 :          GDALRasterBandShadow *maskBand,
    4760                 :              OGRLayerShadow *outLayer, 
    4761                 :                  int iPixValField,
    4762                 :                  char **options = NULL,
    4763                 :                  GDALProgressFunc callback=NULL,
    4764                 :                  void* callback_data=NULL) {
    4765                 : 
    4766               6 :     CPLErrorReset();
    4767                 : 
    4768                 :     return GDALPolygonize( srcBand, maskBand, outLayer, iPixValField,
    4769               6 :                            options, callback, callback_data );
    4770                 : }
    4771                 : 
    4772                 : 
    4773               1 : int  FillNodata( GDALRasterBandShadow *targetBand,
    4774                 :          GDALRasterBandShadow *maskBand,
    4775                 :                  double maxSearchDist,
    4776                 :                  int smoothingIterations,
    4777                 :                  char **options = NULL,
    4778                 :                  GDALProgressFunc callback=NULL,
    4779                 :                  void* callback_data=NULL) {
    4780                 : 
    4781               1 :     CPLErrorReset();
    4782                 : 
    4783                 :     return GDALFillNodata( targetBand, maskBand, maxSearchDist, 
    4784                 :                0, smoothingIterations, options, 
    4785               1 :          callback, callback_data );
    4786                 : }
    4787                 : 
    4788                 : 
    4789               6 : int  SieveFilter( GDALRasterBandShadow *srcBand,
    4790                 :           GDALRasterBandShadow *maskBand,
    4791                 :               GDALRasterBandShadow *dstBand,
    4792                 :                   int threshold, int connectedness=4,
    4793                 :                   char **options = NULL,
    4794                 :                   GDALProgressFunc callback=NULL,
    4795                 :                   void* callback_data=NULL) {
    4796                 : 
    4797               6 :     CPLErrorReset();
    4798                 : 
    4799                 :     return GDALSieveFilter( srcBand, maskBand, dstBand, 
    4800                 :                             threshold, connectedness,
    4801               6 :                             options, callback, callback_data );
    4802                 : }
    4803                 : 
    4804                 : 
    4805               2 : int  RegenerateOverviews( GDALRasterBandShadow *srcBand,
    4806                 :             int overviewBandCount,
    4807                 :                           GDALRasterBandShadow **overviewBands,
    4808                 :                           const char *resampling = "average",
    4809                 :                           GDALProgressFunc callback=NULL,
    4810                 :                           void* callback_data=NULL) {
    4811                 : 
    4812               2 :     CPLErrorReset();
    4813                 : 
    4814                 :     return GDALRegenerateOverviews( srcBand, overviewBandCount, overviewBands,
    4815               2 :                   resampling ? resampling : "average", callback, callback_data );
    4816                 : }
    4817                 : 
    4818                 : 
    4819               2 : int  RegenerateOverview( GDALRasterBandShadow *srcBand,
    4820                 :                           GDALRasterBandShadow *overviewBand,
    4821                 :                           const char *resampling = "average",
    4822                 :                           GDALProgressFunc callback=NULL,
    4823                 :                           void* callback_data=NULL) {
    4824                 : 
    4825               2 :     CPLErrorReset();
    4826                 : 
    4827                 :     return GDALRegenerateOverviews( srcBand, 1, &overviewBand,
    4828               2 :                   resampling ? resampling : "average", callback, callback_data );
    4829                 : }
    4830                 : 
    4831                 : 
    4832               2 : int ContourGenerate( GDALRasterBandShadow *srcBand,
    4833                 :                      double contourInterval,
    4834                 :                      double contourBase,
    4835                 :                      int fixedLevelCount,
    4836                 :                      double *fixedLevels,
    4837                 :                      int useNoData,
    4838                 :                      double noDataValue,
    4839                 :                      OGRLayerShadow* dstLayer, 
    4840                 :                      int idField,
    4841                 :                      int elevField,
    4842                 :                      GDALProgressFunc callback = NULL,
    4843                 :                      void* callback_data = NULL)
    4844                 : {
    4845                 :     CPLErr eErr;
    4846                 : 
    4847               2 :     CPLErrorReset();
    4848                 : 
    4849                 :     eErr =  GDALContourGenerate( srcBand,
    4850                 :                                  contourInterval,
    4851                 :                                  contourBase,
    4852                 :                                  fixedLevelCount,
    4853                 :                                  fixedLevels,
    4854                 :                                  useNoData,
    4855                 :                                  noDataValue,
    4856                 :                                  dstLayer,
    4857                 :                                  idField,
    4858                 :                                  elevField,
    4859                 :                                  callback,
    4860               2 :                                  callback_data);
    4861                 : 
    4862               2 :     return eErr;
    4863                 : }
    4864                 : 
    4865                 : 
    4866              14 : GDALDatasetShadow *AutoCreateWarpedVRT( GDALDatasetShadow *src_ds,
    4867                 :                                         const char *src_wkt = 0,
    4868                 :                                         const char *dst_wkt = 0,
    4869                 :                                         GDALResampleAlg eResampleAlg = GRA_NearestNeighbour,
    4870                 :                                         double maxerror = 0.0 ) {
    4871                 :   GDALDatasetShadow *ds = GDALAutoCreateWarpedVRT( src_ds, src_wkt,
    4872                 :                                                    dst_wkt,
    4873                 :                                                    eResampleAlg,
    4874                 :                                                    maxerror,
    4875              14 :                                                    0 );
    4876                 :   if (ds == 0) {
    4877                 :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    4878                 :   }
    4879              14 :   return ds;
    4880                 :   
    4881                 : }
    4882                 : 
    4883                 : SWIGINTERN GDALTransformerInfoShadow *new_GDALTransformerInfoShadow(GDALDatasetShadow *src,GDALDatasetShadow *dst,char **options){
    4884                 :     GDALTransformerInfoShadow *obj = (GDALTransformerInfoShadow*) 
    4885                 :        GDALCreateGenImgProjTransformer2( (GDALDatasetH)src, (GDALDatasetH)dst, 
    4886               9 :                                          options );
    4887               9 :     return obj;
    4888                 :   }
    4889                 : SWIGINTERN void delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow *self){
    4890               9 :     GDALDestroyTransformer( self );
    4891                 :   }
    4892                 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_0(GDALTransformerInfoShadow *self,int bDstToSrc,double inout[3]){
    4893               0 :     int nRet, nSuccess = TRUE;
    4894                 : 
    4895                 :     nRet = GDALUseTransformer( self, bDstToSrc, 
    4896                 :                                1, &inout[0], &inout[1], &inout[2], 
    4897               0 :                                &nSuccess );
    4898                 : 
    4899               0 :     return nRet && nSuccess;
    4900                 :   }
    4901                 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_1(GDALTransformerInfoShadow *self,double argout[3],int bDstToSrc,double x,double y,double z=0.0){
    4902              16 :     int nRet, nSuccess = TRUE;
    4903                 :     
    4904              16 :     argout[0] = x;
    4905              16 :     argout[1] = y;
    4906              16 :     argout[2] = z;
    4907                 :     nRet = GDALUseTransformer( self, bDstToSrc, 
    4908                 :                                1, &argout[0], &argout[1], &argout[2], 
    4909              16 :                                &nSuccess );
    4910                 : 
    4911              16 :     return nRet && nSuccess;
    4912                 :   }
    4913                 : 
    4914                 : static int
    4915               1 : DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z )
    4916                 : {
    4917               2 :   for( int i = 0; i<nCount; ++i )
    4918                 :   {
    4919                 : 
    4920               1 :     PyObject *o = PySequence_GetItem(seq, i);
    4921               1 :     if ( !PySequence_Check(o) )
    4922                 :     {
    4923               0 :         Py_DECREF(o);
    4924               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
    4925                 : 
    4926               0 :         return FALSE;
    4927                 :     }
    4928                 : 
    4929               1 :     Py_ssize_t len = PySequence_Size(o);
    4930                 : 
    4931               1 :     if (len == 2 || len == 3)
    4932                 :     {
    4933               1 :         PyObject *o1 = PySequence_GetItem(o, 0);
    4934               1 :         if (!PyNumber_Check(o1))
    4935                 :         {
    4936               0 :             Py_DECREF(o); Py_DECREF(o1);
    4937               0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    4938                 : 
    4939               0 :             return FALSE;
    4940                 :         }
    4941               1 :         x[i] = PyFloat_AsDouble(o1);
    4942               1 :         Py_DECREF(o1);
    4943                 : 
    4944               1 :         o1 = PySequence_GetItem(o, 1);
    4945               1 :         if (!PyNumber_Check(o1))
    4946                 :         {
    4947               0 :             Py_DECREF(o); Py_DECREF(o1);
    4948               0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    4949                 : 
    4950               0 :             return FALSE;
    4951                 :         }
    4952               1 :         y[i] = PyFloat_AsDouble(o1);
    4953               1 :         Py_DECREF(o1);
    4954                 : 
    4955                 :         /* The 3rd coordinate is optional, default 0.0 */
    4956               1 :         if (len == 3)
    4957                 :         {
    4958               0 :             o1 = PySequence_GetItem(o, 2);
    4959               0 :             if (!PyNumber_Check(o1))
    4960                 :             {
    4961               0 :                 Py_DECREF(o); Py_DECREF(o1);
    4962               0 :                 PyErr_SetString(PyExc_TypeError, "not a number");
    4963                 : 
    4964               0 :                 return FALSE;
    4965                 :             }
    4966               0 :             z[i] = PyFloat_AsDouble(o1);
    4967               0 :             Py_DECREF(o1);
    4968                 :         }
    4969                 :         else
    4970                 :         {
    4971               1 :             z[i] = 0.0;
    4972                 :         }
    4973                 :     }
    4974                 :     else
    4975                 :     {
    4976               0 :         Py_DECREF(o);
    4977               0 :         PyErr_SetString(PyExc_TypeError, "invalid coordinate");
    4978                 : 
    4979               0 :         return FALSE;
    4980                 :     }
    4981                 : 
    4982               1 :     Py_DECREF(o);
    4983                 :   }
    4984                 : 
    4985               1 :   return TRUE;
    4986                 : }
    4987                 : 
    4988                 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow *self,int bDstToSrc,int nCount,double *x,double *y,double *z,int *panSuccess){
    4989                 :     int nRet;
    4990                 : 
    4991               1 :     nRet = GDALUseTransformer( self, bDstToSrc, nCount, x, y, z, panSuccess );
    4992                 : 
    4993               1 :     return nRet;
    4994                 :   }
    4995                 : SWIGINTERN int GDALTransformerInfoShadow_TransformGeolocations(GDALTransformerInfoShadow *self,GDALRasterBandShadow *xBand,GDALRasterBandShadow *yBand,GDALRasterBandShadow *zBand,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=NULL){
    4996                 : 
    4997               1 :     CPLErrorReset();
    4998                 : 
    4999                 :     return GDALTransformGeolocations( xBand, yBand, zBand, 
    5000                 :                                       GDALUseTransformer, self,
    5001               1 :                                     callback, callback_data, options );
    5002                 :   }
    5003                 : 
    5004              11 : GIntBig wrapper_GDALGetCacheMax()
    5005                 : {
    5006              11 :     return GDALGetCacheMax64();
    5007                 : }
    5008                 : 
    5009                 : 
    5010               2 : GIntBig wrapper_GDALGetCacheUsed()
    5011                 : {
    5012               2 :     return GDALGetCacheUsed64();
    5013                 : }
    5014                 : 
    5015                 : 
    5016              14 : void wrapper_GDALSetCacheMax(GIntBig nBytes)
    5017                 : {
    5018              14 :     return GDALSetCacheMax64(nBytes);
    5019                 : }
    5020                 : 
    5021                 : 
    5022                 : /************************************************************************/
    5023                 : /*                          XMLTreeToPyList()                           */
    5024                 : /************************************************************************/
    5025             151 : static PyObject *XMLTreeToPyList( CPLXMLNode *psTree )
    5026                 : {
    5027                 :     PyObject *pyList;
    5028             151 :     int      nChildCount = 0, iChild;
    5029                 :     CPLXMLNode *psChild;
    5030                 : 
    5031             295 :     for( psChild = psTree->psChild; 
    5032                 :          psChild != NULL; 
    5033                 :          psChild = psChild->psNext )
    5034             144 :         nChildCount++;
    5035                 : 
    5036             151 :     pyList = PyList_New(nChildCount+2);
    5037                 : 
    5038             151 :     PyList_SetItem( pyList, 0, Py_BuildValue( "i", (int) psTree->eType ) );
    5039             151 :     PyList_SetItem( pyList, 1, Py_BuildValue( "s", psTree->pszValue ) );
    5040                 : 
    5041             295 :     for( psChild = psTree->psChild, iChild = 2; 
    5042                 :          psChild != NULL; 
    5043                 :          psChild = psChild->psNext, iChild++ )
    5044                 :     {
    5045             144 :         PyList_SetItem( pyList, iChild, XMLTreeToPyList( psChild ) );
    5046                 :     }
    5047                 : 
    5048             151 :     return pyList; 
    5049                 : }
    5050                 : 
    5051                 : 
    5052                 : /************************************************************************/
    5053                 : /*                          PyListToXMLTree()                           */
    5054                 : /************************************************************************/
    5055              11 : static CPLXMLNode *PyListToXMLTree( PyObject *pyList )
    5056                 : 
    5057                 : {
    5058              11 :     int      nChildCount = 0, iChild, nType;
    5059                 :     CPLXMLNode *psThisNode;
    5060                 :     CPLXMLNode *psChild;
    5061              11 :     char       *pszText = NULL;
    5062                 : 
    5063              11 :     nChildCount = PyList_Size(pyList) - 2;
    5064              11 :     if( nChildCount < 0 )
    5065                 :     {
    5066               0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    5067               0 :         return NULL;
    5068                 :     }
    5069                 : 
    5070              11 :     PyArg_Parse( PyList_GET_ITEM(pyList,0), "i", &nType );
    5071              11 :     PyArg_Parse( PyList_GET_ITEM(pyList,1), "s", &pszText );
    5072                 : 
    5073                 :     /* Detect "pseudo" root */
    5074              11 :     if (nType == CXT_Element && pszText != NULL && strlen(pszText) == 0 && nChildCount == 2)
    5075                 :     {
    5076               1 :         PyObject *pyFirst = PyList_GET_ITEM(pyList, 2);
    5077               1 :         if (PyList_Size(pyFirst) < 2)
    5078                 :         {
    5079               0 :             PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    5080               0 :             return NULL;
    5081                 :         }
    5082               1 :         int nTypeFirst = 0;
    5083               1 :         char* pszTextFirst = NULL;
    5084               1 :         PyArg_Parse( PyList_GET_ITEM(pyFirst,0), "i", &nTypeFirst );
    5085               1 :         PyArg_Parse( PyList_GET_ITEM(pyFirst,1), "s", &pszTextFirst );
    5086               1 :         if (nTypeFirst == CXT_Element && pszTextFirst != NULL && pszTextFirst[0] == '?')
    5087                 :         {
    5088               1 :             psThisNode = PyListToXMLTree( PyList_GET_ITEM(pyList,2) );
    5089               1 :             psThisNode->psNext = PyListToXMLTree( PyList_GET_ITEM(pyList,3) );
    5090               1 :             return psThisNode;
    5091                 :         }
    5092                 :     }
    5093                 : 
    5094              10 :     psThisNode = CPLCreateXMLNode( NULL, (CPLXMLNodeType) nType, pszText );
    5095                 : 
    5096              17 :     for( iChild = 0; iChild < nChildCount; iChild++ )
    5097                 :     {
    5098               7 :         psChild = PyListToXMLTree( PyList_GET_ITEM(pyList,iChild+2) );
    5099               7 :         CPLAddXMLChild( psThisNode, psChild );
    5100                 :     }
    5101                 : 
    5102              10 :     return psThisNode;
    5103                 : }
    5104                 : 
    5105                 : 
    5106              18 : int GetDriverCount() {
    5107              18 :   return GDALGetDriverCount();
    5108                 : }
    5109                 : 
    5110                 : 
    5111            2171 : GDALDriverShadow* GetDriverByName( char const *name ) {
    5112            2171 :   return (GDALDriverShadow*) GDALGetDriverByName( name );
    5113                 : }
    5114                 : 
    5115                 : 
    5116            2340 : GDALDriverShadow* GetDriver( int i ) {
    5117            2340 :   return (GDALDriverShadow*) GDALGetDriver( i );
    5118                 : }
    5119                 : 
    5120                 : 
    5121            4489 : GDALDatasetShadow* Open( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    5122            4489 :   CPLErrorReset();
    5123            4489 :   GDALDatasetShadow *ds = GDALOpen( utf8_path, eAccess );
    5124            4489 :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    5125                 :   {
    5126               4 :       if ( GDALDereferenceDataset( ds ) <= 0 )
    5127               4 :           GDALClose(ds);
    5128               4 :       ds = NULL;
    5129                 :   }
    5130            4489 :   return (GDALDatasetShadow*) ds;
    5131                 : }
    5132                 : 
    5133                 : 
    5134            5004 : GDALDatasetShadow* OpenShared( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    5135            5004 :   CPLErrorReset();
    5136            5004 :   GDALDatasetShadow *ds = GDALOpenShared( utf8_path, eAccess );
    5137            5004 :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    5138                 :   {
    5139               0 :       if ( GDALDereferenceDataset( ds ) <= 0 )
    5140               0 :           GDALClose(ds);
    5141               0 :       ds = NULL;
    5142                 :   }
    5143            5004 :   return (GDALDatasetShadow*) ds;
    5144                 : }
    5145                 : 
    5146                 : 
    5147               9 : GDALDriverShadow *IdentifyDriver( const char *utf8_path, 
    5148                 :                                   char **papszSiblings = NULL ) {
    5149                 :     return (GDALDriverShadow *) GDALIdentifyDriver( utf8_path, 
    5150               9 :                                               papszSiblings );
    5151                 : }
    5152                 : 
    5153                 : 
    5154              54 :   char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    5155                 :     int nResArgCount;
    5156                 : 
    5157                 :     nResArgCount = 
    5158              54 :       GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions ); 
    5159                 : 
    5160              54 :     if( nResArgCount <= 0 )
    5161               0 :         return NULL;
    5162                 :     else
    5163              54 :         return papszArgv;
    5164                 :   }
    5165                 : 
    5166                 : #ifdef __cplusplus
    5167                 : extern "C" {
    5168                 : #endif
    5169               1 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5170               1 :   PyObject *resultobj = 0;
    5171                 :   int result;
    5172                 :   
    5173               1 :   if (!PyArg_ParseTuple(args,(char *)":GetUseExceptions")) SWIG_fail;
    5174               1 :   result = (int)GetUseExceptions();
    5175               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5176               1 :   return resultobj;
    5177                 : fail:
    5178               0 :   return NULL;
    5179                 : }
    5180                 : 
    5181                 : 
    5182               1 : SWIGINTERN PyObject *_wrap_UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5183               1 :   PyObject *resultobj = 0;
    5184                 :   
    5185               1 :   if (!PyArg_ParseTuple(args,(char *)":UseExceptions")) SWIG_fail;
    5186               1 :   UseExceptions();
    5187               1 :   resultobj = SWIG_Py_Void();
    5188               1 :   return resultobj;
    5189                 : fail:
    5190               0 :   return NULL;
    5191                 : }
    5192                 : 
    5193                 : 
    5194               1 : SWIGINTERN PyObject *_wrap_DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5195               1 :   PyObject *resultobj = 0;
    5196                 :   
    5197               1 :   if (!PyArg_ParseTuple(args,(char *)":DontUseExceptions")) SWIG_fail;
    5198               1 :   DontUseExceptions();
    5199               1 :   resultobj = SWIG_Py_Void();
    5200               1 :   return resultobj;
    5201                 : fail:
    5202               0 :   return NULL;
    5203                 : }
    5204                 : 
    5205                 : 
    5206              35 : SWIGINTERN PyObject *_wrap_VSIFReadL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5207              35 :   PyObject *resultobj = 0;
    5208              35 :   void **arg1 = (void **) 0 ;
    5209                 :   int arg2 ;
    5210                 :   int arg3 ;
    5211              35 :   VSILFILE *arg4 = (VSILFILE *) 0 ;
    5212              35 :   void *pyObject1 = NULL ;
    5213                 :   int val2 ;
    5214              35 :   int ecode2 = 0 ;
    5215                 :   int val3 ;
    5216              35 :   int ecode3 = 0 ;
    5217                 :   int res4 ;
    5218              35 :   PyObject * obj0 = 0 ;
    5219              35 :   PyObject * obj1 = 0 ;
    5220              35 :   PyObject * obj2 = 0 ;
    5221                 :   int result;
    5222                 :   
    5223                 :   {
    5224                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject1 = NULL ) */
    5225              35 :     arg1 = &pyObject1;
    5226                 :   }
    5227              35 :   if (!PyArg_ParseTuple(args,(char *)"OOO:VSIFReadL",&obj0,&obj1,&obj2)) SWIG_fail;
    5228              35 :   ecode2 = SWIG_AsVal_int(obj0, &val2);
    5229              35 :   if (!SWIG_IsOK(ecode2)) {
    5230               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VSIFReadL" "', argument " "2"" of type '" "int""'");
    5231                 :   } 
    5232              35 :   arg2 = static_cast< int >(val2);
    5233              35 :   ecode3 = SWIG_AsVal_int(obj1, &val3);
    5234              35 :   if (!SWIG_IsOK(ecode3)) {
    5235               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFReadL" "', argument " "3"" of type '" "int""'");
    5236                 :   } 
    5237              35 :   arg3 = static_cast< int >(val3);
    5238              35 :   res4 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg4), 0, 0);
    5239              35 :   if (!SWIG_IsOK(res4)) {
    5240               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VSIFReadL" "', argument " "4"" of type '" "VSILFILE *""'"); 
    5241                 :   }
    5242                 :   {
    5243              35 :     if ( bUseExceptions ) {
    5244               0 :       CPLErrorReset();
    5245                 :     }
    5246              35 :     result = (int)wrapper_VSIFReadL(arg1,arg2,arg3,arg4);
    5247              35 :     if ( bUseExceptions ) {
    5248               0 :       CPLErr eclass = CPLGetLastErrorType();
    5249               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5250               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5251                 :       }
    5252                 :     }
    5253                 :   }
    5254              35 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5255                 :   {
    5256                 :     /* %typemap(argout) ( void **outPythonObject ) */
    5257              35 :     Py_XDECREF(resultobj);
    5258              35 :     if (*arg1)
    5259                 :     {
    5260              35 :       resultobj = (PyObject*)*arg1;
    5261                 :     }
    5262                 :     else
    5263                 :     {
    5264               0 :       resultobj = Py_None;
    5265               0 :       Py_INCREF(resultobj);
    5266                 :     }
    5267                 :   }
    5268              35 :   return resultobj;
    5269                 : fail:
    5270               0 :   return NULL;
    5271                 : }
    5272                 : 
    5273                 : 
    5274            6291 : SWIGINTERN PyObject *_wrap_Debug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5275            6291 :   PyObject *resultobj = 0;
    5276            6291 :   char *arg1 = (char *) 0 ;
    5277            6291 :   char *arg2 = (char *) 0 ;
    5278                 :   int res1 ;
    5279            6291 :   char *buf1 = 0 ;
    5280            6291 :   int alloc1 = 0 ;
    5281                 :   int res2 ;
    5282            6291 :   char *buf2 = 0 ;
    5283            6291 :   int alloc2 = 0 ;
    5284            6291 :   PyObject * obj0 = 0 ;
    5285            6291 :   PyObject * obj1 = 0 ;
    5286                 :   
    5287            6291 :   if (!PyArg_ParseTuple(args,(char *)"OO:Debug",&obj0,&obj1)) SWIG_fail;
    5288            6291 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5289            6291 :   if (!SWIG_IsOK(res1)) {
    5290               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Debug" "', argument " "1"" of type '" "char const *""'");
    5291                 :   }
    5292            6291 :   arg1 = reinterpret_cast< char * >(buf1);
    5293            6291 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5294            6291 :   if (!SWIG_IsOK(res2)) {
    5295               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Debug" "', argument " "2"" of type '" "char const *""'");
    5296                 :   }
    5297            6291 :   arg2 = reinterpret_cast< char * >(buf2);
    5298                 :   {
    5299            6291 :     if ( bUseExceptions ) {
    5300               0 :       CPLErrorReset();
    5301                 :     }
    5302            6291 :     Debug((char const *)arg1,(char const *)arg2);
    5303            6291 :     if ( bUseExceptions ) {
    5304               0 :       CPLErr eclass = CPLGetLastErrorType();
    5305               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5306               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5307                 :       }
    5308                 :     }
    5309                 :   }
    5310            6291 :   resultobj = SWIG_Py_Void();
    5311            6291 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5312            6291 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5313            6291 :   return resultobj;
    5314                 : fail:
    5315               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5316               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5317               0 :   return NULL;
    5318                 : }
    5319                 : 
    5320                 : 
    5321               0 : SWIGINTERN PyObject *_wrap_SetErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5322               0 :   PyObject *resultobj = 0;
    5323               0 :   char *arg1 = (char *) NULL ;
    5324                 :   int res1 ;
    5325               0 :   char *buf1 = 0 ;
    5326               0 :   int alloc1 = 0 ;
    5327               0 :   PyObject * obj0 = 0 ;
    5328                 :   CPLErr result;
    5329                 :   
    5330               0 :   if (!PyArg_ParseTuple(args,(char *)"|O:SetErrorHandler",&obj0)) SWIG_fail;
    5331               0 :   if (obj0) {
    5332               0 :     res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5333               0 :     if (!SWIG_IsOK(res1)) {
    5334               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetErrorHandler" "', argument " "1"" of type '" "char const *""'");
    5335                 :     }
    5336               0 :     arg1 = reinterpret_cast< char * >(buf1);
    5337                 :   }
    5338                 :   {
    5339               0 :     if ( bUseExceptions ) {
    5340               0 :       CPLErrorReset();
    5341                 :     }
    5342               0 :     result = (CPLErr)SetErrorHandler((char const *)arg1);
    5343               0 :     if ( bUseExceptions ) {
    5344               0 :       CPLErr eclass = CPLGetLastErrorType();
    5345               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5346               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5347                 :       }
    5348                 :     }
    5349                 :   }
    5350               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5351               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5352                 :   {
    5353                 :     /* %typemap(ret) CPLErr */
    5354               0 :     if ( bUseExceptions == 0 ) {
    5355                 :       /* We're not using exceptions.  And no error has occurred */
    5356               0 :       if ( resultobj == 0 ) {
    5357                 :         /* No other return values set so return ErrorCode */
    5358               0 :         resultobj = PyInt_FromLong(result);
    5359                 :       }
    5360                 :     }
    5361                 :   }
    5362               0 :   return resultobj;
    5363                 : fail:
    5364               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5365               0 :   return NULL;
    5366                 : }
    5367                 : 
    5368                 : 
    5369            1220 : SWIGINTERN PyObject *_wrap_PushErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5370            1220 :   PyObject *resultobj = 0;
    5371            1220 :   CPLErrorHandler arg1 = (CPLErrorHandler) NULL ;
    5372            1220 :   void *arg2 = (void *) NULL ;
    5373            1220 :   PyObject * obj0 = 0 ;
    5374                 :   CPLErr result;
    5375                 :   
    5376            1220 :   if (!PyArg_ParseTuple(args,(char *)"|O:PushErrorHandler",&obj0)) SWIG_fail;
    5377            1220 :   if (obj0) {
    5378                 :     {
    5379                 :       /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
    5380            1220 :       int alloc = 0;
    5381            1220 :       char* pszCallbackName = NULL;
    5382            1220 :       arg2 = NULL;
    5383            1220 :       if( SWIG_IsOK(SWIG_AsCharPtrAndSize(obj0, &pszCallbackName, NULL, &alloc)) )
    5384                 :       {
    5385            2438 :         if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
    5386            1219 :         arg1 = CPLQuietErrorHandler;
    5387               0 :         else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
    5388               0 :         arg1 = CPLDefaultErrorHandler;
    5389               0 :         else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
    5390               0 :         arg1 = CPLLoggingErrorHandler;
    5391                 :         else
    5392                 :         {
    5393               0 :           if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
    5394               0 :           PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
    5395               0 :           SWIG_fail;
    5396                 :         }
    5397                 :         
    5398            1219 :         if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
    5399                 :       }
    5400               1 :       else if (!PyCallable_Check(obj0))
    5401                 :       {
    5402                 :         PyErr_SetString( PyExc_RuntimeError, 
    5403               0 :           "Object given is not a String or a Python function" );
    5404               0 :         SWIG_fail;
    5405                 :       }
    5406                 :       else
    5407                 :       {
    5408               1 :         arg1 = PyCPLErrorHandler;
    5409               1 :         arg2 = obj0;
    5410                 :       }
    5411                 :     }
    5412                 :   }
    5413                 :   {
    5414            1220 :     if ( bUseExceptions ) {
    5415               0 :       CPLErrorReset();
    5416                 :     }
    5417            1220 :     result = (CPLErr)PushErrorHandler(arg1,arg2);
    5418            1220 :     if ( bUseExceptions ) {
    5419               0 :       CPLErr eclass = CPLGetLastErrorType();
    5420               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5421               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5422                 :       }
    5423                 :     }
    5424                 :   }
    5425            2440 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5426                 :   {
    5427                 :     /* %typemap(ret) CPLErr */
    5428            1220 :     if ( bUseExceptions == 0 ) {
    5429                 :       /* We're not using exceptions.  And no error has occurred */
    5430            1220 :       if ( resultobj == 0 ) {
    5431                 :         /* No other return values set so return ErrorCode */
    5432               0 :         resultobj = PyInt_FromLong(result);
    5433                 :       }
    5434                 :     }
    5435                 :   }
    5436            1220 :   return resultobj;
    5437                 : fail:
    5438               0 :   return NULL;
    5439                 : }
    5440                 : 
    5441                 : 
    5442               1 : SWIGINTERN PyObject *_wrap_Error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5443               1 :   PyObject *resultobj = 0;
    5444               1 :   CPLErr arg1 = (CPLErr) CE_Failure ;
    5445               1 :   int arg2 = (int) 0 ;
    5446               1 :   char *arg3 = (char *) "error" ;
    5447                 :   int val1 ;
    5448               1 :   int ecode1 = 0 ;
    5449                 :   int val2 ;
    5450               1 :   int ecode2 = 0 ;
    5451                 :   int res3 ;
    5452               1 :   char *buf3 = 0 ;
    5453               1 :   int alloc3 = 0 ;
    5454               1 :   PyObject * obj0 = 0 ;
    5455               1 :   PyObject * obj1 = 0 ;
    5456               1 :   PyObject * obj2 = 0 ;
    5457                 :   
    5458               1 :   if (!PyArg_ParseTuple(args,(char *)"|OOO:Error",&obj0,&obj1,&obj2)) SWIG_fail;
    5459               1 :   if (obj0) {
    5460               1 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
    5461               1 :     if (!SWIG_IsOK(ecode1)) {
    5462               0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Error" "', argument " "1"" of type '" "CPLErr""'");
    5463                 :     } 
    5464               1 :     arg1 = static_cast< CPLErr >(val1);
    5465                 :   }
    5466               1 :   if (obj1) {
    5467               1 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
    5468               1 :     if (!SWIG_IsOK(ecode2)) {
    5469               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Error" "', argument " "2"" of type '" "int""'");
    5470                 :     } 
    5471               1 :     arg2 = static_cast< int >(val2);
    5472                 :   }
    5473               1 :   if (obj2) {
    5474               1 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    5475               1 :     if (!SWIG_IsOK(res3)) {
    5476               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Error" "', argument " "3"" of type '" "char const *""'");
    5477                 :     }
    5478               1 :     arg3 = reinterpret_cast< char * >(buf3);
    5479                 :   }
    5480                 :   {
    5481               1 :     if ( bUseExceptions ) {
    5482               0 :       CPLErrorReset();
    5483                 :     }
    5484               1 :     Error(arg1,arg2,(char const *)arg3);
    5485               1 :     if ( bUseExceptions ) {
    5486               0 :       CPLErr eclass = CPLGetLastErrorType();
    5487               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5488               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5489                 :       }
    5490                 :     }
    5491                 :   }
    5492               1 :   resultobj = SWIG_Py_Void();
    5493               1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    5494               1 :   return resultobj;
    5495                 : fail:
    5496               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    5497               0 :   return NULL;
    5498                 : }
    5499                 : 
    5500                 : 
    5501               0 : SWIGINTERN PyObject *_wrap_GOA2GetAuthorizationURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5502               0 :   PyObject *resultobj = 0;
    5503               0 :   char *arg1 = (char *) 0 ;
    5504                 :   int res1 ;
    5505               0 :   char *buf1 = 0 ;
    5506               0 :   int alloc1 = 0 ;
    5507               0 :   PyObject * obj0 = 0 ;
    5508               0 :   retStringAndCPLFree *result = 0 ;
    5509                 :   
    5510               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GOA2GetAuthorizationURL",&obj0)) SWIG_fail;
    5511               0 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5512               0 :   if (!SWIG_IsOK(res1)) {
    5513               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAuthorizationURL" "', argument " "1"" of type '" "char const *""'");
    5514                 :   }
    5515               0 :   arg1 = reinterpret_cast< char * >(buf1);
    5516                 :   {
    5517               0 :     if ( bUseExceptions ) {
    5518               0 :       CPLErrorReset();
    5519                 :     }
    5520               0 :     result = (retStringAndCPLFree *)GOA2GetAuthorizationURL((char const *)arg1);
    5521               0 :     if ( bUseExceptions ) {
    5522               0 :       CPLErr eclass = CPLGetLastErrorType();
    5523               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5524               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5525                 :       }
    5526                 :     }
    5527                 :   }
    5528                 :   {
    5529                 :     /* %typemap(out) (retStringAndCPLFree*) */
    5530               0 :     if(result)
    5531                 :     {
    5532               0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    5533               0 :       CPLFree(result);
    5534                 :     }
    5535                 :   }
    5536               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5537               0 :   return resultobj;
    5538                 : fail:
    5539               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5540               0 :   return NULL;
    5541                 : }
    5542                 : 
    5543                 : 
    5544               0 : SWIGINTERN PyObject *_wrap_GOA2GetRefreshToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5545               0 :   PyObject *resultobj = 0;
    5546               0 :   char *arg1 = (char *) 0 ;
    5547               0 :   char *arg2 = (char *) 0 ;
    5548                 :   int res1 ;
    5549               0 :   char *buf1 = 0 ;
    5550               0 :   int alloc1 = 0 ;
    5551                 :   int res2 ;
    5552               0 :   char *buf2 = 0 ;
    5553               0 :   int alloc2 = 0 ;
    5554               0 :   PyObject * obj0 = 0 ;
    5555               0 :   PyObject * obj1 = 0 ;
    5556               0 :   retStringAndCPLFree *result = 0 ;
    5557                 :   
    5558               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GOA2GetRefreshToken",&obj0,&obj1)) SWIG_fail;
    5559               0 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5560               0 :   if (!SWIG_IsOK(res1)) {
    5561               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetRefreshToken" "', argument " "1"" of type '" "char const *""'");
    5562                 :   }
    5563               0 :   arg1 = reinterpret_cast< char * >(buf1);
    5564               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5565               0 :   if (!SWIG_IsOK(res2)) {
    5566               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetRefreshToken" "', argument " "2"" of type '" "char const *""'");
    5567                 :   }
    5568               0 :   arg2 = reinterpret_cast< char * >(buf2);
    5569                 :   {
    5570               0 :     if ( bUseExceptions ) {
    5571               0 :       CPLErrorReset();
    5572                 :     }
    5573               0 :     result = (retStringAndCPLFree *)GOA2GetRefreshToken((char const *)arg1,(char const *)arg2);
    5574               0 :     if ( bUseExceptions ) {
    5575               0 :       CPLErr eclass = CPLGetLastErrorType();
    5576               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5577               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5578                 :       }
    5579                 :     }
    5580                 :   }
    5581                 :   {
    5582                 :     /* %typemap(out) (retStringAndCPLFree*) */
    5583               0 :     if(result)
    5584                 :     {
    5585               0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    5586               0 :       CPLFree(result);
    5587                 :     }
    5588                 :   }
    5589               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5590               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5591               0 :   return resultobj;
    5592                 : fail:
    5593               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5594               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5595               0 :   return NULL;
    5596                 : }
    5597                 : 
    5598                 : 
    5599               0 : SWIGINTERN PyObject *_wrap_GOA2GetAccessToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5600               0 :   PyObject *resultobj = 0;
    5601               0 :   char *arg1 = (char *) 0 ;
    5602               0 :   char *arg2 = (char *) 0 ;
    5603                 :   int res1 ;
    5604               0 :   char *buf1 = 0 ;
    5605               0 :   int alloc1 = 0 ;
    5606                 :   int res2 ;
    5607               0 :   char *buf2 = 0 ;
    5608               0 :   int alloc2 = 0 ;
    5609               0 :   PyObject * obj0 = 0 ;
    5610               0 :   PyObject * obj1 = 0 ;
    5611               0 :   retStringAndCPLFree *result = 0 ;
    5612                 :   
    5613               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GOA2GetAccessToken",&obj0,&obj1)) SWIG_fail;
    5614               0 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5615               0 :   if (!SWIG_IsOK(res1)) {
    5616               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAccessToken" "', argument " "1"" of type '" "char const *""'");
    5617                 :   }
    5618               0 :   arg1 = reinterpret_cast< char * >(buf1);
    5619               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5620               0 :   if (!SWIG_IsOK(res2)) {
    5621               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetAccessToken" "', argument " "2"" of type '" "char const *""'");
    5622                 :   }
    5623               0 :   arg2 = reinterpret_cast< char * >(buf2);
    5624                 :   {
    5625               0 :     if ( bUseExceptions ) {
    5626               0 :       CPLErrorReset();
    5627                 :     }
    5628               0 :     result = (retStringAndCPLFree *)GOA2GetAccessToken((char const *)arg1,(char const *)arg2);
    5629               0 :     if ( bUseExceptions ) {
    5630               0 :       CPLErr eclass = CPLGetLastErrorType();
    5631               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5632               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5633                 :       }
    5634                 :     }
    5635                 :   }
    5636                 :   {
    5637                 :     /* %typemap(out) (retStringAndCPLFree*) */
    5638               0 :     if(result)
    5639                 :     {
    5640               0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    5641               0 :       CPLFree(result);
    5642                 :     }
    5643                 :   }
    5644               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5645               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5646               0 :   return resultobj;
    5647                 : fail:
    5648               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5649               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5650               0 :   return NULL;
    5651                 : }
    5652                 : 
    5653                 : 
    5654            1220 : SWIGINTERN PyObject *_wrap_PopErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5655            1220 :   PyObject *resultobj = 0;
    5656                 :   
    5657            1220 :   if (!PyArg_ParseTuple(args,(char *)":PopErrorHandler")) SWIG_fail;
    5658                 :   {
    5659            1220 :     if ( bUseExceptions ) {
    5660               0 :       CPLErrorReset();
    5661                 :     }
    5662            1220 :     CPLPopErrorHandler();
    5663            1220 :     if ( bUseExceptions ) {
    5664               0 :       CPLErr eclass = CPLGetLastErrorType();
    5665               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5666               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5667                 :       }
    5668                 :     }
    5669                 :   }
    5670            1220 :   resultobj = SWIG_Py_Void();
    5671            1220 :   return resultobj;
    5672                 : fail:
    5673               0 :   return NULL;
    5674                 : }
    5675                 : 
    5676                 : 
    5677            1071 : SWIGINTERN PyObject *_wrap_ErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5678            1071 :   PyObject *resultobj = 0;
    5679                 :   
    5680            1071 :   if (!PyArg_ParseTuple(args,(char *)":ErrorReset")) SWIG_fail;
    5681                 :   {
    5682            1071 :     if ( bUseExceptions ) {
    5683               0 :       CPLErrorReset();
    5684                 :     }
    5685            1071 :     CPLErrorReset();
    5686            1071 :     if ( bUseExceptions ) {
    5687               0 :       CPLErr eclass = CPLGetLastErrorType();
    5688               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5689               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5690                 :       }
    5691                 :     }
    5692                 :   }
    5693            1071 :   resultobj = SWIG_Py_Void();
    5694            1071 :   return resultobj;
    5695                 : fail:
    5696               0 :   return NULL;
    5697                 : }
    5698                 : 
    5699                 : 
    5700               0 : SWIGINTERN PyObject *_wrap_EscapeString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    5701               0 :   PyObject *resultobj = 0;
    5702                 :   int arg1 ;
    5703               0 :   char *arg2 = (char *) 0 ;
    5704               0 :   int arg3 = (int) CPLES_SQL ;
    5705               0 :   int alloc1 = 0 ;
    5706                 :   int val3 ;
    5707               0 :   int ecode3 = 0 ;
    5708               0 :   PyObject * obj0 = 0 ;
    5709               0 :   PyObject * obj1 = 0 ;
    5710                 :   char *  kwnames[] = {
    5711                 :     (char *) "len",(char *) "scheme", NULL 
    5712               0 :   };
    5713               0 :   retStringAndCPLFree *result = 0 ;
    5714                 :   
    5715               0 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:EscapeString",kwnames,&obj0,&obj1)) SWIG_fail;
    5716                 :   {
    5717                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    5718                 : #if PY_VERSION_HEX>=0x03000000
    5719                 :     if (PyUnicode_Check(obj0))
    5720                 :     {
    5721                 :       size_t safeLen = 0;
    5722                 :       int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
    5723                 :       if (!SWIG_IsOK(ret)) {
    5724                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    5725                 :       }
    5726                 :       
    5727                 :       if (safeLen) safeLen--;
    5728                 :       arg1 = (int) safeLen;
    5729                 :     }
    5730                 :     else if (PyBytes_Check(obj0))
    5731                 :     {
    5732                 :       Py_ssize_t safeLen = 0;
    5733                 :       PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    5734                 :       arg1 = (int) safeLen;
    5735                 :     }
    5736                 :     else
    5737                 :     {
    5738                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    5739                 :       SWIG_fail;
    5740                 :     }
    5741                 : #else
    5742               0 :     if (PyString_Check(obj0))
    5743                 :     {
    5744               0 :       Py_ssize_t safeLen = 0;
    5745               0 :       PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    5746               0 :       arg1 = (int) safeLen;
    5747                 :     }
    5748                 :     else
    5749                 :     {
    5750               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    5751               0 :       SWIG_fail;
    5752                 :     }
    5753                 : #endif
    5754                 :   }
    5755               0 :   if (obj1) {
    5756               0 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
    5757               0 :     if (!SWIG_IsOK(ecode3)) {
    5758               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "EscapeString" "', argument " "3"" of type '" "int""'");
    5759                 :     } 
    5760               0 :     arg3 = static_cast< int >(val3);
    5761                 :   }
    5762                 :   {
    5763               0 :     if ( bUseExceptions ) {
    5764               0 :       CPLErrorReset();
    5765                 :     }
    5766               0 :     result = (retStringAndCPLFree *)EscapeString(arg1,arg2,arg3);
    5767               0 :     if ( bUseExceptions ) {
    5768               0 :       CPLErr eclass = CPLGetLastErrorType();
    5769               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5770               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5771                 :       }
    5772                 :     }
    5773                 :   }
    5774                 :   {
    5775                 :     /* %typemap(out) (retStringAndCPLFree*) */
    5776               0 :     if(result)
    5777                 :     {
    5778               0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    5779               0 :       CPLFree(result);
    5780                 :     }
    5781                 :   }
    5782                 :   {
    5783                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    5784               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    5785               0 :       delete[] arg2;
    5786                 :     }
    5787                 :   }
    5788               0 :   return resultobj;
    5789                 : fail:
    5790                 :   {
    5791                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    5792               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    5793               0 :       delete[] arg2;
    5794                 :     }
    5795                 :   }
    5796               0 :   return NULL;
    5797                 : }
    5798                 : 
    5799                 : 
    5800               2 : SWIGINTERN PyObject *_wrap_GetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5801               2 :   PyObject *resultobj = 0;
    5802                 :   int result;
    5803                 :   
    5804               2 :   if (!PyArg_ParseTuple(args,(char *)":GetLastErrorNo")) SWIG_fail;
    5805                 :   {
    5806               2 :     result = CPLGetLastErrorNo();
    5807                 :   }
    5808               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5809               2 :   return resultobj;
    5810                 : fail:
    5811               0 :   return NULL;
    5812                 : }
    5813                 : 
    5814                 : 
    5815             137 : SWIGINTERN PyObject *_wrap_GetLastErrorType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5816             137 :   PyObject *resultobj = 0;
    5817                 :   int result;
    5818                 :   
    5819             137 :   if (!PyArg_ParseTuple(args,(char *)":GetLastErrorType")) SWIG_fail;
    5820                 :   {
    5821             137 :     result = CPLGetLastErrorType();
    5822                 :   }
    5823             137 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5824             137 :   return resultobj;
    5825                 : fail:
    5826               0 :   return NULL;
    5827                 : }
    5828                 : 
    5829                 : 
    5830             204 : SWIGINTERN PyObject *_wrap_GetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5831             204 :   PyObject *resultobj = 0;
    5832             204 :   char *result = 0 ;
    5833                 :   
    5834             204 :   if (!PyArg_ParseTuple(args,(char *)":GetLastErrorMsg")) SWIG_fail;
    5835                 :   {
    5836             204 :     result = (char*)CPLGetLastErrorMsg();
    5837                 :   }
    5838             204 :   resultobj = SWIG_FromCharPtr((const char *)result);
    5839             204 :   return resultobj;
    5840                 : fail:
    5841               0 :   return NULL;
    5842                 : }
    5843                 : 
    5844                 : 
    5845               0 : SWIGINTERN PyObject *_wrap_PushFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5846               0 :   PyObject *resultobj = 0;
    5847               0 :   char *arg1 = (char *) 0 ;
    5848               0 :   int bToFree1 = 0 ;
    5849               0 :   PyObject * obj0 = 0 ;
    5850                 :   
    5851               0 :   if (!PyArg_ParseTuple(args,(char *)"O:PushFinderLocation",&obj0)) SWIG_fail;
    5852                 :   {
    5853                 :     /* %typemap(in) (const char *utf8_path) */
    5854               0 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    5855               0 :     if (arg1 == NULL)
    5856                 :     {
    5857               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    5858               0 :       SWIG_fail;
    5859                 :     }
    5860                 :   }
    5861                 :   {
    5862               0 :     if ( bUseExceptions ) {
    5863               0 :       CPLErrorReset();
    5864                 :     }
    5865               0 :     CPLPushFinderLocation((char const *)arg1);
    5866               0 :     if ( bUseExceptions ) {
    5867               0 :       CPLErr eclass = CPLGetLastErrorType();
    5868               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5869               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5870                 :       }
    5871                 :     }
    5872                 :   }
    5873               0 :   resultobj = SWIG_Py_Void();
    5874                 :   {
    5875                 :     /* %typemap(freearg) (const char *utf8_path) */
    5876               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    5877                 :   }
    5878               0 :   return resultobj;
    5879                 : fail:
    5880                 :   {
    5881                 :     /* %typemap(freearg) (const char *utf8_path) */
    5882               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    5883                 :   }
    5884               0 :   return NULL;
    5885                 : }
    5886                 : 
    5887                 : 
    5888               0 : SWIGINTERN PyObject *_wrap_PopFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5889               0 :   PyObject *resultobj = 0;
    5890                 :   
    5891               0 :   if (!PyArg_ParseTuple(args,(char *)":PopFinderLocation")) SWIG_fail;
    5892                 :   {
    5893               0 :     if ( bUseExceptions ) {
    5894               0 :       CPLErrorReset();
    5895                 :     }
    5896               0 :     CPLPopFinderLocation();
    5897               0 :     if ( bUseExceptions ) {
    5898               0 :       CPLErr eclass = CPLGetLastErrorType();
    5899               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5900               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5901                 :       }
    5902                 :     }
    5903                 :   }
    5904               0 :   resultobj = SWIG_Py_Void();
    5905               0 :   return resultobj;
    5906                 : fail:
    5907               0 :   return NULL;
    5908                 : }
    5909                 : 
    5910                 : 
    5911               0 : SWIGINTERN PyObject *_wrap_FinderClean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5912               0 :   PyObject *resultobj = 0;
    5913                 :   
    5914               0 :   if (!PyArg_ParseTuple(args,(char *)":FinderClean")) SWIG_fail;
    5915                 :   {
    5916               0 :     if ( bUseExceptions ) {
    5917               0 :       CPLErrorReset();
    5918                 :     }
    5919               0 :     CPLFinderClean();
    5920               0 :     if ( bUseExceptions ) {
    5921               0 :       CPLErr eclass = CPLGetLastErrorType();
    5922               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5923               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5924                 :       }
    5925                 :     }
    5926                 :   }
    5927               0 :   resultobj = SWIG_Py_Void();
    5928               0 :   return resultobj;
    5929                 : fail:
    5930               0 :   return NULL;
    5931                 : }
    5932                 : 
    5933                 : 
    5934               8 : SWIGINTERN PyObject *_wrap_FindFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5935               8 :   PyObject *resultobj = 0;
    5936               8 :   char *arg1 = (char *) 0 ;
    5937               8 :   char *arg2 = (char *) 0 ;
    5938                 :   int res1 ;
    5939               8 :   char *buf1 = 0 ;
    5940               8 :   int alloc1 = 0 ;
    5941               8 :   int bToFree2 = 0 ;
    5942               8 :   PyObject * obj0 = 0 ;
    5943               8 :   PyObject * obj1 = 0 ;
    5944               8 :   char *result = 0 ;
    5945                 :   
    5946               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:FindFile",&obj0,&obj1)) SWIG_fail;
    5947               8 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5948               8 :   if (!SWIG_IsOK(res1)) {
    5949               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindFile" "', argument " "1"" of type '" "char const *""'");
    5950                 :   }
    5951               8 :   arg1 = reinterpret_cast< char * >(buf1);
    5952                 :   {
    5953                 :     /* %typemap(in) (const char *utf8_path) */
    5954               8 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    5955               8 :     if (arg2 == NULL)
    5956                 :     {
    5957               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    5958               0 :       SWIG_fail;
    5959                 :     }
    5960                 :   }
    5961                 :   {
    5962               8 :     if ( bUseExceptions ) {
    5963               0 :       CPLErrorReset();
    5964                 :     }
    5965               8 :     result = (char *)CPLFindFile((char const *)arg1,(char const *)arg2);
    5966               8 :     if ( bUseExceptions ) {
    5967               0 :       CPLErr eclass = CPLGetLastErrorType();
    5968               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5969               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5970                 :       }
    5971                 :     }
    5972                 :   }
    5973               8 :   resultobj = SWIG_FromCharPtr((const char *)result);
    5974               8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5975                 :   {
    5976                 :     /* %typemap(freearg) (const char *utf8_path) */
    5977               8 :     GDALPythonFreeCStr(arg2, bToFree2);
    5978                 :   }
    5979               8 :   return resultobj;
    5980                 : fail:
    5981               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5982                 :   {
    5983                 :     /* %typemap(freearg) (const char *utf8_path) */
    5984               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    5985                 :   }
    5986               0 :   return NULL;
    5987                 : }
    5988                 : 
    5989                 : 
    5990            1807 : SWIGINTERN PyObject *_wrap_ReadDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5991            1807 :   PyObject *resultobj = 0;
    5992            1807 :   char *arg1 = (char *) 0 ;
    5993            1807 :   int bToFree1 = 0 ;
    5994            1807 :   PyObject * obj0 = 0 ;
    5995            1807 :   char **result = 0 ;
    5996                 :   
    5997            1807 :   if (!PyArg_ParseTuple(args,(char *)"O:ReadDir",&obj0)) SWIG_fail;
    5998                 :   {
    5999                 :     /* %typemap(in) (const char *utf8_path) */
    6000            1807 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6001            1807 :     if (arg1 == NULL)
    6002                 :     {
    6003               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6004               0 :       SWIG_fail;
    6005                 :     }
    6006                 :   }
    6007                 :   {
    6008            1807 :     if ( bUseExceptions ) {
    6009               0 :       CPLErrorReset();
    6010                 :     }
    6011            1807 :     result = (char **)VSIReadDir((char const *)arg1);
    6012            1807 :     if ( bUseExceptions ) {
    6013               0 :       CPLErr eclass = CPLGetLastErrorType();
    6014               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6015               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6016                 :       }
    6017                 :     }
    6018                 :   }
    6019                 :   {
    6020                 :     /* %typemap(out) char **CSL -> ( string ) */
    6021            1807 :     char **stringarray = result;
    6022            1807 :     if ( stringarray == NULL ) {
    6023            1656 :       resultobj = Py_None;
    6024            1656 :       Py_INCREF( resultobj );
    6025                 :     }
    6026                 :     else {
    6027             151 :       int len = CSLCount( stringarray );
    6028             151 :       resultobj = PyList_New( len );
    6029            3162 :       for ( int i = 0; i < len; ++i ) {
    6030            3011 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    6031            3011 :         PyList_SetItem(resultobj, i, o );
    6032                 :       }
    6033                 :     }
    6034            1807 :     CSLDestroy(result);
    6035                 :   }
    6036                 :   {
    6037                 :     /* %typemap(freearg) (const char *utf8_path) */
    6038            1807 :     GDALPythonFreeCStr(arg1, bToFree1);
    6039                 :   }
    6040            1807 :   return resultobj;
    6041                 : fail:
    6042                 :   {
    6043                 :     /* %typemap(freearg) (const char *utf8_path) */
    6044               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6045                 :   }
    6046               0 :   return NULL;
    6047                 : }
    6048                 : 
    6049                 : 
    6050               2 : SWIGINTERN PyObject *_wrap_ReadDirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6051               2 :   PyObject *resultobj = 0;
    6052               2 :   char *arg1 = (char *) 0 ;
    6053               2 :   int bToFree1 = 0 ;
    6054               2 :   PyObject * obj0 = 0 ;
    6055               2 :   char **result = 0 ;
    6056                 :   
    6057               2 :   if (!PyArg_ParseTuple(args,(char *)"O:ReadDirRecursive",&obj0)) SWIG_fail;
    6058                 :   {
    6059                 :     /* %typemap(in) (const char *utf8_path) */
    6060               2 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6061               2 :     if (arg1 == NULL)
    6062                 :     {
    6063               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6064               0 :       SWIG_fail;
    6065                 :     }
    6066                 :   }
    6067                 :   {
    6068               2 :     if ( bUseExceptions ) {
    6069               0 :       CPLErrorReset();
    6070                 :     }
    6071               2 :     result = (char **)VSIReadDirRecursive((char const *)arg1);
    6072               2 :     if ( bUseExceptions ) {
    6073               0 :       CPLErr eclass = CPLGetLastErrorType();
    6074               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6075               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6076                 :       }
    6077                 :     }
    6078                 :   }
    6079                 :   {
    6080                 :     /* %typemap(out) char **CSL -> ( string ) */
    6081               2 :     char **stringarray = result;
    6082               2 :     if ( stringarray == NULL ) {
    6083               0 :       resultobj = Py_None;
    6084               0 :       Py_INCREF( resultobj );
    6085                 :     }
    6086                 :     else {
    6087               2 :       int len = CSLCount( stringarray );
    6088               2 :       resultobj = PyList_New( len );
    6089            1010 :       for ( int i = 0; i < len; ++i ) {
    6090            1008 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    6091            1008 :         PyList_SetItem(resultobj, i, o );
    6092                 :       }
    6093                 :     }
    6094               2 :     CSLDestroy(result);
    6095                 :   }
    6096                 :   {
    6097                 :     /* %typemap(freearg) (const char *utf8_path) */
    6098               2 :     GDALPythonFreeCStr(arg1, bToFree1);
    6099                 :   }
    6100               2 :   return resultobj;
    6101                 : fail:
    6102                 :   {
    6103                 :     /* %typemap(freearg) (const char *utf8_path) */
    6104               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6105                 :   }
    6106               0 :   return NULL;
    6107                 : }
    6108                 : 
    6109                 : 
    6110             596 : SWIGINTERN PyObject *_wrap_SetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6111             596 :   PyObject *resultobj = 0;
    6112             596 :   char *arg1 = (char *) 0 ;
    6113             596 :   char *arg2 = (char *) 0 ;
    6114                 :   int res1 ;
    6115             596 :   char *buf1 = 0 ;
    6116             596 :   int alloc1 = 0 ;
    6117                 :   int res2 ;
    6118             596 :   char *buf2 = 0 ;
    6119             596 :   int alloc2 = 0 ;
    6120             596 :   PyObject * obj0 = 0 ;
    6121             596 :   PyObject * obj1 = 0 ;
    6122                 :   
    6123             596 :   if (!PyArg_ParseTuple(args,(char *)"OO:SetConfigOption",&obj0,&obj1)) SWIG_fail;
    6124             596 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    6125             596 :   if (!SWIG_IsOK(res1)) {
    6126               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetConfigOption" "', argument " "1"" of type '" "char const *""'");
    6127                 :   }
    6128             596 :   arg1 = reinterpret_cast< char * >(buf1);
    6129             596 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6130             596 :   if (!SWIG_IsOK(res2)) {
    6131               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetConfigOption" "', argument " "2"" of type '" "char const *""'");
    6132                 :   }
    6133             596 :   arg2 = reinterpret_cast< char * >(buf2);
    6134                 :   {
    6135             596 :     if (!arg1) {
    6136               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    6137                 :     }
    6138                 :   }
    6139                 :   {
    6140             596 :     if ( bUseExceptions ) {
    6141               0 :       CPLErrorReset();
    6142                 :     }
    6143             596 :     CPLSetConfigOption((char const *)arg1,(char const *)arg2);
    6144             596 :     if ( bUseExceptions ) {
    6145               0 :       CPLErr eclass = CPLGetLastErrorType();
    6146               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6147               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6148                 :       }
    6149                 :     }
    6150                 :   }
    6151             596 :   resultobj = SWIG_Py_Void();
    6152             596 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6153             596 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6154             596 :   return resultobj;
    6155                 : fail:
    6156               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6157               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6158               0 :   return NULL;
    6159                 : }
    6160                 : 
    6161                 : 
    6162             595 : SWIGINTERN PyObject *_wrap_GetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6163             595 :   PyObject *resultobj = 0;
    6164             595 :   char *arg1 = (char *) 0 ;
    6165             595 :   char *arg2 = (char *) NULL ;
    6166                 :   int res1 ;
    6167             595 :   char *buf1 = 0 ;
    6168             595 :   int alloc1 = 0 ;
    6169                 :   int res2 ;
    6170             595 :   char *buf2 = 0 ;
    6171             595 :   int alloc2 = 0 ;
    6172             595 :   PyObject * obj0 = 0 ;
    6173             595 :   PyObject * obj1 = 0 ;
    6174             595 :   char *result = 0 ;
    6175                 :   
    6176             595 :   if (!PyArg_ParseTuple(args,(char *)"O|O:GetConfigOption",&obj0,&obj1)) SWIG_fail;
    6177             595 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    6178             595 :   if (!SWIG_IsOK(res1)) {
    6179               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetConfigOption" "', argument " "1"" of type '" "char const *""'");
    6180                 :   }
    6181             595 :   arg1 = reinterpret_cast< char * >(buf1);
    6182             595 :   if (obj1) {
    6183             574 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6184             574 :     if (!SWIG_IsOK(res2)) {
    6185               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetConfigOption" "', argument " "2"" of type '" "char const *""'");
    6186                 :     }
    6187             574 :     arg2 = reinterpret_cast< char * >(buf2);
    6188                 :   }
    6189                 :   {
    6190             595 :     if (!arg1) {
    6191               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    6192                 :     }
    6193                 :   }
    6194                 :   {
    6195             595 :     if ( bUseExceptions ) {
    6196               0 :       CPLErrorReset();
    6197                 :     }
    6198             595 :     result = (char *)wrapper_CPLGetConfigOption((char const *)arg1,(char const *)arg2);
    6199             595 :     if ( bUseExceptions ) {
    6200               0 :       CPLErr eclass = CPLGetLastErrorType();
    6201               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6202               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6203                 :       }
    6204                 :     }
    6205                 :   }
    6206             595 :   resultobj = SWIG_FromCharPtr((const char *)result);
    6207             595 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6208             595 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6209             595 :   return resultobj;
    6210                 : fail:
    6211               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6212               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6213               0 :   return NULL;
    6214                 : }
    6215                 : 
    6216                 : 
    6217               0 : SWIGINTERN PyObject *_wrap_CPLBinaryToHex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6218               0 :   PyObject *resultobj = 0;
    6219                 :   int arg1 ;
    6220               0 :   GByte *arg2 = (GByte *) 0 ;
    6221               0 :   int alloc1 = 0 ;
    6222               0 :   PyObject * obj0 = 0 ;
    6223               0 :   retStringAndCPLFree *result = 0 ;
    6224                 :   
    6225               0 :   if (!PyArg_ParseTuple(args,(char *)"O:CPLBinaryToHex",&obj0)) SWIG_fail;
    6226                 :   {
    6227                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    6228                 : #if PY_VERSION_HEX>=0x03000000
    6229                 :     if (PyUnicode_Check(obj0))
    6230                 :     {
    6231                 :       size_t safeLen = 0;
    6232                 :       int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
    6233                 :       if (!SWIG_IsOK(ret)) {
    6234                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    6235                 :       }
    6236                 :       
    6237                 :       if (safeLen) safeLen--;
    6238                 :       arg1 = (int) safeLen;
    6239                 :     }
    6240                 :     else if (PyBytes_Check(obj0))
    6241                 :     {
    6242                 :       Py_ssize_t safeLen = 0;
    6243                 :       PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    6244                 :       arg1 = (int) safeLen;
    6245                 :     }
    6246                 :     else
    6247                 :     {
    6248                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    6249                 :       SWIG_fail;
    6250                 :     }
    6251                 : #else
    6252               0 :     if (PyString_Check(obj0))
    6253                 :     {
    6254               0 :       Py_ssize_t safeLen = 0;
    6255               0 :       PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    6256               0 :       arg1 = (int) safeLen;
    6257                 :     }
    6258                 :     else
    6259                 :     {
    6260               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    6261               0 :       SWIG_fail;
    6262                 :     }
    6263                 : #endif
    6264                 :   }
    6265                 :   {
    6266               0 :     if ( bUseExceptions ) {
    6267               0 :       CPLErrorReset();
    6268                 :     }
    6269               0 :     result = (retStringAndCPLFree *)CPLBinaryToHex(arg1,(GByte const *)arg2);
    6270               0 :     if ( bUseExceptions ) {
    6271               0 :       CPLErr eclass = CPLGetLastErrorType();
    6272               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6273               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6274                 :       }
    6275                 :     }
    6276                 :   }
    6277                 :   {
    6278                 :     /* %typemap(out) (retStringAndCPLFree*) */
    6279               0 :     if(result)
    6280                 :     {
    6281               0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    6282               0 :       CPLFree(result);
    6283                 :     }
    6284                 :   }
    6285                 :   {
    6286                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6287               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    6288               0 :       delete[] arg2;
    6289                 :     }
    6290                 :   }
    6291               0 :   return resultobj;
    6292                 : fail:
    6293                 :   {
    6294                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6295               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    6296               0 :       delete[] arg2;
    6297                 :     }
    6298                 :   }
    6299               0 :   return NULL;
    6300                 : }
    6301                 : 
    6302                 : 
    6303               0 : SWIGINTERN PyObject *_wrap_CPLHexToBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6304               0 :   PyObject *resultobj = 0;
    6305               0 :   char *arg1 = (char *) 0 ;
    6306               0 :   int *arg2 = (int *) 0 ;
    6307                 :   int res1 ;
    6308               0 :   char *buf1 = 0 ;
    6309               0 :   int alloc1 = 0 ;
    6310               0 :   void *argp2 = 0 ;
    6311               0 :   int res2 = 0 ;
    6312               0 :   PyObject * obj0 = 0 ;
    6313               0 :   PyObject * obj1 = 0 ;
    6314               0 :   GByte *result = 0 ;
    6315                 :   
    6316               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:CPLHexToBinary",&obj0,&obj1)) SWIG_fail;
    6317               0 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    6318               0 :   if (!SWIG_IsOK(res1)) {
    6319               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLHexToBinary" "', argument " "1"" of type '" "char const *""'");
    6320                 :   }
    6321               0 :   arg1 = reinterpret_cast< char * >(buf1);
    6322               0 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
    6323               0 :   if (!SWIG_IsOK(res2)) {
    6324               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CPLHexToBinary" "', argument " "2"" of type '" "int *""'"); 
    6325                 :   }
    6326               0 :   arg2 = reinterpret_cast< int * >(argp2);
    6327                 :   {
    6328               0 :     if ( bUseExceptions ) {
    6329               0 :       CPLErrorReset();
    6330                 :     }
    6331               0 :     result = (GByte *)CPLHexToBinary((char const *)arg1,arg2);
    6332               0 :     if ( bUseExceptions ) {
    6333               0 :       CPLErr eclass = CPLGetLastErrorType();
    6334               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6335               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6336                 :       }
    6337                 :     }
    6338                 :   }
    6339               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GByte, 0 |  0 );
    6340               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6341               0 :   return resultobj;
    6342                 : fail:
    6343               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6344               0 :   return NULL;
    6345                 : }
    6346                 : 
    6347                 : 
    6348              19 : SWIGINTERN PyObject *_wrap_FileFromMemBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6349              19 :   PyObject *resultobj = 0;
    6350              19 :   char *arg1 = (char *) 0 ;
    6351                 :   int arg2 ;
    6352              19 :   GByte *arg3 = (GByte *) 0 ;
    6353              19 :   int bToFree1 = 0 ;
    6354              19 :   int alloc2 = 0 ;
    6355              19 :   PyObject * obj0 = 0 ;
    6356              19 :   PyObject * obj1 = 0 ;
    6357                 :   
    6358              19 :   if (!PyArg_ParseTuple(args,(char *)"OO:FileFromMemBuffer",&obj0,&obj1)) SWIG_fail;
    6359                 :   {
    6360                 :     /* %typemap(in) (const char *utf8_path) */
    6361              19 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6362              19 :     if (arg1 == NULL)
    6363                 :     {
    6364               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6365               0 :       SWIG_fail;
    6366                 :     }
    6367                 :   }
    6368                 :   {
    6369                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    6370                 : #if PY_VERSION_HEX>=0x03000000
    6371                 :     if (PyUnicode_Check(obj1))
    6372                 :     {
    6373                 :       size_t safeLen = 0;
    6374                 :       int ret = SWIG_AsCharPtrAndSize(obj1, (char**) &arg3, &safeLen, &alloc2);
    6375                 :       if (!SWIG_IsOK(ret)) {
    6376                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    6377                 :       }
    6378                 :       
    6379                 :       if (safeLen) safeLen--;
    6380                 :       arg2 = (int) safeLen;
    6381                 :     }
    6382                 :     else if (PyBytes_Check(obj1))
    6383                 :     {
    6384                 :       Py_ssize_t safeLen = 0;
    6385                 :       PyBytes_AsStringAndSize(obj1, (char**) &arg3, &safeLen);
    6386                 :       arg2 = (int) safeLen;
    6387                 :     }
    6388                 :     else
    6389                 :     {
    6390                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    6391                 :       SWIG_fail;
    6392                 :     }
    6393                 : #else
    6394              19 :     if (PyString_Check(obj1))
    6395                 :     {
    6396              19 :       Py_ssize_t safeLen = 0;
    6397              19 :       PyString_AsStringAndSize(obj1, (char**) &arg3, &safeLen);
    6398              19 :       arg2 = (int) safeLen;
    6399                 :     }
    6400                 :     else
    6401                 :     {
    6402               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    6403               0 :       SWIG_fail;
    6404                 :     }
    6405                 : #endif
    6406                 :   }
    6407                 :   {
    6408              19 :     if ( bUseExceptions ) {
    6409               0 :       CPLErrorReset();
    6410                 :     }
    6411              19 :     wrapper_VSIFileFromMemBuffer((char const *)arg1,arg2,(GByte const *)arg3);
    6412              19 :     if ( bUseExceptions ) {
    6413               0 :       CPLErr eclass = CPLGetLastErrorType();
    6414               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6415               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6416                 :       }
    6417                 :     }
    6418                 :   }
    6419              19 :   resultobj = SWIG_Py_Void();
    6420                 :   {
    6421                 :     /* %typemap(freearg) (const char *utf8_path) */
    6422              19 :     GDALPythonFreeCStr(arg1, bToFree1);
    6423                 :   }
    6424                 :   {
    6425                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6426              19 :     if( alloc2 == SWIG_NEWOBJ ) {
    6427               0 :       delete[] arg3;
    6428                 :     }
    6429                 :   }
    6430              19 :   return resultobj;
    6431                 : fail:
    6432                 :   {
    6433                 :     /* %typemap(freearg) (const char *utf8_path) */
    6434               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6435                 :   }
    6436                 :   {
    6437                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6438               0 :     if( alloc2 == SWIG_NEWOBJ ) {
    6439               0 :       delete[] arg3;
    6440                 :     }
    6441                 :   }
    6442               0 :   return NULL;
    6443                 : }
    6444                 : 
    6445                 : 
    6446             432 : SWIGINTERN PyObject *_wrap_Unlink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6447             432 :   PyObject *resultobj = 0;
    6448             432 :   char *arg1 = (char *) 0 ;
    6449             432 :   int bToFree1 = 0 ;
    6450             432 :   PyObject * obj0 = 0 ;
    6451                 :   int result;
    6452                 :   
    6453             432 :   if (!PyArg_ParseTuple(args,(char *)"O:Unlink",&obj0)) SWIG_fail;
    6454                 :   {
    6455                 :     /* %typemap(in) (const char *utf8_path) */
    6456             432 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6457             432 :     if (arg1 == NULL)
    6458                 :     {
    6459               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6460               0 :       SWIG_fail;
    6461                 :     }
    6462                 :   }
    6463                 :   {
    6464             432 :     if ( bUseExceptions ) {
    6465               0 :       CPLErrorReset();
    6466                 :     }
    6467             432 :     result = (int)VSIUnlink((char const *)arg1);
    6468             432 :     if ( bUseExceptions ) {
    6469               0 :       CPLErr eclass = CPLGetLastErrorType();
    6470               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6471               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6472                 :       }
    6473                 :     }
    6474                 :   }
    6475             432 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6476                 :   {
    6477                 :     /* %typemap(freearg) (const char *utf8_path) */
    6478             432 :     GDALPythonFreeCStr(arg1, bToFree1);
    6479                 :   }
    6480             432 :   return resultobj;
    6481                 : fail:
    6482                 :   {
    6483                 :     /* %typemap(freearg) (const char *utf8_path) */
    6484               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6485                 :   }
    6486               0 :   return NULL;
    6487                 : }
    6488                 : 
    6489                 : 
    6490               0 : SWIGINTERN PyObject *_wrap_HasThreadSupport(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6491               0 :   PyObject *resultobj = 0;
    6492                 :   int result;
    6493                 :   
    6494               0 :   if (!PyArg_ParseTuple(args,(char *)":HasThreadSupport")) SWIG_fail;
    6495                 :   {
    6496               0 :     if ( bUseExceptions ) {
    6497               0 :       CPLErrorReset();
    6498                 :     }
    6499               0 :     result = (int)wrapper_HasThreadSupport();
    6500               0 :     if ( bUseExceptions ) {
    6501               0 :       CPLErr eclass = CPLGetLastErrorType();
    6502               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6503               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6504                 :       }
    6505                 :     }
    6506                 :   }
    6507               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6508               0 :   return resultobj;
    6509                 : fail:
    6510               0 :   return NULL;
    6511                 : }
    6512                 : 
    6513                 : 
    6514               1 : SWIGINTERN PyObject *_wrap_Mkdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6515               1 :   PyObject *resultobj = 0;
    6516               1 :   char *arg1 = (char *) 0 ;
    6517                 :   int arg2 ;
    6518               1 :   int bToFree1 = 0 ;
    6519                 :   int val2 ;
    6520               1 :   int ecode2 = 0 ;
    6521               1 :   PyObject * obj0 = 0 ;
    6522               1 :   PyObject * obj1 = 0 ;
    6523                 :   int result;
    6524                 :   
    6525               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Mkdir",&obj0,&obj1)) SWIG_fail;
    6526                 :   {
    6527                 :     /* %typemap(in) (const char *utf8_path) */
    6528               1 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6529               1 :     if (arg1 == NULL)
    6530                 :     {
    6531               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6532               0 :       SWIG_fail;
    6533                 :     }
    6534                 :   }
    6535               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    6536               1 :   if (!SWIG_IsOK(ecode2)) {
    6537               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Mkdir" "', argument " "2"" of type '" "int""'");
    6538                 :   } 
    6539               1 :   arg2 = static_cast< int >(val2);
    6540                 :   {
    6541               1 :     if ( bUseExceptions ) {
    6542               0 :       CPLErrorReset();
    6543                 :     }
    6544               1 :     result = (int)VSIMkdir((char const *)arg1,arg2);
    6545               1 :     if ( bUseExceptions ) {
    6546               0 :       CPLErr eclass = CPLGetLastErrorType();
    6547               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6548               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6549                 :       }
    6550                 :     }
    6551                 :   }
    6552               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6553                 :   {
    6554                 :     /* %typemap(freearg) (const char *utf8_path) */
    6555               1 :     GDALPythonFreeCStr(arg1, bToFree1);
    6556                 :   }
    6557               1 :   return resultobj;
    6558                 : fail:
    6559                 :   {
    6560                 :     /* %typemap(freearg) (const char *utf8_path) */
    6561               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6562                 :   }
    6563               0 :   return NULL;
    6564                 : }
    6565                 : 
    6566                 : 
    6567               1 : SWIGINTERN PyObject *_wrap_Rmdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6568               1 :   PyObject *resultobj = 0;
    6569               1 :   char *arg1 = (char *) 0 ;
    6570               1 :   int bToFree1 = 0 ;
    6571               1 :   PyObject * obj0 = 0 ;
    6572                 :   int result;
    6573                 :   
    6574               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Rmdir",&obj0)) SWIG_fail;
    6575                 :   {
    6576                 :     /* %typemap(in) (const char *utf8_path) */
    6577               1 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6578               1 :     if (arg1 == NULL)
    6579                 :     {
    6580               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6581               0 :       SWIG_fail;
    6582                 :     }
    6583                 :   }
    6584                 :   {
    6585               1 :     if ( bUseExceptions ) {
    6586               0 :       CPLErrorReset();
    6587                 :     }
    6588               1 :     result = (int)VSIRmdir((char const *)arg1);
    6589               1 :     if ( bUseExceptions ) {
    6590               0 :       CPLErr eclass = CPLGetLastErrorType();
    6591               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6592               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6593                 :       }
    6594                 :     }
    6595                 :   }
    6596               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6597                 :   {
    6598                 :     /* %typemap(freearg) (const char *utf8_path) */
    6599               1 :     GDALPythonFreeCStr(arg1, bToFree1);
    6600                 :   }
    6601               1 :   return resultobj;
    6602                 : fail:
    6603                 :   {
    6604                 :     /* %typemap(freearg) (const char *utf8_path) */
    6605               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6606                 :   }
    6607               0 :   return NULL;
    6608                 : }
    6609                 : 
    6610                 : 
    6611               1 : SWIGINTERN PyObject *_wrap_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6612               1 :   PyObject *resultobj = 0;
    6613               1 :   char *arg1 = (char *) 0 ;
    6614               1 :   char *arg2 = (char *) 0 ;
    6615                 :   int res1 ;
    6616               1 :   char *buf1 = 0 ;
    6617               1 :   int alloc1 = 0 ;
    6618                 :   int res2 ;
    6619               1 :   char *buf2 = 0 ;
    6620               1 :   int alloc2 = 0 ;
    6621               1 :   PyObject * obj0 = 0 ;
    6622               1 :   PyObject * obj1 = 0 ;
    6623                 :   int result;
    6624                 :   
    6625               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Rename",&obj0,&obj1)) SWIG_fail;
    6626               1 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    6627               1 :   if (!SWIG_IsOK(res1)) {
    6628               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rename" "', argument " "1"" of type '" "char const *""'");
    6629                 :   }
    6630               1 :   arg1 = reinterpret_cast< char * >(buf1);
    6631               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6632               1 :   if (!SWIG_IsOK(res2)) {
    6633               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Rename" "', argument " "2"" of type '" "char const *""'");
    6634                 :   }
    6635               1 :   arg2 = reinterpret_cast< char * >(buf2);
    6636                 :   {
    6637               1 :     if ( bUseExceptions ) {
    6638               0 :       CPLErrorReset();
    6639                 :     }
    6640               1 :     result = (int)VSIRename((char const *)arg1,(char const *)arg2);
    6641               1 :     if ( bUseExceptions ) {
    6642               0 :       CPLErr eclass = CPLGetLastErrorType();
    6643               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6644               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6645                 :       }
    6646                 :     }
    6647                 :   }
    6648               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6649               1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6650               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6651               1 :   return resultobj;
    6652                 : fail:
    6653               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6654               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6655               0 :   return NULL;
    6656                 : }
    6657                 : 
    6658                 : 
    6659               0 : SWIGINTERN PyObject *_wrap_StatBuf_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6660               0 :   PyObject *resultobj = 0;
    6661               0 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6662               0 :   void *argp1 = 0 ;
    6663               0 :   int res1 = 0 ;
    6664               0 :   PyObject * obj0 = 0 ;
    6665                 :   int result;
    6666                 :   
    6667               0 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_mode_get",&obj0)) SWIG_fail;
    6668               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6669               0 :   if (!SWIG_IsOK(res1)) {
    6670               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mode_get" "', argument " "1"" of type '" "StatBuf *""'"); 
    6671                 :   }
    6672               0 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6673               0 :   result = (int) ((arg1)->mode);
    6674               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6675               0 :   return resultobj;
    6676                 : fail:
    6677               0 :   return NULL;
    6678                 : }
    6679                 : 
    6680                 : 
    6681             287 : SWIGINTERN PyObject *_wrap_StatBuf_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6682             287 :   PyObject *resultobj = 0;
    6683             287 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6684             287 :   void *argp1 = 0 ;
    6685             287 :   int res1 = 0 ;
    6686             287 :   PyObject * obj0 = 0 ;
    6687                 :   GIntBig result;
    6688                 :   
    6689             287 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_size_get",&obj0)) SWIG_fail;
    6690             287 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6691             287 :   if (!SWIG_IsOK(res1)) {
    6692               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_size_get" "', argument " "1"" of type '" "StatBuf *""'"); 
    6693                 :   }
    6694             287 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6695             287 :   result =  ((arg1)->size);
    6696                 :   {
    6697                 :     char szTmp[32];
    6698                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
    6699                 : #if PY_VERSION_HEX>=0x03000000
    6700                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
    6701                 : #else
    6702             287 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
    6703                 : #endif
    6704                 :   }
    6705             287 :   return resultobj;
    6706                 : fail:
    6707               0 :   return NULL;
    6708                 : }
    6709                 : 
    6710                 : 
    6711             284 : SWIGINTERN PyObject *_wrap_StatBuf_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6712             284 :   PyObject *resultobj = 0;
    6713             284 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6714             284 :   void *argp1 = 0 ;
    6715             284 :   int res1 = 0 ;
    6716             284 :   PyObject * obj0 = 0 ;
    6717                 :   GIntBig result;
    6718                 :   
    6719             284 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_mtime_get",&obj0)) SWIG_fail;
    6720             284 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6721             284 :   if (!SWIG_IsOK(res1)) {
    6722               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mtime_get" "', argument " "1"" of type '" "StatBuf *""'"); 
    6723                 :   }
    6724             284 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6725             284 :   result =  ((arg1)->mtime);
    6726                 :   {
    6727                 :     char szTmp[32];
    6728                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
    6729                 : #if PY_VERSION_HEX>=0x03000000
    6730                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
    6731                 : #else
    6732             284 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
    6733                 : #endif
    6734                 :   }
    6735             284 :   return resultobj;
    6736                 : fail:
    6737               0 :   return NULL;
    6738                 : }
    6739                 : 
    6740                 : 
    6741               0 : SWIGINTERN PyObject *_wrap_new_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6742               0 :   PyObject *resultobj = 0;
    6743               0 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6744               0 :   void *argp1 = 0 ;
    6745               0 :   int res1 = 0 ;
    6746               0 :   PyObject * obj0 = 0 ;
    6747               0 :   StatBuf *result = 0 ;
    6748                 :   
    6749               0 :   if (!PyArg_ParseTuple(args,(char *)"O:new_StatBuf",&obj0)) SWIG_fail;
    6750               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6751               0 :   if (!SWIG_IsOK(res1)) {
    6752               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
    6753                 :   }
    6754               0 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6755                 :   {
    6756               0 :     if ( bUseExceptions ) {
    6757               0 :       CPLErrorReset();
    6758                 :     }
    6759               0 :     result = (StatBuf *)new_StatBuf(arg1);
    6760               0 :     if ( bUseExceptions ) {
    6761               0 :       CPLErr eclass = CPLGetLastErrorType();
    6762               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6763               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6764                 :       }
    6765                 :     }
    6766                 :   }
    6767               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StatBuf, SWIG_POINTER_NEW |  0 );
    6768               0 :   return resultobj;
    6769                 : fail:
    6770               0 :   return NULL;
    6771                 : }
    6772                 : 
    6773                 : 
    6774            2072 : SWIGINTERN PyObject *_wrap_delete_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6775            2072 :   PyObject *resultobj = 0;
    6776            2072 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6777            2072 :   void *argp1 = 0 ;
    6778            2072 :   int res1 = 0 ;
    6779            2072 :   PyObject * obj0 = 0 ;
    6780                 :   
    6781            2072 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_StatBuf",&obj0)) SWIG_fail;
    6782            2072 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, SWIG_POINTER_DISOWN |  0 );
    6783            2072 :   if (!SWIG_IsOK(res1)) {
    6784               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
    6785                 :   }
    6786            2072 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6787                 :   {
    6788            2072 :     if ( bUseExceptions ) {
    6789               0 :       CPLErrorReset();
    6790                 :     }
    6791                 :     delete_StatBuf(arg1);
    6792            2072 :     if ( bUseExceptions ) {
    6793               0 :       CPLErr eclass = CPLGetLastErrorType();
    6794               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6795               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6796                 :       }
    6797                 :     }
    6798                 :   }
    6799            2072 :   resultobj = SWIG_Py_Void();
    6800            2072 :   return resultobj;
    6801                 : fail:
    6802               0 :   return NULL;
    6803                 : }
    6804                 : 
    6805                 : 
    6806            2353 : SWIGINTERN PyObject *_wrap_StatBuf_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6807            2353 :   PyObject *resultobj = 0;
    6808            2353 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6809            2353 :   void *argp1 = 0 ;
    6810            2353 :   int res1 = 0 ;
    6811            2353 :   PyObject * obj0 = 0 ;
    6812                 :   int result;
    6813                 :   
    6814            2353 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_IsDirectory",&obj0)) SWIG_fail;
    6815            2353 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6816            2353 :   if (!SWIG_IsOK(res1)) {
    6817               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_IsDirectory" "', argument " "1"" of type '" "StatBuf *""'"); 
    6818                 :   }
    6819            2353 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6820                 :   {
    6821            2353 :     if ( bUseExceptions ) {
    6822               0 :       CPLErrorReset();
    6823                 :     }
    6824            2353 :     result = (int)StatBuf_IsDirectory(arg1);
    6825            2353 :     if ( bUseExceptions ) {
    6826               0 :       CPLErr eclass = CPLGetLastErrorType();
    6827               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6828               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6829                 :       }
    6830                 :     }
    6831                 :   }
    6832            2353 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6833            2353 :   return resultobj;
    6834                 : fail:
    6835               0 :   return NULL;
    6836                 : }
    6837                 : 
    6838                 : 
    6839              12 : SWIGINTERN PyObject *StatBuf_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6840                 :   PyObject *obj;
    6841              12 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    6842              12 :   SWIG_TypeNewClientData(SWIGTYPE_p_StatBuf, SWIG_NewClientData(obj));
    6843              12 :   return SWIG_Py_Void();
    6844                 : }
    6845                 : 
    6846            2074 : SWIGINTERN PyObject *_wrap_VSIStatL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6847            2074 :   PyObject *resultobj = 0;
    6848            2074 :   char *arg1 = (char *) 0 ;
    6849            2074 :   StatBuf *arg2 = (StatBuf *) 0 ;
    6850            2074 :   int arg3 = (int) 0 ;
    6851            2074 :   int bToFree1 = 0 ;
    6852                 :   StatBuf sStatBuf2 ;
    6853                 :   int val3 ;
    6854            2074 :   int ecode3 = 0 ;
    6855            2074 :   PyObject * obj0 = 0 ;
    6856            2074 :   PyObject * obj1 = 0 ;
    6857                 :   int result;
    6858                 :   
    6859                 :   {
    6860                 :     /* %typemap(in,numinputs=0) (StatBuf *psStatBufOut) (StatBuf sStatBuf2 ) */
    6861            2074 :     arg2 = &sStatBuf2;
    6862                 :   }
    6863            2074 :   if (!PyArg_ParseTuple(args,(char *)"O|O:VSIStatL",&obj0,&obj1)) SWIG_fail;
    6864                 :   {
    6865                 :     /* %typemap(in) (const char *utf8_path) */
    6866            2074 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6867            2074 :     if (arg1 == NULL)
    6868                 :     {
    6869               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6870               0 :       SWIG_fail;
    6871                 :     }
    6872                 :   }
    6873            2074 :   if (obj1) {
    6874            2074 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
    6875            2074 :     if (!SWIG_IsOK(ecode3)) {
    6876               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIStatL" "', argument " "3"" of type '" "int""'");
    6877                 :     } 
    6878            2074 :     arg3 = static_cast< int >(val3);
    6879                 :   }
    6880                 :   {
    6881            2074 :     if ( bUseExceptions ) {
    6882               0 :       CPLErrorReset();
    6883                 :     }
    6884            2074 :     result = (int)wrapper_VSIStatL((char const *)arg1,arg2,arg3);
    6885            2074 :     if ( bUseExceptions ) {
    6886               0 :       CPLErr eclass = CPLGetLastErrorType();
    6887               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6888               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6889                 :       }
    6890                 :     }
    6891                 :   }
    6892            2074 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6893                 :   {
    6894                 :     /* %typemap(argout) (StatBuf *psStatBufOut)*/
    6895            2074 :     Py_DECREF(resultobj);
    6896            2074 :     if (result == 0)
    6897            4144 :     resultobj = SWIG_NewPointerObj((void*)new_StatBuf( arg2 ),SWIGTYPE_p_StatBuf,1);
    6898                 :     else
    6899               2 :     resultobj = Py_None;
    6900                 :   }
    6901                 :   {
    6902                 :     /* %typemap(freearg) (const char *utf8_path) */
    6903            2074 :     GDALPythonFreeCStr(arg1, bToFree1);
    6904                 :   }
    6905            2074 :   return resultobj;
    6906                 : fail:
    6907                 :   {
    6908                 :     /* %typemap(freearg) (const char *utf8_path) */
    6909               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6910                 :   }
    6911               0 :   return NULL;
    6912                 : }
    6913                 : 
    6914                 : 
    6915             101 : SWIGINTERN PyObject *_wrap_VSIFOpenL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6916             101 :   PyObject *resultobj = 0;
    6917             101 :   char *arg1 = (char *) 0 ;
    6918             101 :   char *arg2 = (char *) 0 ;
    6919             101 :   int bToFree1 = 0 ;
    6920                 :   int res2 ;
    6921             101 :   char *buf2 = 0 ;
    6922             101 :   int alloc2 = 0 ;
    6923             101 :   PyObject * obj0 = 0 ;
    6924             101 :   PyObject * obj1 = 0 ;
    6925             101 :   VSILFILE *result = 0 ;
    6926                 :   
    6927             101 :   if (!PyArg_ParseTuple(args,(char *)"OO:VSIFOpenL",&obj0,&obj1)) SWIG_fail;
    6928                 :   {
    6929                 :     /* %typemap(in) (const char *utf8_path) */
    6930             101 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6931             101 :     if (arg1 == NULL)
    6932                 :     {
    6933               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6934               0 :       SWIG_fail;
    6935                 :     }
    6936                 :   }
    6937             101 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6938             101 :   if (!SWIG_IsOK(res2)) {
    6939               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenL" "', argument " "2"" of type '" "char const *""'");
    6940                 :   }
    6941             101 :   arg2 = reinterpret_cast< char * >(buf2);
    6942                 :   {
    6943             101 :     if ( bUseExceptions ) {
    6944               0 :       CPLErrorReset();
    6945                 :     }
    6946             101 :     result = (VSILFILE *)VSIFOpenL((char const *)arg1,(char const *)arg2);
    6947             101 :     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             101 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
    6955                 :   {
    6956                 :     /* %typemap(freearg) (const char *utf8_path) */
    6957             101 :     GDALPythonFreeCStr(arg1, bToFree1);
    6958                 :   }
    6959             101 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6960             101 :   return resultobj;
    6961                 : fail:
    6962                 :   {
    6963                 :     /* %typemap(freearg) (const char *utf8_path) */
    6964               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6965                 :   }
    6966               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6967               0 :   return NULL;
    6968                 : }
    6969                 : 
    6970                 : 
    6971              90 : SWIGINTERN PyObject *_wrap_VSIFCloseL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6972              90 :   PyObject *resultobj = 0;
    6973              90 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    6974                 :   int res1 ;
    6975              90 :   PyObject * obj0 = 0 ;
    6976                 :   
    6977              90 :   if (!PyArg_ParseTuple(args,(char *)"O:VSIFCloseL",&obj0)) SWIG_fail;
    6978              90 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    6979              90 :   if (!SWIG_IsOK(res1)) {
    6980               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFCloseL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    6981                 :   }
    6982                 :   {
    6983              90 :     if ( bUseExceptions ) {
    6984               0 :       CPLErrorReset();
    6985                 :     }
    6986              90 :     VSIFCloseL(arg1);
    6987              90 :     if ( bUseExceptions ) {
    6988               0 :       CPLErr eclass = CPLGetLastErrorType();
    6989               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6990               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6991                 :       }
    6992                 :     }
    6993                 :   }
    6994              90 :   resultobj = SWIG_Py_Void();
    6995              90 :   return resultobj;
    6996                 : fail:
    6997               0 :   return NULL;
    6998                 : }
    6999                 : 
    7000                 : 
    7001              29 : SWIGINTERN PyObject *_wrap_VSIFSeekL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7002              29 :   PyObject *resultobj = 0;
    7003              29 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    7004                 :   GIntBig arg2 ;
    7005                 :   int arg3 ;
    7006                 :   int res1 ;
    7007                 :   int val3 ;
    7008              29 :   int ecode3 = 0 ;
    7009              29 :   PyObject * obj0 = 0 ;
    7010              29 :   PyObject * obj1 = 0 ;
    7011              29 :   PyObject * obj2 = 0 ;
    7012                 :   int result;
    7013                 :   
    7014              29 :   if (!PyArg_ParseTuple(args,(char *)"OOO:VSIFSeekL",&obj0,&obj1,&obj2)) SWIG_fail;
    7015              29 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    7016              29 :   if (!SWIG_IsOK(res1)) {
    7017               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFSeekL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    7018                 :   }
    7019                 :   {
    7020                 :     PY_LONG_LONG val;
    7021              29 :     if ( !PyArg_Parse(obj1,"L",&val) ) {
    7022               0 :       PyErr_SetString(PyExc_TypeError, "not an integer");
    7023               0 :       SWIG_fail;
    7024                 :     }
    7025              29 :     arg2 = (GIntBig)val;
    7026                 :   }
    7027              29 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    7028              29 :   if (!SWIG_IsOK(ecode3)) {
    7029               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFSeekL" "', argument " "3"" of type '" "int""'");
    7030                 :   } 
    7031              29 :   arg3 = static_cast< int >(val3);
    7032                 :   {
    7033              29 :     if ( bUseExceptions ) {
    7034               0 :       CPLErrorReset();
    7035                 :     }
    7036              29 :     result = (int)VSIFSeekL(arg1,arg2,arg3);
    7037              29 :     if ( bUseExceptions ) {
    7038               0 :       CPLErr eclass = CPLGetLastErrorType();
    7039               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7040               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7041                 :       }
    7042                 :     }
    7043                 :   }
    7044              29 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7045              29 :   return resultobj;
    7046                 : fail:
    7047               0 :   return NULL;
    7048                 : }
    7049                 : 
    7050                 : 
    7051              23 : SWIGINTERN PyObject *_wrap_VSIFTellL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7052              23 :   PyObject *resultobj = 0;
    7053              23 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    7054                 :   int res1 ;
    7055              23 :   PyObject * obj0 = 0 ;
    7056                 :   GIntBig result;
    7057                 :   
    7058              23 :   if (!PyArg_ParseTuple(args,(char *)"O:VSIFTellL",&obj0)) SWIG_fail;
    7059              23 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    7060              23 :   if (!SWIG_IsOK(res1)) {
    7061               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTellL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    7062                 :   }
    7063                 :   {
    7064              23 :     if ( bUseExceptions ) {
    7065               0 :       CPLErrorReset();
    7066                 :     }
    7067              23 :     result = VSIFTellL(arg1);
    7068              23 :     if ( bUseExceptions ) {
    7069               0 :       CPLErr eclass = CPLGetLastErrorType();
    7070               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7071               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7072                 :       }
    7073                 :     }
    7074                 :   }
    7075                 :   {
    7076                 :     char szTmp[32];
    7077                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
    7078                 : #if PY_VERSION_HEX>=0x03000000
    7079                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
    7080                 : #else
    7081              23 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
    7082                 : #endif
    7083                 :   }
    7084              23 :   return resultobj;
    7085                 : fail:
    7086               0 :   return NULL;
    7087                 : }
    7088                 : 
    7089                 : 
    7090               3 : SWIGINTERN PyObject *_wrap_VSIFTruncateL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7091               3 :   PyObject *resultobj = 0;
    7092               3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    7093                 :   GIntBig arg2 ;
    7094                 :   int res1 ;
    7095               3 :   PyObject * obj0 = 0 ;
    7096               3 :   PyObject * obj1 = 0 ;
    7097                 :   int result;
    7098                 :   
    7099               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:VSIFTruncateL",&obj0,&obj1)) SWIG_fail;
    7100               3 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    7101               3 :   if (!SWIG_IsOK(res1)) {
    7102               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTruncateL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    7103                 :   }
    7104                 :   {
    7105                 :     PY_LONG_LONG val;
    7106               3 :     if ( !PyArg_Parse(obj1,"L",&val) ) {
    7107               0 :       PyErr_SetString(PyExc_TypeError, "not an integer");
    7108               0 :       SWIG_fail;
    7109                 :     }
    7110               3 :     arg2 = (GIntBig)val;
    7111                 :   }
    7112                 :   {
    7113               3 :     if ( bUseExceptions ) {
    7114               0 :       CPLErrorReset();
    7115                 :     }
    7116               3 :     result = (int)VSIFTruncateL(arg1,arg2);
    7117               3 :     if ( bUseExceptions ) {
    7118               0 :       CPLErr eclass = CPLGetLastErrorType();
    7119               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7120               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7121                 :       }
    7122                 :     }
    7123                 :   }
    7124               3 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7125               3 :   return resultobj;
    7126                 : fail:
    7127               0 :   return NULL;
    7128                 : }
    7129                 : 
    7130                 : 
    7131              64 : SWIGINTERN PyObject *_wrap_VSIFWriteL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7132              64 :   PyObject *resultobj = 0;
    7133                 :   int arg1 ;
    7134              64 :   char *arg2 = (char *) 0 ;
    7135                 :   int arg3 ;
    7136                 :   int arg4 ;
    7137              64 :   VSILFILE *arg5 = (VSILFILE *) 0 ;
    7138              64 :   int alloc1 = 0 ;
    7139                 :   int val3 ;
    7140              64 :   int ecode3 = 0 ;
    7141                 :   int val4 ;
    7142              64 :   int ecode4 = 0 ;
    7143                 :   int res5 ;
    7144              64 :   PyObject * obj0 = 0 ;
    7145              64 :   PyObject * obj1 = 0 ;
    7146              64 :   PyObject * obj2 = 0 ;
    7147              64 :   PyObject * obj3 = 0 ;
    7148                 :   int result;
    7149                 :   
    7150              64 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:VSIFWriteL",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    7151                 :   {
    7152                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    7153                 : #if PY_VERSION_HEX>=0x03000000
    7154                 :     if (PyUnicode_Check(obj0))
    7155                 :     {
    7156                 :       size_t safeLen = 0;
    7157                 :       int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
    7158                 :       if (!SWIG_IsOK(ret)) {
    7159                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    7160                 :       }
    7161                 :       
    7162                 :       if (safeLen) safeLen--;
    7163                 :       arg1 = (int) safeLen;
    7164                 :     }
    7165                 :     else if (PyBytes_Check(obj0))
    7166                 :     {
    7167                 :       Py_ssize_t safeLen = 0;
    7168                 :       PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    7169                 :       arg1 = (int) safeLen;
    7170                 :     }
    7171                 :     else
    7172                 :     {
    7173                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    7174                 :       SWIG_fail;
    7175                 :     }
    7176                 : #else
    7177              64 :     if (PyString_Check(obj0))
    7178                 :     {
    7179              64 :       Py_ssize_t safeLen = 0;
    7180              64 :       PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    7181              64 :       arg1 = (int) safeLen;
    7182                 :     }
    7183                 :     else
    7184                 :     {
    7185               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    7186               0 :       SWIG_fail;
    7187                 :     }
    7188                 : #endif
    7189                 :   }
    7190              64 :   ecode3 = SWIG_AsVal_int(obj1, &val3);
    7191              64 :   if (!SWIG_IsOK(ecode3)) {
    7192               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFWriteL" "', argument " "3"" of type '" "int""'");
    7193                 :   } 
    7194              64 :   arg3 = static_cast< int >(val3);
    7195              64 :   ecode4 = SWIG_AsVal_int(obj2, &val4);
    7196              64 :   if (!SWIG_IsOK(ecode4)) {
    7197               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VSIFWriteL" "', argument " "4"" of type '" "int""'");
    7198                 :   } 
    7199              64 :   arg4 = static_cast< int >(val4);
    7200              64 :   res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
    7201              64 :   if (!SWIG_IsOK(res5)) {
    7202               0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VSIFWriteL" "', argument " "5"" of type '" "VSILFILE *""'"); 
    7203                 :   }
    7204                 :   {
    7205              64 :     if ( bUseExceptions ) {
    7206               0 :       CPLErrorReset();
    7207                 :     }
    7208              64 :     result = (int)wrapper_VSIFWriteL(arg1,arg2,arg3,arg4,arg5);
    7209              64 :     if ( bUseExceptions ) {
    7210               0 :       CPLErr eclass = CPLGetLastErrorType();
    7211               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7212               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7213                 :       }
    7214                 :     }
    7215                 :   }
    7216              64 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7217                 :   {
    7218                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    7219              64 :     if( alloc1 == SWIG_NEWOBJ ) {
    7220               0 :       delete[] arg2;
    7221                 :     }
    7222                 :   }
    7223              64 :   return resultobj;
    7224                 : fail:
    7225                 :   {
    7226                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    7227               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    7228               0 :       delete[] arg2;
    7229                 :     }
    7230                 :   }
    7231               0 :   return NULL;
    7232                 : }
    7233                 : 
    7234                 : 
    7235              71 : SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7236              71 :   PyObject *resultobj = 0;
    7237              71 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7238              71 :   void *argp1 = 0 ;
    7239              71 :   int res1 = 0 ;
    7240              71 :   PyObject * obj0 = 0 ;
    7241              71 :   char *result = 0 ;
    7242                 :   
    7243              71 :   if (!PyArg_ParseTuple(args,(char *)"O:MajorObject_GetDescription",&obj0)) SWIG_fail;
    7244              71 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7245              71 :   if (!SWIG_IsOK(res1)) {
    7246               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7247                 :   }
    7248              71 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7249                 :   {
    7250              71 :     if ( bUseExceptions ) {
    7251               0 :       CPLErrorReset();
    7252                 :     }
    7253              71 :     result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
    7254              71 :     if ( bUseExceptions ) {
    7255               0 :       CPLErr eclass = CPLGetLastErrorType();
    7256               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7257               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7258                 :       }
    7259                 :     }
    7260                 :   }
    7261              71 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7262              71 :   return resultobj;
    7263                 : fail:
    7264               0 :   return NULL;
    7265                 : }
    7266                 : 
    7267                 : 
    7268              26 : SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7269              26 :   PyObject *resultobj = 0;
    7270              26 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7271              26 :   char *arg2 = (char *) 0 ;
    7272              26 :   void *argp1 = 0 ;
    7273              26 :   int res1 = 0 ;
    7274                 :   int res2 ;
    7275              26 :   char *buf2 = 0 ;
    7276              26 :   int alloc2 = 0 ;
    7277              26 :   PyObject * obj0 = 0 ;
    7278              26 :   PyObject * obj1 = 0 ;
    7279                 :   
    7280              26 :   if (!PyArg_ParseTuple(args,(char *)"OO:MajorObject_SetDescription",&obj0,&obj1)) SWIG_fail;
    7281              26 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7282              26 :   if (!SWIG_IsOK(res1)) {
    7283               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7284                 :   }
    7285              26 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7286              26 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7287              26 :   if (!SWIG_IsOK(res2)) {
    7288               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
    7289                 :   }
    7290              26 :   arg2 = reinterpret_cast< char * >(buf2);
    7291                 :   {
    7292              26 :     if (!arg2) {
    7293               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7294                 :     }
    7295                 :   }
    7296                 :   {
    7297              26 :     if ( bUseExceptions ) {
    7298               0 :       CPLErrorReset();
    7299                 :     }
    7300                 :     GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
    7301              26 :     if ( bUseExceptions ) {
    7302               0 :       CPLErr eclass = CPLGetLastErrorType();
    7303               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7304               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7305                 :       }
    7306                 :     }
    7307                 :   }
    7308              26 :   resultobj = SWIG_Py_Void();
    7309              26 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7310              26 :   return resultobj;
    7311                 : fail:
    7312               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7313               0 :   return NULL;
    7314                 : }
    7315                 : 
    7316                 : 
    7317            2688 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7318            2688 :   PyObject *resultobj = 0;
    7319            2688 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7320            2688 :   char *arg2 = (char *) "" ;
    7321            2688 :   void *argp1 = 0 ;
    7322            2688 :   int res1 = 0 ;
    7323                 :   int res2 ;
    7324            2688 :   char *buf2 = 0 ;
    7325            2688 :   int alloc2 = 0 ;
    7326            2688 :   PyObject * obj0 = 0 ;
    7327            2688 :   PyObject * obj1 = 0 ;
    7328            2688 :   char **result = 0 ;
    7329                 :   
    7330            2688 :   if (!PyArg_ParseTuple(args,(char *)"O|O:MajorObject_GetMetadata_Dict",&obj0,&obj1)) SWIG_fail;
    7331            2688 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7332            2688 :   if (!SWIG_IsOK(res1)) {
    7333               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7334                 :   }
    7335            2688 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7336            2688 :   if (obj1) {
    7337            2688 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7338            2688 :     if (!SWIG_IsOK(res2)) {
    7339               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
    7340                 :     }
    7341            2688 :     arg2 = reinterpret_cast< char * >(buf2);
    7342                 :   }
    7343                 :   {
    7344            2688 :     if ( bUseExceptions ) {
    7345               0 :       CPLErrorReset();
    7346                 :     }
    7347            2688 :     result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
    7348            2688 :     if ( bUseExceptions ) {
    7349               0 :       CPLErr eclass = CPLGetLastErrorType();
    7350               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7351               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7352                 :       }
    7353                 :     }
    7354                 :   }
    7355                 :   {
    7356                 :     /* %typemap(out) char **dict */
    7357            2688 :     char **stringarray = result;
    7358            2688 :     resultobj = PyDict_New();
    7359            2688 :     if ( stringarray != NULL ) {
    7360           17604 :       while (*stringarray != NULL ) {
    7361                 :         char const *valptr;
    7362                 :         char *keyptr;
    7363           14934 :         const char* pszSep = strchr( *stringarray, '=' );
    7364           14934 :         if ( pszSep != NULL) {
    7365           14934 :           keyptr = CPLStrdup(*stringarray);
    7366           14934 :           keyptr[pszSep - *stringarray] = '\0';
    7367           14934 :           valptr = pszSep + 1;
    7368           14934 :           PyObject *nm = GDALPythonObjectFromCStr( keyptr );
    7369           14934 :           PyObject *val = GDALPythonObjectFromCStr( valptr );
    7370           14934 :           PyDict_SetItem(resultobj, nm, val );
    7371           14934 :           Py_DECREF(nm);
    7372           14934 :           Py_DECREF(val);
    7373           14934 :           CPLFree( keyptr );
    7374                 :         }
    7375           14934 :         stringarray++;
    7376                 :       }
    7377                 :     }
    7378                 :   }
    7379            2688 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7380            2688 :   return resultobj;
    7381                 : fail:
    7382               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7383               0 :   return NULL;
    7384                 : }
    7385                 : 
    7386                 : 
    7387             161 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7388             161 :   PyObject *resultobj = 0;
    7389             161 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7390             161 :   char *arg2 = (char *) "" ;
    7391             161 :   void *argp1 = 0 ;
    7392             161 :   int res1 = 0 ;
    7393                 :   int res2 ;
    7394             161 :   char *buf2 = 0 ;
    7395             161 :   int alloc2 = 0 ;
    7396             161 :   PyObject * obj0 = 0 ;
    7397             161 :   PyObject * obj1 = 0 ;
    7398             161 :   char **result = 0 ;
    7399                 :   
    7400             161 :   if (!PyArg_ParseTuple(args,(char *)"O|O:MajorObject_GetMetadata_List",&obj0,&obj1)) SWIG_fail;
    7401             161 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7402             161 :   if (!SWIG_IsOK(res1)) {
    7403               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7404                 :   }
    7405             161 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7406             161 :   if (obj1) {
    7407             128 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7408             128 :     if (!SWIG_IsOK(res2)) {
    7409               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
    7410                 :     }
    7411             128 :     arg2 = reinterpret_cast< char * >(buf2);
    7412                 :   }
    7413                 :   {
    7414             161 :     if ( bUseExceptions ) {
    7415               0 :       CPLErrorReset();
    7416                 :     }
    7417             161 :     result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
    7418             161 :     if ( bUseExceptions ) {
    7419               0 :       CPLErr eclass = CPLGetLastErrorType();
    7420               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7421               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7422                 :       }
    7423                 :     }
    7424                 :   }
    7425                 :   {
    7426                 :     /* %typemap(out) char **options -> ( string ) */
    7427             161 :     char **stringarray = result;
    7428             161 :     if ( stringarray == NULL ) {
    7429             104 :       resultobj = Py_None;
    7430             104 :       Py_INCREF( resultobj );
    7431                 :     }
    7432                 :     else {
    7433              57 :       int len = CSLCount( stringarray );
    7434              57 :       resultobj = PyList_New( len );
    7435             384 :       for ( int i = 0; i < len; ++i ) {
    7436             327 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    7437             327 :         PyList_SetItem(resultobj, i, o );
    7438                 :       }
    7439                 :     }
    7440                 :   }
    7441             161 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7442             161 :   return resultobj;
    7443                 : fail:
    7444               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7445               0 :   return NULL;
    7446                 : }
    7447                 : 
    7448                 : 
    7449              77 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7450              77 :   PyObject *resultobj = 0;
    7451              77 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7452              77 :   char **arg2 = (char **) 0 ;
    7453              77 :   char *arg3 = (char *) "" ;
    7454              77 :   void *argp1 = 0 ;
    7455              77 :   int res1 = 0 ;
    7456                 :   int res3 ;
    7457              77 :   char *buf3 = 0 ;
    7458              77 :   int alloc3 = 0 ;
    7459              77 :   PyObject * obj0 = 0 ;
    7460              77 :   PyObject * obj1 = 0 ;
    7461              77 :   PyObject * obj2 = 0 ;
    7462                 :   CPLErr result;
    7463                 :   
    7464              77 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_SetMetadata",&obj0,&obj1,&obj2)) SWIG_fail;
    7465              77 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7466              77 :   if (!SWIG_IsOK(res1)) {
    7467               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7468                 :   }
    7469              77 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7470                 :   {
    7471                 :     /* %typemap(in) char **dict */
    7472              77 :     arg2 = NULL;
    7473              77 :     if ( PySequence_Check( obj1 ) ) {
    7474              11 :       int size = PySequence_Size(obj1);
    7475              26 :       for (int i = 0; i < size; i++) {
    7476              15 :         char *pszItem = NULL;
    7477              15 :         PyObject* pyObj = PySequence_GetItem(obj1,i);
    7478              15 :         if ( ! PyArg_Parse( pyObj, "s", &pszItem ) ) {
    7479               0 :           Py_DECREF(pyObj);
    7480               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    7481               0 :           SWIG_fail;
    7482                 :         }
    7483              15 :         arg2 = CSLAddString( arg2, pszItem );
    7484              15 :         Py_DECREF(pyObj);
    7485                 :       }
    7486                 :     }
    7487              66 :     else if ( PyMapping_Check( obj1 ) ) {
    7488                 :       /* We need to use the dictionary form. */
    7489              66 :       int size = PyMapping_Length( obj1 );
    7490              66 :       if ( size > 0 ) {
    7491              66 :         PyObject *item_list = PyMapping_Items( obj1 );
    7492             144 :         for( int i=0; i<size; i++ ) {
    7493              78 :           PyObject *it = PySequence_GetItem( item_list, i );
    7494                 :           char *nm;
    7495                 :           char *val;
    7496              78 :           if ( ! PyArg_ParseTuple( it, "ss", &nm, &val ) ) {
    7497               0 :             Py_DECREF(it);
    7498               0 :             PyErr_SetString(PyExc_TypeError,"dictionnaire must contain tuples of strings");
    7499               0 :             SWIG_fail;
    7500                 :           }
    7501              78 :           arg2 = CSLAddNameValue( arg2, nm, val );
    7502              78 :           Py_DECREF(it);
    7503                 :         }
    7504              66 :         Py_DECREF(item_list);
    7505                 :       }
    7506                 :     }
    7507                 :     else {
    7508               0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
    7509               0 :       SWIG_fail;
    7510                 :     }
    7511                 :   }
    7512              77 :   if (obj2) {
    7513              15 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7514              15 :     if (!SWIG_IsOK(res3)) {
    7515               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
    7516                 :     }
    7517              15 :     arg3 = reinterpret_cast< char * >(buf3);
    7518                 :   }
    7519                 :   {
    7520              77 :     if ( bUseExceptions ) {
    7521               0 :       CPLErrorReset();
    7522                 :     }
    7523              77 :     result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
    7524              77 :     if ( bUseExceptions ) {
    7525               0 :       CPLErr eclass = CPLGetLastErrorType();
    7526               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7527               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7528                 :       }
    7529                 :     }
    7530                 :   }
    7531             154 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7532                 :   {
    7533                 :     /* %typemap(freearg) char **dict */
    7534              77 :     CSLDestroy( arg2 );
    7535                 :   }
    7536              77 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7537                 :   {
    7538                 :     /* %typemap(ret) CPLErr */
    7539              77 :     if ( bUseExceptions == 0 ) {
    7540                 :       /* We're not using exceptions.  And no error has occurred */
    7541              77 :       if ( resultobj == 0 ) {
    7542                 :         /* No other return values set so return ErrorCode */
    7543               0 :         resultobj = PyInt_FromLong(result);
    7544                 :       }
    7545                 :     }
    7546                 :   }
    7547              77 :   return resultobj;
    7548                 : fail:
    7549                 :   {
    7550                 :     /* %typemap(freearg) char **dict */
    7551               0 :     CSLDestroy( arg2 );
    7552                 :   }
    7553               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7554               0 :   return NULL;
    7555                 : }
    7556                 : 
    7557                 : 
    7558               5 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7559               5 :   PyObject *resultobj = 0;
    7560               5 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7561               5 :   char *arg2 = (char *) 0 ;
    7562               5 :   char *arg3 = (char *) "" ;
    7563               5 :   void *argp1 = 0 ;
    7564               5 :   int res1 = 0 ;
    7565                 :   int res2 ;
    7566               5 :   char *buf2 = 0 ;
    7567               5 :   int alloc2 = 0 ;
    7568                 :   int res3 ;
    7569               5 :   char *buf3 = 0 ;
    7570               5 :   int alloc3 = 0 ;
    7571               5 :   PyObject * obj0 = 0 ;
    7572               5 :   PyObject * obj1 = 0 ;
    7573               5 :   PyObject * obj2 = 0 ;
    7574                 :   CPLErr result;
    7575                 :   
    7576               5 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_SetMetadata",&obj0,&obj1,&obj2)) SWIG_fail;
    7577               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7578               5 :   if (!SWIG_IsOK(res1)) {
    7579               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7580                 :   }
    7581               5 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7582               5 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7583               5 :   if (!SWIG_IsOK(res2)) {
    7584               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
    7585                 :   }
    7586               5 :   arg2 = reinterpret_cast< char * >(buf2);
    7587               5 :   if (obj2) {
    7588               5 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7589               5 :     if (!SWIG_IsOK(res3)) {
    7590               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
    7591                 :     }
    7592               5 :     arg3 = reinterpret_cast< char * >(buf3);
    7593                 :   }
    7594                 :   {
    7595               5 :     if ( bUseExceptions ) {
    7596               0 :       CPLErrorReset();
    7597                 :     }
    7598               5 :     result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
    7599               5 :     if ( bUseExceptions ) {
    7600               0 :       CPLErr eclass = CPLGetLastErrorType();
    7601               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7602               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7603                 :       }
    7604                 :     }
    7605                 :   }
    7606              10 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7607               5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7608               5 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7609                 :   {
    7610                 :     /* %typemap(ret) CPLErr */
    7611               5 :     if ( bUseExceptions == 0 ) {
    7612                 :       /* We're not using exceptions.  And no error has occurred */
    7613               5 :       if ( resultobj == 0 ) {
    7614                 :         /* No other return values set so return ErrorCode */
    7615               0 :         resultobj = PyInt_FromLong(result);
    7616                 :       }
    7617                 :     }
    7618                 :   }
    7619               5 :   return resultobj;
    7620                 : fail:
    7621               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7622               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7623               0 :   return NULL;
    7624                 : }
    7625                 : 
    7626                 : 
    7627              82 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
    7628                 :   int argc;
    7629                 :   PyObject *argv[4];
    7630                 :   int ii;
    7631                 :   
    7632              82 :   if (!PyTuple_Check(args)) SWIG_fail;
    7633              82 :   argc = (int)PyObject_Length(args);
    7634             266 :   for (ii = 0; (ii < argc) && (ii < 3); ii++) {
    7635             184 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    7636                 :   }
    7637              82 :   if ((argc >= 2) && (argc <= 3)) {
    7638                 :     int _v;
    7639              82 :     void *vptr = 0;
    7640              82 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
    7641              82 :     _v = SWIG_CheckState(res);
    7642              82 :     if (_v) {
    7643                 :       {
    7644                 :         /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
    7645                 :         /* Note: we exclude explicitely strings, because they can be considered as a sequence of characters, */
    7646                 :         /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
    7647                 :         /* (see #4816) */
    7648              82 :         _v = ((PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0)) ) ? 1 : 0;
    7649                 :       }
    7650              82 :       if (_v) {
    7651              77 :         if (argc <= 2) {
    7652              62 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, args);
    7653                 :         }
    7654              15 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
    7655              15 :         _v = SWIG_CheckState(res);
    7656              15 :         if (_v) {
    7657              15 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, args);
    7658                 :         }
    7659                 :       }
    7660                 :     }
    7661                 :   }
    7662               5 :   if ((argc >= 2) && (argc <= 3)) {
    7663                 :     int _v;
    7664               5 :     void *vptr = 0;
    7665               5 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
    7666               5 :     _v = SWIG_CheckState(res);
    7667               5 :     if (_v) {
    7668               5 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    7669               5 :       _v = SWIG_CheckState(res);
    7670               5 :       if (_v) {
    7671               5 :         if (argc <= 2) {
    7672               0 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, args);
    7673                 :         }
    7674               5 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
    7675               5 :         _v = SWIG_CheckState(res);
    7676               5 :         if (_v) {
    7677               5 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, args);
    7678                 :         }
    7679                 :       }
    7680                 :     }
    7681                 :   }
    7682                 :   
    7683                 : fail:
    7684                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
    7685                 :     "  Possible C/C++ prototypes are:\n"
    7686                 :     "    SetMetadata(GDALMajorObjectShadow *,char **,char const *)\n"
    7687               0 :     "    SetMetadata(GDALMajorObjectShadow *,char *,char const *)\n");
    7688               0 :   return NULL;
    7689                 : }
    7690                 : 
    7691                 : 
    7692             175 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7693             175 :   PyObject *resultobj = 0;
    7694             175 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7695             175 :   char *arg2 = (char *) 0 ;
    7696             175 :   char *arg3 = (char *) "" ;
    7697             175 :   void *argp1 = 0 ;
    7698             175 :   int res1 = 0 ;
    7699                 :   int res2 ;
    7700             175 :   char *buf2 = 0 ;
    7701             175 :   int alloc2 = 0 ;
    7702                 :   int res3 ;
    7703             175 :   char *buf3 = 0 ;
    7704             175 :   int alloc3 = 0 ;
    7705             175 :   PyObject * obj0 = 0 ;
    7706             175 :   PyObject * obj1 = 0 ;
    7707             175 :   PyObject * obj2 = 0 ;
    7708             175 :   char *result = 0 ;
    7709                 :   
    7710             175 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_GetMetadataItem",&obj0,&obj1,&obj2)) SWIG_fail;
    7711             175 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7712             175 :   if (!SWIG_IsOK(res1)) {
    7713               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7714                 :   }
    7715             175 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7716             175 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7717             175 :   if (!SWIG_IsOK(res2)) {
    7718               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
    7719                 :   }
    7720             175 :   arg2 = reinterpret_cast< char * >(buf2);
    7721             175 :   if (obj2) {
    7722              95 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7723              95 :     if (!SWIG_IsOK(res3)) {
    7724               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
    7725                 :     }
    7726              95 :     arg3 = reinterpret_cast< char * >(buf3);
    7727                 :   }
    7728                 :   {
    7729             175 :     if (!arg2) {
    7730               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7731                 :     }
    7732                 :   }
    7733                 :   {
    7734             175 :     if ( bUseExceptions ) {
    7735               0 :       CPLErrorReset();
    7736                 :     }
    7737             175 :     result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
    7738             175 :     if ( bUseExceptions ) {
    7739               0 :       CPLErr eclass = CPLGetLastErrorType();
    7740               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7741               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7742                 :       }
    7743                 :     }
    7744                 :   }
    7745             175 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7746             175 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7747             175 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7748             175 :   return resultobj;
    7749                 : fail:
    7750               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7751               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7752               0 :   return NULL;
    7753                 : }
    7754                 : 
    7755                 : 
    7756              39 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7757              39 :   PyObject *resultobj = 0;
    7758              39 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7759              39 :   char *arg2 = (char *) 0 ;
    7760              39 :   char *arg3 = (char *) 0 ;
    7761              39 :   char *arg4 = (char *) "" ;
    7762              39 :   void *argp1 = 0 ;
    7763              39 :   int res1 = 0 ;
    7764                 :   int res2 ;
    7765              39 :   char *buf2 = 0 ;
    7766              39 :   int alloc2 = 0 ;
    7767                 :   int res3 ;
    7768              39 :   char *buf3 = 0 ;
    7769              39 :   int alloc3 = 0 ;
    7770                 :   int res4 ;
    7771              39 :   char *buf4 = 0 ;
    7772              39 :   int alloc4 = 0 ;
    7773              39 :   PyObject * obj0 = 0 ;
    7774              39 :   PyObject * obj1 = 0 ;
    7775              39 :   PyObject * obj2 = 0 ;
    7776              39 :   PyObject * obj3 = 0 ;
    7777                 :   CPLErr result;
    7778                 :   
    7779              39 :   if (!PyArg_ParseTuple(args,(char *)"OOO|O:MajorObject_SetMetadataItem",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    7780              39 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7781              39 :   if (!SWIG_IsOK(res1)) {
    7782               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7783                 :   }
    7784              39 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7785              39 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7786              39 :   if (!SWIG_IsOK(res2)) {
    7787               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
    7788                 :   }
    7789              39 :   arg2 = reinterpret_cast< char * >(buf2);
    7790              39 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7791              39 :   if (!SWIG_IsOK(res3)) {
    7792               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
    7793                 :   }
    7794              39 :   arg3 = reinterpret_cast< char * >(buf3);
    7795              39 :   if (obj3) {
    7796               7 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
    7797               7 :     if (!SWIG_IsOK(res4)) {
    7798               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
    7799                 :     }
    7800               7 :     arg4 = reinterpret_cast< char * >(buf4);
    7801                 :   }
    7802                 :   {
    7803              39 :     if (!arg2) {
    7804               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7805                 :     }
    7806                 :   }
    7807                 :   {
    7808              39 :     if ( bUseExceptions ) {
    7809               0 :       CPLErrorReset();
    7810                 :     }
    7811              39 :     result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
    7812              39 :     if ( bUseExceptions ) {
    7813               0 :       CPLErr eclass = CPLGetLastErrorType();
    7814               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7815               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7816                 :       }
    7817                 :     }
    7818                 :   }
    7819              78 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7820              39 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7821              39 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7822              39 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
    7823                 :   {
    7824                 :     /* %typemap(ret) CPLErr */
    7825              39 :     if ( bUseExceptions == 0 ) {
    7826                 :       /* We're not using exceptions.  And no error has occurred */
    7827              39 :       if ( resultobj == 0 ) {
    7828                 :         /* No other return values set so return ErrorCode */
    7829               0 :         resultobj = PyInt_FromLong(result);
    7830                 :       }
    7831                 :     }
    7832                 :   }
    7833              39 :   return resultobj;
    7834                 : fail:
    7835               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7836               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7837               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
    7838               0 :   return NULL;
    7839                 : }
    7840                 : 
    7841                 : 
    7842              12 : SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7843                 :   PyObject *obj;
    7844              12 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    7845              12 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
    7846              12 :   return SWIG_Py_Void();
    7847                 : }
    7848                 : 
    7849           23169 : SWIGINTERN PyObject *_wrap_Driver_ShortName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7850           23169 :   PyObject *resultobj = 0;
    7851           23169 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7852           23169 :   void *argp1 = 0 ;
    7853           23169 :   int res1 = 0 ;
    7854           23169 :   PyObject * obj0 = 0 ;
    7855           23169 :   char *result = 0 ;
    7856                 :   
    7857           23169 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_ShortName_get",&obj0)) SWIG_fail;
    7858           23169 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7859           23169 :   if (!SWIG_IsOK(res1)) {
    7860               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_ShortName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7861                 :   }
    7862           23169 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7863                 :   {
    7864           23169 :     if ( bUseExceptions ) {
    7865               0 :       CPLErrorReset();
    7866                 :     }
    7867           23169 :     result = (char *)GDALDriverShadow_ShortName_get(arg1);
    7868           23169 :     if ( bUseExceptions ) {
    7869               0 :       CPLErr eclass = CPLGetLastErrorType();
    7870               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7871               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7872                 :       }
    7873                 :     }
    7874                 :   }
    7875           23169 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7876           23169 :   return resultobj;
    7877                 : fail:
    7878               0 :   return NULL;
    7879                 : }
    7880                 : 
    7881                 : 
    7882              17 : SWIGINTERN PyObject *_wrap_Driver_LongName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7883              17 :   PyObject *resultobj = 0;
    7884              17 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7885              17 :   void *argp1 = 0 ;
    7886              17 :   int res1 = 0 ;
    7887              17 :   PyObject * obj0 = 0 ;
    7888              17 :   char *result = 0 ;
    7889                 :   
    7890              17 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_LongName_get",&obj0)) SWIG_fail;
    7891              17 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7892              17 :   if (!SWIG_IsOK(res1)) {
    7893               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_LongName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7894                 :   }
    7895              17 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7896                 :   {
    7897              17 :     if ( bUseExceptions ) {
    7898               0 :       CPLErrorReset();
    7899                 :     }
    7900              17 :     result = (char *)GDALDriverShadow_LongName_get(arg1);
    7901              17 :     if ( bUseExceptions ) {
    7902               0 :       CPLErr eclass = CPLGetLastErrorType();
    7903               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7904               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7905                 :       }
    7906                 :     }
    7907                 :   }
    7908              17 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7909              17 :   return resultobj;
    7910                 : fail:
    7911               0 :   return NULL;
    7912                 : }
    7913                 : 
    7914                 : 
    7915               0 : SWIGINTERN PyObject *_wrap_Driver_HelpTopic_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7916               0 :   PyObject *resultobj = 0;
    7917               0 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7918               0 :   void *argp1 = 0 ;
    7919               0 :   int res1 = 0 ;
    7920               0 :   PyObject * obj0 = 0 ;
    7921               0 :   char *result = 0 ;
    7922                 :   
    7923               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_HelpTopic_get",&obj0)) SWIG_fail;
    7924               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7925               0 :   if (!SWIG_IsOK(res1)) {
    7926               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HelpTopic_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7927                 :   }
    7928               0 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7929                 :   {
    7930               0 :     if ( bUseExceptions ) {
    7931               0 :       CPLErrorReset();
    7932                 :     }
    7933               0 :     result = (char *)GDALDriverShadow_HelpTopic_get(arg1);
    7934               0 :     if ( bUseExceptions ) {
    7935               0 :       CPLErr eclass = CPLGetLastErrorType();
    7936               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7937               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7938                 :       }
    7939                 :     }
    7940                 :   }
    7941               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7942               0 :   return resultobj;
    7943                 : fail:
    7944               0 :   return NULL;
    7945                 : }
    7946                 : 
    7947                 : 
    7948            7004 : SWIGINTERN PyObject *_wrap_Driver_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    7949            7004 :   PyObject *resultobj = 0;
    7950            7004 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7951            7004 :   char *arg2 = (char *) 0 ;
    7952                 :   int arg3 ;
    7953                 :   int arg4 ;
    7954            7004 :   int arg5 = (int) 1 ;
    7955            7004 :   GDALDataType arg6 = (GDALDataType) GDT_Byte ;
    7956            7004 :   char **arg7 = (char **) 0 ;
    7957            7004 :   void *argp1 = 0 ;
    7958            7004 :   int res1 = 0 ;
    7959            7004 :   int bToFree2 = 0 ;
    7960                 :   int val3 ;
    7961            7004 :   int ecode3 = 0 ;
    7962                 :   int val4 ;
    7963            7004 :   int ecode4 = 0 ;
    7964                 :   int val5 ;
    7965            7004 :   int ecode5 = 0 ;
    7966                 :   int val6 ;
    7967            7004 :   int ecode6 = 0 ;
    7968            7004 :   PyObject * obj0 = 0 ;
    7969            7004 :   PyObject * obj1 = 0 ;
    7970            7004 :   PyObject * obj2 = 0 ;
    7971            7004 :   PyObject * obj3 = 0 ;
    7972            7004 :   PyObject * obj4 = 0 ;
    7973            7004 :   PyObject * obj5 = 0 ;
    7974            7004 :   PyObject * obj6 = 0 ;
    7975                 :   char *  kwnames[] = {
    7976                 :     (char *) "self",(char *) "utf8_path",(char *) "xsize",(char *) "ysize",(char *) "bands",(char *) "eType",(char *) "options", NULL 
    7977            7004 :   };
    7978            7004 :   GDALDatasetShadow *result = 0 ;
    7979                 :   
    7980            7004 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:Driver_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
    7981            7004 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7982            7004 :   if (!SWIG_IsOK(res1)) {
    7983               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Create" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7984                 :   }
    7985            7004 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7986                 :   {
    7987                 :     /* %typemap(in) (const char *utf8_path) */
    7988            7004 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    7989            7004 :     if (arg2 == NULL)
    7990                 :     {
    7991               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    7992               0 :       SWIG_fail;
    7993                 :     }
    7994                 :   }
    7995            7004 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    7996            7004 :   if (!SWIG_IsOK(ecode3)) {
    7997               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Create" "', argument " "3"" of type '" "int""'");
    7998                 :   } 
    7999            7004 :   arg3 = static_cast< int >(val3);
    8000            7004 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
    8001            7004 :   if (!SWIG_IsOK(ecode4)) {
    8002               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_Create" "', argument " "4"" of type '" "int""'");
    8003                 :   } 
    8004            7004 :   arg4 = static_cast< int >(val4);
    8005            7004 :   if (obj4) {
    8006            6783 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
    8007            6783 :     if (!SWIG_IsOK(ecode5)) {
    8008               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Driver_Create" "', argument " "5"" of type '" "int""'");
    8009                 :     } 
    8010            6783 :     arg5 = static_cast< int >(val5);
    8011                 :   }
    8012            7004 :   if (obj5) {
    8013            1610 :     ecode6 = SWIG_AsVal_int(obj5, &val6);
    8014            1610 :     if (!SWIG_IsOK(ecode6)) {
    8015               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Driver_Create" "', argument " "6"" of type '" "GDALDataType""'");
    8016                 :     } 
    8017            1610 :     arg6 = static_cast< GDALDataType >(val6);
    8018                 :   }
    8019            7004 :   if (obj6) {
    8020                 :     {
    8021                 :       /* %typemap(in) char **options */
    8022                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    8023             358 :       if ( ! PySequence_Check(obj6) || PyUnicode_Check(obj6)
    8024                 :   #if PY_VERSION_HEX < 0x03000000
    8025                 :         || PyString_Check(obj6)
    8026                 :   #endif
    8027                 :         ) {
    8028               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    8029               0 :         SWIG_fail;
    8030                 :       }
    8031                 :       
    8032             358 :       int size = PySequence_Size(obj6);
    8033             684 :       for (int i = 0; i < size; i++) {
    8034             326 :         PyObject* pyObj = PySequence_GetItem(obj6,i);
    8035             326 :         if (PyUnicode_Check(pyObj))
    8036                 :         {
    8037                 :           char *pszStr;
    8038                 :           Py_ssize_t nLen;
    8039               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    8040                 : #if PY_VERSION_HEX >= 0x03000000
    8041                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8042                 : #else
    8043               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8044                 : #endif
    8045               0 :           arg7 = CSLAddString( arg7, pszStr );
    8046               0 :           Py_XDECREF(pyUTF8Str);
    8047                 :         }
    8048                 : #if PY_VERSION_HEX >= 0x03000000
    8049                 :         else if (PyBytes_Check(pyObj))
    8050                 :         arg7 = CSLAddString( arg7, PyBytes_AsString(pyObj) );
    8051                 : #else
    8052             326 :         else if (PyString_Check(pyObj))
    8053             326 :         arg7 = CSLAddString( arg7, PyString_AsString(pyObj) );
    8054                 : #endif
    8055                 :         else
    8056                 :         {
    8057               0 :           Py_DECREF(pyObj);
    8058               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    8059               0 :           SWIG_fail;
    8060                 :         }
    8061             326 :         Py_DECREF(pyObj);
    8062                 :       }
    8063                 :     }
    8064                 :   }
    8065                 :   {
    8066            7004 :     if ( bUseExceptions ) {
    8067               0 :       CPLErrorReset();
    8068                 :     }
    8069            7004 :     result = (GDALDatasetShadow *)GDALDriverShadow_Create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
    8070            7004 :     if ( bUseExceptions ) {
    8071               0 :       CPLErr eclass = CPLGetLastErrorType();
    8072               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8073               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8074                 :       }
    8075                 :     }
    8076                 :   }
    8077            7004 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
    8078                 :   {
    8079                 :     /* %typemap(freearg) (const char *utf8_path) */
    8080            7004 :     GDALPythonFreeCStr(arg2, bToFree2);
    8081                 :   }
    8082                 :   {
    8083                 :     /* %typemap(freearg) char **options */
    8084            7004 :     CSLDestroy( arg7 );
    8085                 :   }
    8086            7004 :   return resultobj;
    8087                 : fail:
    8088                 :   {
    8089                 :     /* %typemap(freearg) (const char *utf8_path) */
    8090               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    8091                 :   }
    8092                 :   {
    8093                 :     /* %typemap(freearg) char **options */
    8094               0 :     CSLDestroy( arg7 );
    8095                 :   }
    8096               0 :   return NULL;
    8097                 : }
    8098                 : 
    8099                 : 
    8100            2069 : SWIGINTERN PyObject *_wrap_Driver_CreateCopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    8101            2069 :   PyObject *resultobj = 0;
    8102            2069 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8103            2069 :   char *arg2 = (char *) 0 ;
    8104            2069 :   GDALDatasetShadow *arg3 = (GDALDatasetShadow *) 0 ;
    8105            2069 :   int arg4 = (int) 1 ;
    8106            2069 :   char **arg5 = (char **) 0 ;
    8107            2069 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
    8108            2069 :   void *arg7 = (void *) NULL ;
    8109            2069 :   void *argp1 = 0 ;
    8110            2069 :   int res1 = 0 ;
    8111            2069 :   int bToFree2 = 0 ;
    8112            2069 :   void *argp3 = 0 ;
    8113            2069 :   int res3 = 0 ;
    8114                 :   int val4 ;
    8115            2069 :   int ecode4 = 0 ;
    8116            2069 :   PyObject * obj0 = 0 ;
    8117            2069 :   PyObject * obj1 = 0 ;
    8118            2069 :   PyObject * obj2 = 0 ;
    8119            2069 :   PyObject * obj3 = 0 ;
    8120            2069 :   PyObject * obj4 = 0 ;
    8121            2069 :   PyObject * obj5 = 0 ;
    8122            2069 :   PyObject * obj6 = 0 ;
    8123                 :   char *  kwnames[] = {
    8124                 :     (char *) "self",(char *) "utf8_path",(char *) "src",(char *) "strict",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
    8125            2069 :   };
    8126            2069 :   GDALDatasetShadow *result = 0 ;
    8127                 :   
    8128                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
    8129                 :   PyProgressData *psProgressInfo;
    8130            2069 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
    8131            2069 :   psProgressInfo->nLastReported = -1;
    8132            2069 :   psProgressInfo->psPyCallback = NULL;
    8133            2069 :   psProgressInfo->psPyCallbackData = NULL;
    8134            2069 :   arg7 = psProgressInfo;
    8135            2069 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Driver_CreateCopy",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
    8136            2069 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8137            2069 :   if (!SWIG_IsOK(res1)) {
    8138               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateCopy" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8139                 :   }
    8140            2069 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8141                 :   {
    8142                 :     /* %typemap(in) (const char *utf8_path) */
    8143            2069 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    8144            2069 :     if (arg2 == NULL)
    8145                 :     {
    8146               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    8147               0 :       SWIG_fail;
    8148                 :     }
    8149                 :   }
    8150            2069 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
    8151            2069 :   if (!SWIG_IsOK(res3)) {
    8152               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CreateCopy" "', argument " "3"" of type '" "GDALDatasetShadow *""'"); 
    8153                 :   }
    8154            2069 :   arg3 = reinterpret_cast< GDALDatasetShadow * >(argp3);
    8155            2069 :   if (obj3) {
    8156             255 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
    8157             255 :     if (!SWIG_IsOK(ecode4)) {
    8158               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_CreateCopy" "', argument " "4"" of type '" "int""'");
    8159                 :     } 
    8160             255 :     arg4 = static_cast< int >(val4);
    8161                 :   }
    8162            2069 :   if (obj4) {
    8163                 :     {
    8164                 :       /* %typemap(in) char **options */
    8165                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    8166             370 :       if ( ! PySequence_Check(obj4) || PyUnicode_Check(obj4)
    8167                 :   #if PY_VERSION_HEX < 0x03000000
    8168                 :         || PyString_Check(obj4)
    8169                 :   #endif
    8170                 :         ) {
    8171               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    8172               0 :         SWIG_fail;
    8173                 :       }
    8174                 :       
    8175             370 :       int size = PySequence_Size(obj4);
    8176             723 :       for (int i = 0; i < size; i++) {
    8177             353 :         PyObject* pyObj = PySequence_GetItem(obj4,i);
    8178             353 :         if (PyUnicode_Check(pyObj))
    8179                 :         {
    8180                 :           char *pszStr;
    8181                 :           Py_ssize_t nLen;
    8182               1 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    8183                 : #if PY_VERSION_HEX >= 0x03000000
    8184                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8185                 : #else
    8186               1 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8187                 : #endif
    8188               1 :           arg5 = CSLAddString( arg5, pszStr );
    8189               1 :           Py_XDECREF(pyUTF8Str);
    8190                 :         }
    8191                 : #if PY_VERSION_HEX >= 0x03000000
    8192                 :         else if (PyBytes_Check(pyObj))
    8193                 :         arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
    8194                 : #else
    8195             352 :         else if (PyString_Check(pyObj))
    8196             352 :         arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
    8197                 : #endif
    8198                 :         else
    8199                 :         {
    8200               0 :           Py_DECREF(pyObj);
    8201               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    8202               0 :           SWIG_fail;
    8203                 :         }
    8204             353 :         Py_DECREF(pyObj);
    8205                 :       }
    8206                 :     }
    8207                 :   }
    8208            2069 :   if (obj5) {
    8209                 :     {
    8210                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
    8211                 :       /* callback_func typemap */
    8212             366 :       if (obj5 && obj5 != Py_None ) {
    8213             366 :         void* cbfunction = NULL;
    8214                 :         SWIG_ConvertPtr( obj5, 
    8215                 :           (void**)&cbfunction,
    8216                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
    8217             366 :           SWIG_POINTER_EXCEPTION | 0 );
    8218                 :         
    8219             366 :         if ( cbfunction == GDALTermProgress ) {
    8220               0 :           arg6 = GDALTermProgress;
    8221                 :         } else {
    8222             366 :           if (!PyCallable_Check(obj5)) {
    8223                 :             PyErr_SetString( PyExc_RuntimeError, 
    8224               0 :               "Object given is not a Python function" );
    8225               0 :             SWIG_fail;
    8226                 :           }
    8227             366 :           psProgressInfo->psPyCallback = obj5;
    8228             366 :           arg6 = PyProgressProxy;
    8229                 :         }
    8230                 :         
    8231                 :       }
    8232                 :       
    8233                 :     }
    8234                 :   }
    8235            2069 :   if (obj6) {
    8236                 :     {
    8237                 :       /* %typemap(in) ( void* callback_data=NULL)  */
    8238               0 :       psProgressInfo->psPyCallbackData = obj6 ;
    8239                 :     }
    8240                 :   }
    8241                 :   {
    8242            2069 :     if (!arg3) {
    8243               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8244                 :     }
    8245                 :   }
    8246                 :   {
    8247            2069 :     if ( bUseExceptions ) {
    8248               0 :       CPLErrorReset();
    8249                 :     }
    8250            2069 :     result = (GDALDatasetShadow *)GDALDriverShadow_CreateCopy(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
    8251            2069 :     if ( bUseExceptions ) {
    8252               0 :       CPLErr eclass = CPLGetLastErrorType();
    8253               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8254               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8255                 :       }
    8256                 :     }
    8257                 :   }
    8258            2069 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
    8259                 :   {
    8260                 :     /* %typemap(freearg) (const char *utf8_path) */
    8261            2069 :     GDALPythonFreeCStr(arg2, bToFree2);
    8262                 :   }
    8263                 :   {
    8264                 :     /* %typemap(freearg) char **options */
    8265            2069 :     CSLDestroy( arg5 );
    8266                 :   }
    8267                 :   {
    8268                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8269                 :     
    8270            2069 :     CPLFree(psProgressInfo);
    8271                 :     
    8272                 :   }
    8273            2069 :   return resultobj;
    8274                 : fail:
    8275                 :   {
    8276                 :     /* %typemap(freearg) (const char *utf8_path) */
    8277               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    8278                 :   }
    8279                 :   {
    8280                 :     /* %typemap(freearg) char **options */
    8281               0 :     CSLDestroy( arg5 );
    8282                 :   }
    8283                 :   {
    8284                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8285                 :     
    8286               0 :     CPLFree(psProgressInfo);
    8287                 :     
    8288                 :   }
    8289               0 :   return NULL;
    8290                 : }
    8291                 : 
    8292                 : 
    8293            1323 : SWIGINTERN PyObject *_wrap_Driver_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8294            1323 :   PyObject *resultobj = 0;
    8295            1323 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8296            1323 :   char *arg2 = (char *) 0 ;
    8297            1323 :   void *argp1 = 0 ;
    8298            1323 :   int res1 = 0 ;
    8299            1323 :   int bToFree2 = 0 ;
    8300            1323 :   PyObject * obj0 = 0 ;
    8301            1323 :   PyObject * obj1 = 0 ;
    8302                 :   int result;
    8303                 :   
    8304            1323 :   if (!PyArg_ParseTuple(args,(char *)"OO:Driver_Delete",&obj0,&obj1)) SWIG_fail;
    8305            1323 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8306            1323 :   if (!SWIG_IsOK(res1)) {
    8307               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Delete" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8308                 :   }
    8309            1323 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8310                 :   {
    8311                 :     /* %typemap(in) (const char *utf8_path) */
    8312            1323 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    8313            1323 :     if (arg2 == NULL)
    8314                 :     {
    8315               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    8316               0 :       SWIG_fail;
    8317                 :     }
    8318                 :   }
    8319                 :   {
    8320            1323 :     if ( bUseExceptions ) {
    8321               0 :       CPLErrorReset();
    8322                 :     }
    8323            1323 :     result = (int)GDALDriverShadow_Delete(arg1,(char const *)arg2);
    8324            1323 :     if ( bUseExceptions ) {
    8325               0 :       CPLErr eclass = CPLGetLastErrorType();
    8326               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8327               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8328                 :       }
    8329                 :     }
    8330                 :   }
    8331            1323 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8332                 :   {
    8333                 :     /* %typemap(freearg) (const char *utf8_path) */
    8334            1323 :     GDALPythonFreeCStr(arg2, bToFree2);
    8335                 :   }
    8336            1323 :   return resultobj;
    8337                 : fail:
    8338                 :   {
    8339                 :     /* %typemap(freearg) (const char *utf8_path) */
    8340               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    8341                 :   }
    8342               0 :   return NULL;
    8343                 : }
    8344                 : 
    8345                 : 
    8346               1 : SWIGINTERN PyObject *_wrap_Driver_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8347               1 :   PyObject *resultobj = 0;
    8348               1 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8349               1 :   char *arg2 = (char *) 0 ;
    8350               1 :   char *arg3 = (char *) 0 ;
    8351               1 :   void *argp1 = 0 ;
    8352               1 :   int res1 = 0 ;
    8353                 :   int res2 ;
    8354               1 :   char *buf2 = 0 ;
    8355               1 :   int alloc2 = 0 ;
    8356                 :   int res3 ;
    8357               1 :   char *buf3 = 0 ;
    8358               1 :   int alloc3 = 0 ;
    8359               1 :   PyObject * obj0 = 0 ;
    8360               1 :   PyObject * obj1 = 0 ;
    8361               1 :   PyObject * obj2 = 0 ;
    8362                 :   int result;
    8363                 :   
    8364               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Driver_Rename",&obj0,&obj1,&obj2)) SWIG_fail;
    8365               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8366               1 :   if (!SWIG_IsOK(res1)) {
    8367               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Rename" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8368                 :   }
    8369               1 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8370               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    8371               1 :   if (!SWIG_IsOK(res2)) {
    8372               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_Rename" "', argument " "2"" of type '" "char const *""'");
    8373                 :   }
    8374               1 :   arg2 = reinterpret_cast< char * >(buf2);
    8375               1 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    8376               1 :   if (!SWIG_IsOK(res3)) {
    8377               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_Rename" "', argument " "3"" of type '" "char const *""'");
    8378                 :   }
    8379               1 :   arg3 = reinterpret_cast< char * >(buf3);
    8380                 :   {
    8381               1 :     if (!arg2) {
    8382               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8383                 :     }
    8384                 :   }
    8385                 :   {
    8386               1 :     if (!arg3) {
    8387               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8388                 :     }
    8389                 :   }
    8390                 :   {
    8391               1 :     if ( bUseExceptions ) {
    8392               0 :       CPLErrorReset();
    8393                 :     }
    8394               1 :     result = (int)GDALDriverShadow_Rename(arg1,(char const *)arg2,(char const *)arg3);
    8395               1 :     if ( bUseExceptions ) {
    8396               0 :       CPLErr eclass = CPLGetLastErrorType();
    8397               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8398               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8399                 :       }
    8400                 :     }
    8401                 :   }
    8402               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8403               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8404               1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8405               1 :   return resultobj;
    8406                 : fail:
    8407               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8408               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8409               0 :   return NULL;
    8410                 : }
    8411                 : 
    8412                 : 
    8413               1 : SWIGINTERN PyObject *_wrap_Driver_CopyFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8414               1 :   PyObject *resultobj = 0;
    8415               1 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8416               1 :   char *arg2 = (char *) 0 ;
    8417               1 :   char *arg3 = (char *) 0 ;
    8418               1 :   void *argp1 = 0 ;
    8419               1 :   int res1 = 0 ;
    8420                 :   int res2 ;
    8421               1 :   char *buf2 = 0 ;
    8422               1 :   int alloc2 = 0 ;
    8423                 :   int res3 ;
    8424               1 :   char *buf3 = 0 ;
    8425               1 :   int alloc3 = 0 ;
    8426               1 :   PyObject * obj0 = 0 ;
    8427               1 :   PyObject * obj1 = 0 ;
    8428               1 :   PyObject * obj2 = 0 ;
    8429                 :   int result;
    8430                 :   
    8431               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Driver_CopyFiles",&obj0,&obj1,&obj2)) SWIG_fail;
    8432               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8433               1 :   if (!SWIG_IsOK(res1)) {
    8434               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyFiles" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8435                 :   }
    8436               1 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8437               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    8438               1 :   if (!SWIG_IsOK(res2)) {
    8439               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_CopyFiles" "', argument " "2"" of type '" "char const *""'");
    8440                 :   }
    8441               1 :   arg2 = reinterpret_cast< char * >(buf2);
    8442               1 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    8443               1 :   if (!SWIG_IsOK(res3)) {
    8444               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CopyFiles" "', argument " "3"" of type '" "char const *""'");
    8445                 :   }
    8446               1 :   arg3 = reinterpret_cast< char * >(buf3);
    8447                 :   {
    8448               1 :     if (!arg2) {
    8449               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8450                 :     }
    8451                 :   }
    8452                 :   {
    8453               1 :     if (!arg3) {
    8454               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8455                 :     }
    8456                 :   }
    8457                 :   {
    8458               1 :     if ( bUseExceptions ) {
    8459               0 :       CPLErrorReset();
    8460                 :     }
    8461               1 :     result = (int)GDALDriverShadow_CopyFiles(arg1,(char const *)arg2,(char const *)arg3);
    8462               1 :     if ( bUseExceptions ) {
    8463               0 :       CPLErr eclass = CPLGetLastErrorType();
    8464               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8465               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8466                 :       }
    8467                 :     }
    8468                 :   }
    8469               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8470               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8471               1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8472               1 :   return resultobj;
    8473                 : fail:
    8474               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8475               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8476               0 :   return NULL;
    8477                 : }
    8478                 : 
    8479                 : 
    8480              75 : SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8481              75 :   PyObject *resultobj = 0;
    8482              75 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8483              75 :   void *argp1 = 0 ;
    8484              75 :   int res1 = 0 ;
    8485              75 :   PyObject * obj0 = 0 ;
    8486                 :   int result;
    8487                 :   
    8488              75 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_Register",&obj0)) SWIG_fail;
    8489              75 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8490              75 :   if (!SWIG_IsOK(res1)) {
    8491               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8492                 :   }
    8493              75 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8494                 :   {
    8495              75 :     if ( bUseExceptions ) {
    8496               0 :       CPLErrorReset();
    8497                 :     }
    8498              75 :     result = (int)GDALDriverShadow_Register(arg1);
    8499              75 :     if ( bUseExceptions ) {
    8500               0 :       CPLErr eclass = CPLGetLastErrorType();
    8501               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8502               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8503                 :       }
    8504                 :     }
    8505                 :   }
    8506              75 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8507              75 :   return resultobj;
    8508                 : fail:
    8509               0 :   return NULL;
    8510                 : }
    8511                 : 
    8512                 : 
    8513              72 : SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8514              72 :   PyObject *resultobj = 0;
    8515              72 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8516              72 :   void *argp1 = 0 ;
    8517              72 :   int res1 = 0 ;
    8518              72 :   PyObject * obj0 = 0 ;
    8519                 :   
    8520              72 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_Deregister",&obj0)) SWIG_fail;
    8521              72 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8522              72 :   if (!SWIG_IsOK(res1)) {
    8523               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8524                 :   }
    8525              72 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8526                 :   {
    8527              72 :     if ( bUseExceptions ) {
    8528               0 :       CPLErrorReset();
    8529                 :     }
    8530                 :     GDALDriverShadow_Deregister(arg1);
    8531              72 :     if ( bUseExceptions ) {
    8532               0 :       CPLErr eclass = CPLGetLastErrorType();
    8533               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8534               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8535                 :       }
    8536                 :     }
    8537                 :   }
    8538              72 :   resultobj = SWIG_Py_Void();
    8539              72 :   return resultobj;
    8540                 : fail:
    8541               0 :   return NULL;
    8542                 : }
    8543                 : 
    8544                 : 
    8545              12 : SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8546                 :   PyObject *obj;
    8547              12 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    8548              12 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDriverShadow, SWIG_NewClientData(obj));
    8549              12 :   return SWIG_Py_Void();
    8550                 : }
    8551                 : 
    8552               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8553               0 :   PyObject *resultobj = 0;
    8554               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8555                 :   short arg2 ;
    8556                 :   GDALColorEntry ce1 ;
    8557                 :   short val2 ;
    8558               0 :   int ecode2 = 0 ;
    8559               0 :   PyObject * obj0 = 0 ;
    8560               0 :   PyObject * obj1 = 0 ;
    8561                 :   
    8562               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c1_set",&obj0,&obj1)) SWIG_fail;
    8563                 :   {
    8564                 :     /* %typemap(in) GDALColorEntry* */
    8565               0 :     ce1.c4 = 255;
    8566               0 :     if (! PySequence_Check(obj0) ) {
    8567               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8568               0 :       SWIG_fail;
    8569                 :     }
    8570               0 :     int size = PySequence_Size(obj0);
    8571               0 :     if ( size > 4 ) {
    8572               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8573               0 :       SWIG_fail;
    8574                 :     }
    8575               0 :     if ( size < 3 ) {
    8576               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8577               0 :       SWIG_fail;
    8578                 :     }
    8579               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8580               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8581               0 :       SWIG_fail;
    8582                 :     }
    8583               0 :     arg1 = &ce1;
    8584                 :   }
    8585               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8586               0 :   if (!SWIG_IsOK(ecode2)) {
    8587               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c1_set" "', argument " "2"" of type '" "short""'");
    8588                 :   } 
    8589               0 :   arg2 = static_cast< short >(val2);
    8590               0 :   if (arg1) (arg1)->c1 = arg2;
    8591               0 :   resultobj = SWIG_Py_Void();
    8592               0 :   return resultobj;
    8593                 : fail:
    8594               0 :   return NULL;
    8595                 : }
    8596                 : 
    8597                 : 
    8598               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8599               0 :   PyObject *resultobj = 0;
    8600               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8601                 :   GDALColorEntry ce1 ;
    8602               0 :   PyObject * obj0 = 0 ;
    8603                 :   short result;
    8604                 :   
    8605               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c1_get",&obj0)) SWIG_fail;
    8606                 :   {
    8607                 :     /* %typemap(in) GDALColorEntry* */
    8608               0 :     ce1.c4 = 255;
    8609               0 :     if (! PySequence_Check(obj0) ) {
    8610               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8611               0 :       SWIG_fail;
    8612                 :     }
    8613               0 :     int size = PySequence_Size(obj0);
    8614               0 :     if ( size > 4 ) {
    8615               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8616               0 :       SWIG_fail;
    8617                 :     }
    8618               0 :     if ( size < 3 ) {
    8619               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8620               0 :       SWIG_fail;
    8621                 :     }
    8622               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8623               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8624               0 :       SWIG_fail;
    8625                 :     }
    8626               0 :     arg1 = &ce1;
    8627                 :   }
    8628               0 :   result = (short) ((arg1)->c1);
    8629               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8630               0 :   return resultobj;
    8631                 : fail:
    8632               0 :   return NULL;
    8633                 : }
    8634                 : 
    8635                 : 
    8636               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8637               0 :   PyObject *resultobj = 0;
    8638               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8639                 :   short arg2 ;
    8640                 :   GDALColorEntry ce1 ;
    8641                 :   short val2 ;
    8642               0 :   int ecode2 = 0 ;
    8643               0 :   PyObject * obj0 = 0 ;
    8644               0 :   PyObject * obj1 = 0 ;
    8645                 :   
    8646               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c2_set",&obj0,&obj1)) SWIG_fail;
    8647                 :   {
    8648                 :     /* %typemap(in) GDALColorEntry* */
    8649               0 :     ce1.c4 = 255;
    8650               0 :     if (! PySequence_Check(obj0) ) {
    8651               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8652               0 :       SWIG_fail;
    8653                 :     }
    8654               0 :     int size = PySequence_Size(obj0);
    8655               0 :     if ( size > 4 ) {
    8656               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8657               0 :       SWIG_fail;
    8658                 :     }
    8659               0 :     if ( size < 3 ) {
    8660               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8661               0 :       SWIG_fail;
    8662                 :     }
    8663               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8664               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8665               0 :       SWIG_fail;
    8666                 :     }
    8667               0 :     arg1 = &ce1;
    8668                 :   }
    8669               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8670               0 :   if (!SWIG_IsOK(ecode2)) {
    8671               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c2_set" "', argument " "2"" of type '" "short""'");
    8672                 :   } 
    8673               0 :   arg2 = static_cast< short >(val2);
    8674               0 :   if (arg1) (arg1)->c2 = arg2;
    8675               0 :   resultobj = SWIG_Py_Void();
    8676               0 :   return resultobj;
    8677                 : fail:
    8678               0 :   return NULL;
    8679                 : }
    8680                 : 
    8681                 : 
    8682               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8683               0 :   PyObject *resultobj = 0;
    8684               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8685                 :   GDALColorEntry ce1 ;
    8686               0 :   PyObject * obj0 = 0 ;
    8687                 :   short result;
    8688                 :   
    8689               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c2_get",&obj0)) SWIG_fail;
    8690                 :   {
    8691                 :     /* %typemap(in) GDALColorEntry* */
    8692               0 :     ce1.c4 = 255;
    8693               0 :     if (! PySequence_Check(obj0) ) {
    8694               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8695               0 :       SWIG_fail;
    8696                 :     }
    8697               0 :     int size = PySequence_Size(obj0);
    8698               0 :     if ( size > 4 ) {
    8699               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8700               0 :       SWIG_fail;
    8701                 :     }
    8702               0 :     if ( size < 3 ) {
    8703               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8704               0 :       SWIG_fail;
    8705                 :     }
    8706               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8707               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8708               0 :       SWIG_fail;
    8709                 :     }
    8710               0 :     arg1 = &ce1;
    8711                 :   }
    8712               0 :   result = (short) ((arg1)->c2);
    8713               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8714               0 :   return resultobj;
    8715                 : fail:
    8716               0 :   return NULL;
    8717                 : }
    8718                 : 
    8719                 : 
    8720               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8721               0 :   PyObject *resultobj = 0;
    8722               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8723                 :   short arg2 ;
    8724                 :   GDALColorEntry ce1 ;
    8725                 :   short val2 ;
    8726               0 :   int ecode2 = 0 ;
    8727               0 :   PyObject * obj0 = 0 ;
    8728               0 :   PyObject * obj1 = 0 ;
    8729                 :   
    8730               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c3_set",&obj0,&obj1)) SWIG_fail;
    8731                 :   {
    8732                 :     /* %typemap(in) GDALColorEntry* */
    8733               0 :     ce1.c4 = 255;
    8734               0 :     if (! PySequence_Check(obj0) ) {
    8735               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8736               0 :       SWIG_fail;
    8737                 :     }
    8738               0 :     int size = PySequence_Size(obj0);
    8739               0 :     if ( size > 4 ) {
    8740               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8741               0 :       SWIG_fail;
    8742                 :     }
    8743               0 :     if ( size < 3 ) {
    8744               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8745               0 :       SWIG_fail;
    8746                 :     }
    8747               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8748               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8749               0 :       SWIG_fail;
    8750                 :     }
    8751               0 :     arg1 = &ce1;
    8752                 :   }
    8753               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8754               0 :   if (!SWIG_IsOK(ecode2)) {
    8755               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c3_set" "', argument " "2"" of type '" "short""'");
    8756                 :   } 
    8757               0 :   arg2 = static_cast< short >(val2);
    8758               0 :   if (arg1) (arg1)->c3 = arg2;
    8759               0 :   resultobj = SWIG_Py_Void();
    8760               0 :   return resultobj;
    8761                 : fail:
    8762               0 :   return NULL;
    8763                 : }
    8764                 : 
    8765                 : 
    8766               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8767               0 :   PyObject *resultobj = 0;
    8768               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8769                 :   GDALColorEntry ce1 ;
    8770               0 :   PyObject * obj0 = 0 ;
    8771                 :   short result;
    8772                 :   
    8773               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c3_get",&obj0)) SWIG_fail;
    8774                 :   {
    8775                 :     /* %typemap(in) GDALColorEntry* */
    8776               0 :     ce1.c4 = 255;
    8777               0 :     if (! PySequence_Check(obj0) ) {
    8778               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8779               0 :       SWIG_fail;
    8780                 :     }
    8781               0 :     int size = PySequence_Size(obj0);
    8782               0 :     if ( size > 4 ) {
    8783               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8784               0 :       SWIG_fail;
    8785                 :     }
    8786               0 :     if ( size < 3 ) {
    8787               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8788               0 :       SWIG_fail;
    8789                 :     }
    8790               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8791               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8792               0 :       SWIG_fail;
    8793                 :     }
    8794               0 :     arg1 = &ce1;
    8795                 :   }
    8796               0 :   result = (short) ((arg1)->c3);
    8797               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8798               0 :   return resultobj;
    8799                 : fail:
    8800               0 :   return NULL;
    8801                 : }
    8802                 : 
    8803                 : 
    8804               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8805               0 :   PyObject *resultobj = 0;
    8806               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8807                 :   short arg2 ;
    8808                 :   GDALColorEntry ce1 ;
    8809                 :   short val2 ;
    8810               0 :   int ecode2 = 0 ;
    8811               0 :   PyObject * obj0 = 0 ;
    8812               0 :   PyObject * obj1 = 0 ;
    8813                 :   
    8814               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c4_set",&obj0,&obj1)) SWIG_fail;
    8815                 :   {
    8816                 :     /* %typemap(in) GDALColorEntry* */
    8817               0 :     ce1.c4 = 255;
    8818               0 :     if (! PySequence_Check(obj0) ) {
    8819               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8820               0 :       SWIG_fail;
    8821                 :     }
    8822               0 :     int size = PySequence_Size(obj0);
    8823               0 :     if ( size > 4 ) {
    8824               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8825               0 :       SWIG_fail;
    8826                 :     }
    8827               0 :     if ( size < 3 ) {
    8828               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8829               0 :       SWIG_fail;
    8830                 :     }
    8831               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8832               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8833               0 :       SWIG_fail;
    8834                 :     }
    8835               0 :     arg1 = &ce1;
    8836                 :   }
    8837               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8838               0 :   if (!SWIG_IsOK(ecode2)) {
    8839               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c4_set" "', argument " "2"" of type '" "short""'");
    8840                 :   } 
    8841               0 :   arg2 = static_cast< short >(val2);
    8842               0 :   if (arg1) (arg1)->c4 = arg2;
    8843               0 :   resultobj = SWIG_Py_Void();
    8844               0 :   return resultobj;
    8845                 : fail:
    8846               0 :   return NULL;
    8847                 : }
    8848                 : 
    8849                 : 
    8850               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8851               0 :   PyObject *resultobj = 0;
    8852               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8853                 :   GDALColorEntry ce1 ;
    8854               0 :   PyObject * obj0 = 0 ;
    8855                 :   short result;
    8856                 :   
    8857               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c4_get",&obj0)) SWIG_fail;
    8858                 :   {
    8859                 :     /* %typemap(in) GDALColorEntry* */
    8860               0 :     ce1.c4 = 255;
    8861               0 :     if (! PySequence_Check(obj0) ) {
    8862               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8863               0 :       SWIG_fail;
    8864                 :     }
    8865               0 :     int size = PySequence_Size(obj0);
    8866               0 :     if ( size > 4 ) {
    8867               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8868               0 :       SWIG_fail;
    8869                 :     }
    8870               0 :     if ( size < 3 ) {
    8871               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8872               0 :       SWIG_fail;
    8873                 :     }
    8874               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8875               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8876               0 :       SWIG_fail;
    8877                 :     }
    8878               0 :     arg1 = &ce1;
    8879                 :   }
    8880               0 :   result = (short) ((arg1)->c4);
    8881               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8882               0 :   return resultobj;
    8883                 : fail:
    8884               0 :   return NULL;
    8885                 : }
    8886                 : 
    8887                 : 
    8888               0 : SWIGINTERN PyObject *_wrap_new_ColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8889               0 :   PyObject *resultobj = 0;
    8890               0 :   GDALColorEntry *result = 0 ;
    8891                 :   
    8892               0 :   if (!PyArg_ParseTuple(args,(char *)":new_ColorEntry")) SWIG_fail;
    8893                 :   {
    8894               0 :     if ( bUseExceptions ) {
    8895               0 :       CPLErrorReset();
    8896                 :     }
    8897               0 :     result = (GDALColorEntry *)new GDALColorEntry();
    8898               0 :     if ( bUseExceptions ) {
    8899               0 :       CPLErr eclass = CPLGetLastErrorType();
    8900               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8901               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8902                 :       }
    8903                 :     }
    8904                 :   }
    8905                 :   {
    8906                 :     /* %typemap(out) GDALColorEntry* */
    8907               0 :     if ( result != NULL )
    8908               0 :     resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
    8909                 :     else
    8910               0 :     resultobj = NULL;
    8911                 :   }
    8912               0 :   return resultobj;
    8913                 : fail:
    8914               0 :   return NULL;
    8915                 : }
    8916                 : 
    8917                 : 
    8918               0 : SWIGINTERN PyObject *_wrap_delete_ColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8919               0 :   PyObject *resultobj = 0;
    8920               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8921                 :   GDALColorEntry ce1 ;
    8922               0 :   PyObject * obj0 = 0 ;
    8923                 :   
    8924               0 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_ColorEntry",&obj0)) SWIG_fail;
    8925                 :   {
    8926                 :     /* %typemap(in) GDALColorEntry* */
    8927               0 :     ce1.c4 = 255;
    8928               0 :     if (! PySequence_Check(obj0) ) {
    8929               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8930               0 :       SWIG_fail;
    8931                 :     }
    8932               0 :     int size = PySequence_Size(obj0);
    8933               0 :     if ( size > 4 ) {
    8934               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8935               0 :       SWIG_fail;
    8936                 :     }
    8937               0 :     if ( size < 3 ) {
    8938               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8939               0 :       SWIG_fail;
    8940                 :     }
    8941               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8942               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8943               0 :       SWIG_fail;
    8944                 :     }
    8945               0 :     arg1 = &ce1;
    8946                 :   }
    8947                 :   {
    8948               0 :     if ( bUseExceptions ) {
    8949               0 :       CPLErrorReset();
    8950                 :     }
    8951               0 :     delete arg1;
    8952               0 :     if ( bUseExceptions ) {
    8953               0 :       CPLErr eclass = CPLGetLastErrorType();
    8954               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8955               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8956                 :       }
    8957                 :     }
    8958                 :   }
    8959               0 :   resultobj = SWIG_Py_Void();
    8960               0 :   return resultobj;
    8961                 : fail:
    8962               0 :   return NULL;
    8963                 : }
    8964                 : 
    8965                 : 
    8966              12 : SWIGINTERN PyObject *ColorEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8967                 :   PyObject *obj;
    8968              12 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    8969              12 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorEntry, SWIG_NewClientData(obj));
    8970              12 :   return SWIG_Py_Void();
    8971                 : }
    8972                 : 
    8973               8 : SWIGINTERN PyObject *_wrap_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8974               8 :   PyObject *resultobj = 0;
    8975               8 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8976                 :   double arg2 ;
    8977               8 :   void *argp1 = 0 ;
    8978               8 :   int res1 = 0 ;
    8979                 :   double val2 ;
    8980               8 :   int ecode2 = 0 ;
    8981               8 :   PyObject * obj0 = 0 ;
    8982               8 :   PyObject * obj1 = 0 ;
    8983                 :   
    8984               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPX_set",&obj0,&obj1)) SWIG_fail;
    8985               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8986               8 :   if (!SWIG_IsOK(res1)) {
    8987               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8988                 :   }
    8989               8 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8990               8 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    8991               8 :   if (!SWIG_IsOK(ecode2)) {
    8992               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
    8993                 :   } 
    8994               8 :   arg2 = static_cast< double >(val2);
    8995                 :   {
    8996               8 :     if ( bUseExceptions ) {
    8997               0 :       CPLErrorReset();
    8998                 :     }
    8999               8 :     GDAL_GCP_GCPX_set(arg1,arg2);
    9000               8 :     if ( bUseExceptions ) {
    9001               0 :       CPLErr eclass = CPLGetLastErrorType();
    9002               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9003               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9004                 :       }
    9005                 :     }
    9006                 :   }
    9007               8 :   resultobj = SWIG_Py_Void();
    9008               8 :   return resultobj;
    9009                 : fail:
    9010               0 :   return NULL;
    9011                 : }
    9012                 : 
    9013                 : 
    9014            2774 : SWIGINTERN PyObject *_wrap_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9015            2774 :   PyObject *resultobj = 0;
    9016            2774 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9017            2774 :   void *argp1 = 0 ;
    9018            2774 :   int res1 = 0 ;
    9019            2774 :   PyObject * obj0 = 0 ;
    9020                 :   double result;
    9021                 :   
    9022            2774 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPX_get",&obj0)) SWIG_fail;
    9023            2774 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9024            2774 :   if (!SWIG_IsOK(res1)) {
    9025               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9026                 :   }
    9027            2774 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9028                 :   {
    9029            2774 :     if ( bUseExceptions ) {
    9030               0 :       CPLErrorReset();
    9031                 :     }
    9032            2774 :     result = (double)GDAL_GCP_GCPX_get(arg1);
    9033            2774 :     if ( bUseExceptions ) {
    9034               0 :       CPLErr eclass = CPLGetLastErrorType();
    9035               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9036               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9037                 :       }
    9038                 :     }
    9039                 :   }
    9040            2774 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9041            2774 :   return resultobj;
    9042                 : fail:
    9043               0 :   return NULL;
    9044                 : }
    9045                 : 
    9046                 : 
    9047               8 : SWIGINTERN PyObject *_wrap_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9048               8 :   PyObject *resultobj = 0;
    9049               8 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9050                 :   double arg2 ;
    9051               8 :   void *argp1 = 0 ;
    9052               8 :   int res1 = 0 ;
    9053                 :   double val2 ;
    9054               8 :   int ecode2 = 0 ;
    9055               8 :   PyObject * obj0 = 0 ;
    9056               8 :   PyObject * obj1 = 0 ;
    9057                 :   
    9058               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPY_set",&obj0,&obj1)) SWIG_fail;
    9059               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9060               8 :   if (!SWIG_IsOK(res1)) {
    9061               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9062                 :   }
    9063               8 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9064               8 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9065               8 :   if (!SWIG_IsOK(ecode2)) {
    9066               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
    9067                 :   } 
    9068               8 :   arg2 = static_cast< double >(val2);
    9069                 :   {
    9070               8 :     if ( bUseExceptions ) {
    9071               0 :       CPLErrorReset();
    9072                 :     }
    9073               8 :     GDAL_GCP_GCPY_set(arg1,arg2);
    9074               8 :     if ( bUseExceptions ) {
    9075               0 :       CPLErr eclass = CPLGetLastErrorType();
    9076               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9077               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9078                 :       }
    9079                 :     }
    9080                 :   }
    9081               8 :   resultobj = SWIG_Py_Void();
    9082               8 :   return resultobj;
    9083                 : fail:
    9084               0 :   return NULL;
    9085                 : }
    9086                 : 
    9087                 : 
    9088            2774 : SWIGINTERN PyObject *_wrap_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9089            2774 :   PyObject *resultobj = 0;
    9090            2774 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9091            2774 :   void *argp1 = 0 ;
    9092            2774 :   int res1 = 0 ;
    9093            2774 :   PyObject * obj0 = 0 ;
    9094                 :   double result;
    9095                 :   
    9096            2774 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPY_get",&obj0)) SWIG_fail;
    9097            2774 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9098            2774 :   if (!SWIG_IsOK(res1)) {
    9099               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9100                 :   }
    9101            2774 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9102                 :   {
    9103            2774 :     if ( bUseExceptions ) {
    9104               0 :       CPLErrorReset();
    9105                 :     }
    9106            2774 :     result = (double)GDAL_GCP_GCPY_get(arg1);
    9107            2774 :     if ( bUseExceptions ) {
    9108               0 :       CPLErr eclass = CPLGetLastErrorType();
    9109               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9110               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9111                 :       }
    9112                 :     }
    9113                 :   }
    9114            2774 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9115            2774 :   return resultobj;
    9116                 : fail:
    9117               0 :   return NULL;
    9118                 : }
    9119                 : 
    9120                 : 
    9121               0 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9122               0 :   PyObject *resultobj = 0;
    9123               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9124                 :   double arg2 ;
    9125               0 :   void *argp1 = 0 ;
    9126               0 :   int res1 = 0 ;
    9127                 :   double val2 ;
    9128               0 :   int ecode2 = 0 ;
    9129               0 :   PyObject * obj0 = 0 ;
    9130               0 :   PyObject * obj1 = 0 ;
    9131                 :   
    9132               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPZ_set",&obj0,&obj1)) SWIG_fail;
    9133               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9134               0 :   if (!SWIG_IsOK(res1)) {
    9135               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9136                 :   }
    9137               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9138               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9139               0 :   if (!SWIG_IsOK(ecode2)) {
    9140               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
    9141                 :   } 
    9142               0 :   arg2 = static_cast< double >(val2);
    9143                 :   {
    9144               0 :     if ( bUseExceptions ) {
    9145               0 :       CPLErrorReset();
    9146                 :     }
    9147               0 :     GDAL_GCP_GCPZ_set(arg1,arg2);
    9148               0 :     if ( bUseExceptions ) {
    9149               0 :       CPLErr eclass = CPLGetLastErrorType();
    9150               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9151               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9152                 :       }
    9153                 :     }
    9154                 :   }
    9155               0 :   resultobj = SWIG_Py_Void();
    9156               0 :   return resultobj;
    9157                 : fail:
    9158               0 :   return NULL;
    9159                 : }
    9160                 : 
    9161                 : 
    9162            2748 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9163            2748 :   PyObject *resultobj = 0;
    9164            2748 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9165            2748 :   void *argp1 = 0 ;
    9166            2748 :   int res1 = 0 ;
    9167            2748 :   PyObject * obj0 = 0 ;
    9168                 :   double result;
    9169                 :   
    9170            2748 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPZ_get",&obj0)) SWIG_fail;
    9171            2748 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9172            2748 :   if (!SWIG_IsOK(res1)) {
    9173               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9174                 :   }
    9175            2748 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9176                 :   {
    9177            2748 :     if ( bUseExceptions ) {
    9178               0 :       CPLErrorReset();
    9179                 :     }
    9180            2748 :     result = (double)GDAL_GCP_GCPZ_get(arg1);
    9181            2748 :     if ( bUseExceptions ) {
    9182               0 :       CPLErr eclass = CPLGetLastErrorType();
    9183               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9184               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9185                 :       }
    9186                 :     }
    9187                 :   }
    9188            2748 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9189            2748 :   return resultobj;
    9190                 : fail:
    9191               0 :   return NULL;
    9192                 : }
    9193                 : 
    9194                 : 
    9195              16 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9196              16 :   PyObject *resultobj = 0;
    9197              16 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9198                 :   double arg2 ;
    9199              16 :   void *argp1 = 0 ;
    9200              16 :   int res1 = 0 ;
    9201                 :   double val2 ;
    9202              16 :   int ecode2 = 0 ;
    9203              16 :   PyObject * obj0 = 0 ;
    9204              16 :   PyObject * obj1 = 0 ;
    9205                 :   
    9206              16 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPPixel_set",&obj0,&obj1)) SWIG_fail;
    9207              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9208              16 :   if (!SWIG_IsOK(res1)) {
    9209               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9210                 :   }
    9211              16 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9212              16 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9213              16 :   if (!SWIG_IsOK(ecode2)) {
    9214               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
    9215                 :   } 
    9216              16 :   arg2 = static_cast< double >(val2);
    9217                 :   {
    9218              16 :     if ( bUseExceptions ) {
    9219               0 :       CPLErrorReset();
    9220                 :     }
    9221              16 :     GDAL_GCP_GCPPixel_set(arg1,arg2);
    9222              16 :     if ( bUseExceptions ) {
    9223               0 :       CPLErr eclass = CPLGetLastErrorType();
    9224               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9225               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9226                 :       }
    9227                 :     }
    9228                 :   }
    9229              16 :   resultobj = SWIG_Py_Void();
    9230              16 :   return resultobj;
    9231                 : fail:
    9232               0 :   return NULL;
    9233                 : }
    9234                 : 
    9235                 : 
    9236            2782 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9237            2782 :   PyObject *resultobj = 0;
    9238            2782 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9239            2782 :   void *argp1 = 0 ;
    9240            2782 :   int res1 = 0 ;
    9241            2782 :   PyObject * obj0 = 0 ;
    9242                 :   double result;
    9243                 :   
    9244            2782 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPPixel_get",&obj0)) SWIG_fail;
    9245            2782 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9246            2782 :   if (!SWIG_IsOK(res1)) {
    9247               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9248                 :   }
    9249            2782 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9250                 :   {
    9251            2782 :     if ( bUseExceptions ) {
    9252               0 :       CPLErrorReset();
    9253                 :     }
    9254            2782 :     result = (double)GDAL_GCP_GCPPixel_get(arg1);
    9255            2782 :     if ( bUseExceptions ) {
    9256               0 :       CPLErr eclass = CPLGetLastErrorType();
    9257               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9258               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9259                 :       }
    9260                 :     }
    9261                 :   }
    9262            2782 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9263            2782 :   return resultobj;
    9264                 : fail:
    9265               0 :   return NULL;
    9266                 : }
    9267                 : 
    9268                 : 
    9269              16 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9270              16 :   PyObject *resultobj = 0;
    9271              16 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9272                 :   double arg2 ;
    9273              16 :   void *argp1 = 0 ;
    9274              16 :   int res1 = 0 ;
    9275                 :   double val2 ;
    9276              16 :   int ecode2 = 0 ;
    9277              16 :   PyObject * obj0 = 0 ;
    9278              16 :   PyObject * obj1 = 0 ;
    9279                 :   
    9280              16 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPLine_set",&obj0,&obj1)) SWIG_fail;
    9281              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9282              16 :   if (!SWIG_IsOK(res1)) {
    9283               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9284                 :   }
    9285              16 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9286              16 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9287              16 :   if (!SWIG_IsOK(ecode2)) {
    9288               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
    9289                 :   } 
    9290              16 :   arg2 = static_cast< double >(val2);
    9291                 :   {
    9292              16 :     if ( bUseExceptions ) {
    9293               0 :       CPLErrorReset();
    9294                 :     }
    9295              16 :     GDAL_GCP_GCPLine_set(arg1,arg2);
    9296              16 :     if ( bUseExceptions ) {
    9297               0 :       CPLErr eclass = CPLGetLastErrorType();
    9298               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9299               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9300                 :       }
    9301                 :     }
    9302                 :   }
    9303              16 :   resultobj = SWIG_Py_Void();
    9304              16 :   return resultobj;
    9305                 : fail:
    9306               0 :   return NULL;
    9307                 : }
    9308                 : 
    9309                 : 
    9310            2782 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9311            2782 :   PyObject *resultobj = 0;
    9312            2782 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9313            2782 :   void *argp1 = 0 ;
    9314            2782 :   int res1 = 0 ;
    9315            2782 :   PyObject * obj0 = 0 ;
    9316                 :   double result;
    9317                 :   
    9318            2782 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPLine_get",&obj0)) SWIG_fail;
    9319            2782 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9320            2782 :   if (!SWIG_IsOK(res1)) {
    9321               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9322                 :   }
    9323            2782 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9324                 :   {
    9325            2782 :     if ( bUseExceptions ) {
    9326               0 :       CPLErrorReset();
    9327                 :     }
    9328            2782 :     result = (double)GDAL_GCP_GCPLine_get(arg1);
    9329            2782 :     if ( bUseExceptions ) {
    9330               0 :       CPLErr eclass = CPLGetLastErrorType();
    9331               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9332               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9333                 :       }
    9334                 :     }
    9335                 :   }
    9336            2782 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9337            2782 :   return resultobj;
    9338                 : fail:
    9339               0 :   return NULL;
    9340                 : }
    9341                 : 
    9342                 : 
    9343               0 : SWIGINTERN PyObject *_wrap_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9344               0 :   PyObject *resultobj = 0;
    9345               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9346               0 :   char *arg2 = (char *) 0 ;
    9347               0 :   void *argp1 = 0 ;
    9348               0 :   int res1 = 0 ;
    9349                 :   int res2 ;
    9350               0 :   char *buf2 = 0 ;
    9351               0 :   int alloc2 = 0 ;
    9352               0 :   PyObject * obj0 = 0 ;
    9353               0 :   PyObject * obj1 = 0 ;
    9354                 :   
    9355               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_Info_set",&obj0,&obj1)) SWIG_fail;
    9356               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9357               0 :   if (!SWIG_IsOK(res1)) {
    9358               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9359                 :   }
    9360               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9361               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9362               0 :   if (!SWIG_IsOK(res2)) {
    9363               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Info_set" "', argument " "2"" of type '" "char *""'");
    9364                 :   }
    9365               0 :   arg2 = reinterpret_cast< char * >(buf2);
    9366                 :   {
    9367               0 :     if ( bUseExceptions ) {
    9368               0 :       CPLErrorReset();
    9369                 :     }
    9370                 :     
    9371                 :     /* char* Info memberin typemap */
    9372               0 :     GDAL_GCP_Info_set(arg1,arg2);
    9373                 :     
    9374               0 :     if ( bUseExceptions ) {
    9375               0 :       CPLErr eclass = CPLGetLastErrorType();
    9376               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9377               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9378                 :       }
    9379                 :     }
    9380                 :   }
    9381               0 :   resultobj = SWIG_Py_Void();
    9382               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9383               0 :   return resultobj;
    9384                 : fail:
    9385               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9386               0 :   return NULL;
    9387                 : }
    9388                 : 
    9389                 : 
    9390               4 : SWIGINTERN PyObject *_wrap_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9391               4 :   PyObject *resultobj = 0;
    9392               4 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9393               4 :   void *argp1 = 0 ;
    9394               4 :   int res1 = 0 ;
    9395               4 :   PyObject * obj0 = 0 ;
    9396               4 :   char *result = 0 ;
    9397                 :   
    9398               4 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_Info_get",&obj0)) SWIG_fail;
    9399               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9400               4 :   if (!SWIG_IsOK(res1)) {
    9401               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9402                 :   }
    9403               4 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9404                 :   {
    9405               4 :     if ( bUseExceptions ) {
    9406               0 :       CPLErrorReset();
    9407                 :     }
    9408               4 :     result = (char *)GDAL_GCP_Info_get(arg1);
    9409               4 :     if ( bUseExceptions ) {
    9410               0 :       CPLErr eclass = CPLGetLastErrorType();
    9411               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9412               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9413                 :       }
    9414                 :     }
    9415                 :   }
    9416               4 :   resultobj = SWIG_FromCharPtr((const char *)result);
    9417               4 :   return resultobj;
    9418                 : fail:
    9419               0 :   return NULL;
    9420                 : }
    9421                 : 
    9422                 : 
    9423               0 : SWIGINTERN PyObject *_wrap_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9424               0 :   PyObject *resultobj = 0;
    9425               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9426               0 :   char *arg2 = (char *) 0 ;
    9427               0 :   void *argp1 = 0 ;
    9428               0 :   int res1 = 0 ;
    9429                 :   int res2 ;
    9430               0 :   char *buf2 = 0 ;
    9431               0 :   int alloc2 = 0 ;
    9432               0 :   PyObject * obj0 = 0 ;
    9433               0 :   PyObject * obj1 = 0 ;
    9434                 :   
    9435               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_Id_set",&obj0,&obj1)) SWIG_fail;
    9436               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9437               0 :   if (!SWIG_IsOK(res1)) {
    9438               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9439                 :   }
    9440               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9441               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9442               0 :   if (!SWIG_IsOK(res2)) {
    9443               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Id_set" "', argument " "2"" of type '" "char *""'");
    9444                 :   }
    9445               0 :   arg2 = reinterpret_cast< char * >(buf2);
    9446                 :   {
    9447               0 :     if ( bUseExceptions ) {
    9448               0 :       CPLErrorReset();
    9449                 :     }
    9450                 :     
    9451                 :     /* char* Info memberin typemap */
    9452               0 :     GDAL_GCP_Id_set(arg1,arg2);
    9453                 :     
    9454               0 :     if ( bUseExceptions ) {
    9455               0 :       CPLErr eclass = CPLGetLastErrorType();
    9456               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9457               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9458                 :       }
    9459                 :     }
    9460                 :   }
    9461               0 :   resultobj = SWIG_Py_Void();
    9462               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9463               0 :   return resultobj;
    9464                 : fail:
    9465               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9466               0 :   return NULL;
    9467                 : }
    9468                 : 
    9469                 : 
    9470               4 : SWIGINTERN PyObject *_wrap_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9471               4 :   PyObject *resultobj = 0;
    9472               4 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9473               4 :   void *argp1 = 0 ;
    9474               4 :   int res1 = 0 ;
    9475               4 :   PyObject * obj0 = 0 ;
    9476               4 :   char *result = 0 ;
    9477                 :   
    9478               4 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_Id_get",&obj0)) SWIG_fail;
    9479               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9480               4 :   if (!SWIG_IsOK(res1)) {
    9481               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9482                 :   }
    9483               4 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9484                 :   {
    9485               4 :     if ( bUseExceptions ) {
    9486               0 :       CPLErrorReset();
    9487                 :     }
    9488               4 :     result = (char *)GDAL_GCP_Id_get(arg1);
    9489               4 :     if ( bUseExceptions ) {
    9490               0 :       CPLErr eclass = CPLGetLastErrorType();
    9491               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9492               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9493                 :       }
    9494                 :     }
    9495                 :   }
    9496               4 :   resultobj = SWIG_FromCharPtr((const char *)result);
    9497               4 :   return resultobj;
    9498                 : fail:
    9499               0 :   return NULL;
    9500                 : }
    9501                 : 
    9502                 : 
    9503               9 : SWIGINTERN PyObject *_wrap_new_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9504               9 :   PyObject *resultobj = 0;
    9505               9 :   double arg1 = (double) 0.0 ;
    9506               9 :   double arg2 = (double) 0.0 ;
    9507               9 :   double arg3 = (double) 0.0 ;
    9508               9 :   double arg4 = (double) 0.0 ;
    9509               9 :   double arg5 = (double) 0.0 ;
    9510               9 :   char *arg6 = (char *) "" ;
    9511               9 :   char *arg7 = (char *) "" ;
    9512                 :   double val1 ;
    9513               9 :   int ecode1 = 0 ;
    9514                 :   double val2 ;
    9515               9 :   int ecode2 = 0 ;
    9516                 :   double val3 ;
    9517               9 :   int ecode3 = 0 ;
    9518                 :   double val4 ;
    9519               9 :   int ecode4 = 0 ;
    9520                 :   double val5 ;
    9521               9 :   int ecode5 = 0 ;
    9522                 :   int res6 ;
    9523               9 :   char *buf6 = 0 ;
    9524               9 :   int alloc6 = 0 ;
    9525                 :   int res7 ;
    9526               9 :   char *buf7 = 0 ;
    9527               9 :   int alloc7 = 0 ;
    9528               9 :   PyObject * obj0 = 0 ;
    9529               9 :   PyObject * obj1 = 0 ;
    9530               9 :   PyObject * obj2 = 0 ;
    9531               9 :   PyObject * obj3 = 0 ;
    9532               9 :   PyObject * obj4 = 0 ;
    9533               9 :   PyObject * obj5 = 0 ;
    9534               9 :   PyObject * obj6 = 0 ;
    9535               9 :   GDAL_GCP *result = 0 ;
    9536                 :   
    9537               9 :   if (!PyArg_ParseTuple(args,(char *)"|OOOOOOO:new_GCP",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
    9538               9 :   if (obj0) {
    9539               1 :     ecode1 = SWIG_AsVal_double(obj0, &val1);
    9540               1 :     if (!SWIG_IsOK(ecode1)) {
    9541               0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GCP" "', argument " "1"" of type '" "double""'");
    9542                 :     } 
    9543               1 :     arg1 = static_cast< double >(val1);
    9544                 :   }
    9545               9 :   if (obj1) {
    9546               1 :     ecode2 = SWIG_AsVal_double(obj1, &val2);
    9547               1 :     if (!SWIG_IsOK(ecode2)) {
    9548               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GCP" "', argument " "2"" of type '" "double""'");
    9549                 :     } 
    9550               1 :     arg2 = static_cast< double >(val2);
    9551                 :   }
    9552               9 :   if (obj2) {
    9553               1 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
    9554               1 :     if (!SWIG_IsOK(ecode3)) {
    9555               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GCP" "', argument " "3"" of type '" "double""'");
    9556                 :     } 
    9557               1 :     arg3 = static_cast< double >(val3);
    9558                 :   }
    9559               9 :   if (obj3) {
    9560               1 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
    9561               1 :     if (!SWIG_IsOK(ecode4)) {
    9562               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GCP" "', argument " "4"" of type '" "double""'");
    9563                 :     } 
    9564               1 :     arg4 = static_cast< double >(val4);
    9565                 :   }
    9566               9 :   if (obj4) {
    9567               1 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
    9568               1 :     if (!SWIG_IsOK(ecode5)) {
    9569               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GCP" "', argument " "5"" of type '" "double""'");
    9570                 :     } 
    9571               1 :     arg5 = static_cast< double >(val5);
    9572                 :   }
    9573               9 :   if (obj5) {
    9574               0 :     res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
    9575               0 :     if (!SWIG_IsOK(res6)) {
    9576               0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_GCP" "', argument " "6"" of type '" "char const *""'");
    9577                 :     }
    9578               0 :     arg6 = reinterpret_cast< char * >(buf6);
    9579                 :   }
    9580               9 :   if (obj6) {
    9581               0 :     res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
    9582               0 :     if (!SWIG_IsOK(res7)) {
    9583               0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_GCP" "', argument " "7"" of type '" "char const *""'");
    9584                 :     }
    9585               0 :     arg7 = reinterpret_cast< char * >(buf7);
    9586                 :   }
    9587                 :   {
    9588               9 :     if ( bUseExceptions ) {
    9589               0 :       CPLErrorReset();
    9590                 :     }
    9591               9 :     result = (GDAL_GCP *)new_GDAL_GCP(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7);
    9592               9 :     if ( bUseExceptions ) {
    9593               0 :       CPLErr eclass = CPLGetLastErrorType();
    9594               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9595               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9596                 :       }
    9597                 :     }
    9598                 :   }
    9599               9 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_NEW |  0 );
    9600               9 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
    9601               9 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
    9602               9 :   return resultobj;
    9603                 : fail:
    9604               0 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
    9605               0 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
    9606               0 :   return NULL;
    9607                 : }
    9608                 : 
    9609                 : 
    9610            5559 : SWIGINTERN PyObject *_wrap_delete_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9611            5559 :   PyObject *resultobj = 0;
    9612            5559 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9613            5559 :   void *argp1 = 0 ;
    9614            5559 :   int res1 = 0 ;
    9615            5559 :   PyObject * obj0 = 0 ;
    9616                 :   
    9617            5559 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_GCP",&obj0)) SWIG_fail;
    9618            5559 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_DISOWN |  0 );
    9619            5559 :   if (!SWIG_IsOK(res1)) {
    9620               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GCP" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9621                 :   }
    9622            5559 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9623                 :   {
    9624            5559 :     if ( bUseExceptions ) {
    9625               0 :       CPLErrorReset();
    9626                 :     }
    9627                 :     delete_GDAL_GCP(arg1);
    9628            5559 :     if ( bUseExceptions ) {
    9629               0 :       CPLErr eclass = CPLGetLastErrorType();
    9630               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9631               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9632                 :       }
    9633                 :     }
    9634                 :   }
    9635            5559 :   resultobj = SWIG_Py_Void();
    9636            5559 :   return resultobj;
    9637                 : fail:
    9638               0 :   return NULL;
    9639                 : }
    9640                 : 
    9641                 : 
    9642              12 : SWIGINTERN PyObject *GCP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9643                 :   PyObject *obj;
    9644              12 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    9645              12 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDAL_GCP, SWIG_NewClientData(obj));
    9646              12 :   return SWIG_Py_Void();
    9647                 : }
    9648                 : 
    9649               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9650               0 :   PyObject *resultobj = 0;
    9651               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9652               0 :   void *argp1 = 0 ;
    9653               0 :   int res1 = 0 ;
    9654               0 :   PyObject * obj0 = 0 ;
    9655                 :   double result;
    9656                 :   
    9657               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPX_get",&obj0)) SWIG_fail;
    9658               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9659               0 :   if (!SWIG_IsOK(res1)) {
    9660               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9661                 :   }
    9662               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9663                 :   {
    9664               0 :     if (!arg1) {
    9665               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9666                 :     }
    9667                 :   }
    9668                 :   {
    9669               0 :     if ( bUseExceptions ) {
    9670               0 :       CPLErrorReset();
    9671                 :     }
    9672               0 :     result = (double)GDAL_GCP_GCPX_get(arg1);
    9673               0 :     if ( bUseExceptions ) {
    9674               0 :       CPLErr eclass = CPLGetLastErrorType();
    9675               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9676               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9677                 :       }
    9678                 :     }
    9679                 :   }
    9680               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9681               0 :   return resultobj;
    9682                 : fail:
    9683               0 :   return NULL;
    9684                 : }
    9685                 : 
    9686                 : 
    9687               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9688               0 :   PyObject *resultobj = 0;
    9689               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9690                 :   double arg2 ;
    9691               0 :   void *argp1 = 0 ;
    9692               0 :   int res1 = 0 ;
    9693                 :   double val2 ;
    9694               0 :   int ecode2 = 0 ;
    9695               0 :   PyObject * obj0 = 0 ;
    9696               0 :   PyObject * obj1 = 0 ;
    9697                 :   
    9698               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPX_set",&obj0,&obj1)) SWIG_fail;
    9699               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9700               0 :   if (!SWIG_IsOK(res1)) {
    9701               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9702                 :   }
    9703               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9704               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9705               0 :   if (!SWIG_IsOK(ecode2)) {
    9706               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
    9707                 :   } 
    9708               0 :   arg2 = static_cast< double >(val2);
    9709                 :   {
    9710               0 :     if (!arg1) {
    9711               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9712                 :     }
    9713                 :   }
    9714                 :   {
    9715               0 :     if ( bUseExceptions ) {
    9716               0 :       CPLErrorReset();
    9717                 :     }
    9718               0 :     GDAL_GCP_GCPX_set(arg1,arg2);
    9719               0 :     if ( bUseExceptions ) {
    9720               0 :       CPLErr eclass = CPLGetLastErrorType();
    9721               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9722               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9723                 :       }
    9724                 :     }
    9725                 :   }
    9726               0 :   resultobj = SWIG_Py_Void();
    9727               0 :   return resultobj;
    9728                 : fail:
    9729               0 :   return NULL;
    9730                 : }
    9731                 : 
    9732                 : 
    9733               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9734               0 :   PyObject *resultobj = 0;
    9735               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9736               0 :   void *argp1 = 0 ;
    9737               0 :   int res1 = 0 ;
    9738               0 :   PyObject * obj0 = 0 ;
    9739                 :   double result;
    9740                 :   
    9741               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPY_get",&obj0)) SWIG_fail;
    9742               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9743               0 :   if (!SWIG_IsOK(res1)) {
    9744               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9745                 :   }
    9746               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9747                 :   {
    9748               0 :     if (!arg1) {
    9749               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9750                 :     }
    9751                 :   }
    9752                 :   {
    9753               0 :     if ( bUseExceptions ) {
    9754               0 :       CPLErrorReset();
    9755                 :     }
    9756               0 :     result = (double)GDAL_GCP_GCPY_get(arg1);
    9757               0 :     if ( bUseExceptions ) {
    9758               0 :       CPLErr eclass = CPLGetLastErrorType();
    9759               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9760               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9761                 :       }
    9762                 :     }
    9763                 :   }
    9764               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9765               0 :   return resultobj;
    9766                 : fail:
    9767               0 :   return NULL;
    9768                 : }
    9769                 : 
    9770                 : 
    9771               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9772               0 :   PyObject *resultobj = 0;
    9773               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9774                 :   double arg2 ;
    9775               0 :   void *argp1 = 0 ;
    9776               0 :   int res1 = 0 ;
    9777                 :   double val2 ;
    9778               0 :   int ecode2 = 0 ;
    9779               0 :   PyObject * obj0 = 0 ;
    9780               0 :   PyObject * obj1 = 0 ;
    9781                 :   
    9782               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPY_set",&obj0,&obj1)) SWIG_fail;
    9783               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9784               0 :   if (!SWIG_IsOK(res1)) {
    9785               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9786                 :   }
    9787               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9788               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9789               0 :   if (!SWIG_IsOK(ecode2)) {
    9790               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
    9791                 :   } 
    9792               0 :   arg2 = static_cast< double >(val2);
    9793                 :   {
    9794               0 :     if (!arg1) {
    9795               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9796                 :     }
    9797                 :   }
    9798                 :   {
    9799               0 :     if ( bUseExceptions ) {
    9800               0 :       CPLErrorReset();
    9801                 :     }
    9802               0 :     GDAL_GCP_GCPY_set(arg1,arg2);
    9803               0 :     if ( bUseExceptions ) {
    9804               0 :       CPLErr eclass = CPLGetLastErrorType();
    9805               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9806               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9807                 :       }
    9808                 :     }
    9809                 :   }
    9810               0 :   resultobj = SWIG_Py_Void();
    9811               0 :   return resultobj;
    9812                 : fail:
    9813               0 :   return NULL;
    9814                 : }
    9815                 : 
    9816                 : 
    9817               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9818               0 :   PyObject *resultobj = 0;
    9819               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9820               0 :   void *argp1 = 0 ;
    9821               0 :   int res1 = 0 ;
    9822               0 :   PyObject * obj0 = 0 ;
    9823                 :   double result;
    9824                 :   
    9825               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPZ_get",&obj0)) SWIG_fail;
    9826               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9827               0 :   if (!SWIG_IsOK(res1)) {
    9828               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9829                 :   }
    9830               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9831                 :   {
    9832               0 :     if (!arg1) {
    9833               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9834                 :     }
    9835                 :   }
    9836                 :   {
    9837               0 :     if ( bUseExceptions ) {
    9838               0 :       CPLErrorReset();
    9839                 :     }
    9840               0 :     result = (double)GDAL_GCP_GCPZ_get(arg1);
    9841               0 :     if ( bUseExceptions ) {
    9842               0 :       CPLErr eclass = CPLGetLastErrorType();
    9843               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9844               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9845                 :       }
    9846                 :     }
    9847                 :   }
    9848               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9849               0 :   return resultobj;
    9850                 : fail:
    9851               0 :   return NULL;
    9852                 : }
    9853                 : 
    9854                 : 
    9855               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9856               0 :   PyObject *resultobj = 0;
    9857               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9858                 :   double arg2 ;
    9859               0 :   void *argp1 = 0 ;
    9860               0 :   int res1 = 0 ;
    9861                 :   double val2 ;
    9862               0 :   int ecode2 = 0 ;
    9863               0 :   PyObject * obj0 = 0 ;
    9864               0 :   PyObject * obj1 = 0 ;
    9865                 :   
    9866               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPZ_set",&obj0,&obj1)) SWIG_fail;
    9867               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9868               0 :   if (!SWIG_IsOK(res1)) {
    9869               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9870                 :   }
    9871               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9872               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9873               0 :   if (!SWIG_IsOK(ecode2)) {
    9874               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
    9875                 :   } 
    9876               0 :   arg2 = static_cast< double >(val2);
    9877                 :   {
    9878               0 :     if (!arg1) {
    9879               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9880                 :     }
    9881                 :   }
    9882                 :   {
    9883               0 :     if ( bUseExceptions ) {
    9884               0 :       CPLErrorReset();
    9885                 :     }
    9886               0 :     GDAL_GCP_GCPZ_set(arg1,arg2);
    9887               0 :     if ( bUseExceptions ) {
    9888               0 :       CPLErr eclass = CPLGetLastErrorType();
    9889               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9890               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9891                 :       }
    9892                 :     }
    9893                 :   }
    9894               0 :   resultobj = SWIG_Py_Void();
    9895               0 :   return resultobj;
    9896                 : fail:
    9897               0 :   return NULL;
    9898                 : }
    9899                 : 
    9900                 : 
    9901               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9902               0 :   PyObject *resultobj = 0;
    9903               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9904               0 :   void *argp1 = 0 ;
    9905               0 :   int res1 = 0 ;
    9906               0 :   PyObject * obj0 = 0 ;
    9907                 :   double result;
    9908                 :   
    9909               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPPixel_get",&obj0)) SWIG_fail;
    9910               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9911               0 :   if (!SWIG_IsOK(res1)) {
    9912               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9913                 :   }
    9914               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9915                 :   {
    9916               0 :     if (!arg1) {
    9917               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9918                 :     }
    9919                 :   }
    9920                 :   {
    9921               0 :     if ( bUseExceptions ) {
    9922               0 :       CPLErrorReset();
    9923                 :     }
    9924               0 :     result = (double)GDAL_GCP_GCPPixel_get(arg1);
    9925               0 :     if ( bUseExceptions ) {
    9926               0 :       CPLErr eclass = CPLGetLastErrorType();
    9927               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9928               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9929                 :       }
    9930                 :     }
    9931                 :   }
    9932               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9933               0 :   return resultobj;
    9934                 : fail:
    9935               0 :   return NULL;
    9936                 : }
    9937                 : 
    9938                 : 
    9939               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9940               0 :   PyObject *resultobj = 0;
    9941               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9942                 :   double arg2 ;
    9943               0 :   void *argp1 = 0 ;
    9944               0 :   int res1 = 0 ;
    9945                 :   double val2 ;
    9946               0 :   int ecode2 = 0 ;
    9947               0 :   PyObject * obj0 = 0 ;
    9948               0 :   PyObject * obj1 = 0 ;
    9949                 :   
    9950               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPPixel_set",&obj0,&obj1)) SWIG_fail;
    9951               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9952               0 :   if (!SWIG_IsOK(res1)) {
    9953               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9954                 :   }
    9955               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9956               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9957               0 :   if (!SWIG_IsOK(ecode2)) {
    9958               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
    9959                 :   } 
    9960               0 :   arg2 = static_cast< double >(val2);
    9961                 :   {
    9962               0 :     if (!arg1) {
    9963               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9964                 :     }
    9965                 :   }
    9966                 :   {
    9967               0 :     if ( bUseExceptions ) {
    9968               0 :       CPLErrorReset();
    9969                 :     }
    9970               0 :     GDAL_GCP_GCPPixel_set(arg1,arg2);
    9971               0 :     if ( bUseExceptions ) {
    9972               0 :       CPLErr eclass = CPLGetLastErrorType();
    9973               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9974               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9975                 :       }
    9976                 :     }
    9977                 :   }
    9978               0 :   resultobj = SWIG_Py_Void();
    9979               0 :   return resultobj;
    9980                 : fail:
    9981               0 :   return NULL;
    9982                 : }
    9983                 : 
    9984                 : 
    9985               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9986               0 :   PyObject *resultobj = 0;
    9987               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9988               0 :   void *argp1 = 0 ;
    9989               0 :   int res1 = 0 ;
    9990               0 :   PyObject * obj0 = 0 ;
    9991                 :   double result;
    9992                 :   
    9993               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPLine_get",&obj0)) SWIG_fail;
    9994               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9995               0 :   if (!SWIG_IsOK(res1)) {
    9996               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9997                 :   }
    9998               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9999                 :   {
   10000               0 :     if (!arg1) {
   10001               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10002                 :     }
   10003                 :   }
   10004                 :   {
   10005               0 :     if ( bUseExceptions ) {
   10006               0 :       CPLErrorReset();
   10007                 :     }
   10008               0 :     result = (double)GDAL_GCP_GCPLine_get(arg1);
   10009               0 :     if ( bUseExceptions ) {
   10010               0 :       CPLErr eclass = CPLGetLastErrorType();
   10011               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10012               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10013                 :       }
   10014                 :     }
   10015                 :   }
   10016               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10017               0 :   return resultobj;
   10018                 : fail:
   10019               0 :   return NULL;
   10020                 : }
   10021                 : 
   10022                 : 
   10023               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10024               0 :   PyObject *resultobj = 0;
   10025               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10026                 :   double arg2 ;
   10027               0 :   void *argp1 = 0 ;
   10028               0 :   int res1 = 0 ;
   10029                 :   double val2 ;
   10030               0 :   int ecode2 = 0 ;
   10031               0 :   PyObject * obj0 = 0 ;
   10032               0 :   PyObject * obj1 = 0 ;
   10033                 :   
   10034               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPLine_set",&obj0,&obj1)) SWIG_fail;
   10035               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10036               0 :   if (!SWIG_IsOK(res1)) {
   10037               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10038                 :   }
   10039               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10040               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10041               0 :   if (!SWIG_IsOK(ecode2)) {
   10042               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
   10043                 :   } 
   10044               0 :   arg2 = static_cast< double >(val2);
   10045                 :   {
   10046               0 :     if (!arg1) {
   10047               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10048                 :     }
   10049                 :   }
   10050                 :   {
   10051               0 :     if ( bUseExceptions ) {
   10052               0 :       CPLErrorReset();
   10053                 :     }
   10054               0 :     GDAL_GCP_GCPLine_set(arg1,arg2);
   10055               0 :     if ( bUseExceptions ) {
   10056               0 :       CPLErr eclass = CPLGetLastErrorType();
   10057               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10058               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10059                 :       }
   10060                 :     }
   10061                 :   }
   10062               0 :   resultobj = SWIG_Py_Void();
   10063               0 :   return resultobj;
   10064                 : fail:
   10065               0 :   return NULL;
   10066                 : }
   10067                 : 
   10068                 : 
   10069               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10070               0 :   PyObject *resultobj = 0;
   10071               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10072               0 :   void *argp1 = 0 ;
   10073               0 :   int res1 = 0 ;
   10074               0 :   PyObject * obj0 = 0 ;
   10075               0 :   char *result = 0 ;
   10076                 :   
   10077               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_Info_get",&obj0)) SWIG_fail;
   10078               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10079               0 :   if (!SWIG_IsOK(res1)) {
   10080               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10081                 :   }
   10082               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10083                 :   {
   10084               0 :     if (!arg1) {
   10085               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10086                 :     }
   10087                 :   }
   10088                 :   {
   10089               0 :     if ( bUseExceptions ) {
   10090               0 :       CPLErrorReset();
   10091                 :     }
   10092               0 :     result = (char *)GDAL_GCP_Info_get(arg1);
   10093               0 :     if ( bUseExceptions ) {
   10094               0 :       CPLErr eclass = CPLGetLastErrorType();
   10095               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10096               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10097                 :       }
   10098                 :     }
   10099                 :   }
   10100               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10101               0 :   return resultobj;
   10102                 : fail:
   10103               0 :   return NULL;
   10104                 : }
   10105                 : 
   10106                 : 
   10107               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10108               0 :   PyObject *resultobj = 0;
   10109               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10110               0 :   char *arg2 = (char *) 0 ;
   10111               0 :   void *argp1 = 0 ;
   10112               0 :   int res1 = 0 ;
   10113                 :   int res2 ;
   10114               0 :   char *buf2 = 0 ;
   10115               0 :   int alloc2 = 0 ;
   10116               0 :   PyObject * obj0 = 0 ;
   10117               0 :   PyObject * obj1 = 0 ;
   10118                 :   
   10119               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_Info_set",&obj0,&obj1)) SWIG_fail;
   10120               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10121               0 :   if (!SWIG_IsOK(res1)) {
   10122               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10123                 :   }
   10124               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10125               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10126               0 :   if (!SWIG_IsOK(res2)) {
   10127               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Info_set" "', argument " "2"" of type '" "char const *""'");
   10128                 :   }
   10129               0 :   arg2 = reinterpret_cast< char * >(buf2);
   10130                 :   {
   10131               0 :     if (!arg1) {
   10132               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10133                 :     }
   10134                 :   }
   10135                 :   {
   10136               0 :     if ( bUseExceptions ) {
   10137               0 :       CPLErrorReset();
   10138                 :     }
   10139               0 :     GDAL_GCP_Info_set(arg1,(char const *)arg2);
   10140               0 :     if ( bUseExceptions ) {
   10141               0 :       CPLErr eclass = CPLGetLastErrorType();
   10142               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10143               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10144                 :       }
   10145                 :     }
   10146                 :   }
   10147               0 :   resultobj = SWIG_Py_Void();
   10148               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10149               0 :   return resultobj;
   10150                 : fail:
   10151               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10152               0 :   return NULL;
   10153                 : }
   10154                 : 
   10155                 : 
   10156               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10157               0 :   PyObject *resultobj = 0;
   10158               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10159               0 :   void *argp1 = 0 ;
   10160               0 :   int res1 = 0 ;
   10161               0 :   PyObject * obj0 = 0 ;
   10162               0 :   char *result = 0 ;
   10163                 :   
   10164               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_Id_get",&obj0)) SWIG_fail;
   10165               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10166               0 :   if (!SWIG_IsOK(res1)) {
   10167               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10168                 :   }
   10169               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10170                 :   {
   10171               0 :     if (!arg1) {
   10172               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10173                 :     }
   10174                 :   }
   10175                 :   {
   10176               0 :     if ( bUseExceptions ) {
   10177               0 :       CPLErrorReset();
   10178                 :     }
   10179               0 :     result = (char *)GDAL_GCP_Id_get(arg1);
   10180               0 :     if ( bUseExceptions ) {
   10181               0 :       CPLErr eclass = CPLGetLastErrorType();
   10182               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10183               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10184                 :       }
   10185                 :     }
   10186                 :   }
   10187               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10188               0 :   return resultobj;
   10189                 : fail:
   10190               0 :   return NULL;
   10191                 : }
   10192                 : 
   10193                 : 
   10194               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10195               0 :   PyObject *resultobj = 0;
   10196               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10197               0 :   char *arg2 = (char *) 0 ;
   10198               0 :   void *argp1 = 0 ;
   10199               0 :   int res1 = 0 ;
   10200                 :   int res2 ;
   10201               0 :   char *buf2 = 0 ;
   10202               0 :   int alloc2 = 0 ;
   10203               0 :   PyObject * obj0 = 0 ;
   10204               0 :   PyObject * obj1 = 0 ;
   10205                 :   
   10206               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_Id_set",&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_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10210                 :   }
   10211               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10212               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10213               0 :   if (!SWIG_IsOK(res2)) {
   10214               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Id_set" "', argument " "2"" of type '" "char const *""'");
   10215                 :   }
   10216               0 :   arg2 = reinterpret_cast< char * >(buf2);
   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_Id_set(arg1,(char const *)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 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10236               0 :   return resultobj;
   10237                 : fail:
   10238               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10239               0 :   return NULL;
   10240                 : }
   10241                 : 
   10242                 : 
   10243               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10244               0 :   PyObject *resultobj = 0;
   10245               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10246               0 :   void *argp1 = 0 ;
   10247               0 :   int res1 = 0 ;
   10248               0 :   PyObject * obj0 = 0 ;
   10249                 :   double result;
   10250                 :   
   10251               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPX",&obj0)) SWIG_fail;
   10252               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10253               0 :   if (!SWIG_IsOK(res1)) {
   10254               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPX" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10255                 :   }
   10256               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10257                 :   {
   10258               0 :     if (!arg1) {
   10259               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10260                 :     }
   10261                 :   }
   10262                 :   {
   10263               0 :     if ( bUseExceptions ) {
   10264               0 :       CPLErrorReset();
   10265                 :     }
   10266               0 :     result = (double)GDAL_GCP_get_GCPX(arg1);
   10267               0 :     if ( bUseExceptions ) {
   10268               0 :       CPLErr eclass = CPLGetLastErrorType();
   10269               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10270               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10271                 :       }
   10272                 :     }
   10273                 :   }
   10274               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10275               0 :   return resultobj;
   10276                 : fail:
   10277               0 :   return NULL;
   10278                 : }
   10279                 : 
   10280                 : 
   10281               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10282               0 :   PyObject *resultobj = 0;
   10283               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10284                 :   double arg2 ;
   10285               0 :   void *argp1 = 0 ;
   10286               0 :   int res1 = 0 ;
   10287                 :   double val2 ;
   10288               0 :   int ecode2 = 0 ;
   10289               0 :   PyObject * obj0 = 0 ;
   10290               0 :   PyObject * obj1 = 0 ;
   10291                 :   
   10292               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPX",&obj0,&obj1)) SWIG_fail;
   10293               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10294               0 :   if (!SWIG_IsOK(res1)) {
   10295               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPX" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10296                 :   }
   10297               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10298               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10299               0 :   if (!SWIG_IsOK(ecode2)) {
   10300               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPX" "', argument " "2"" of type '" "double""'");
   10301                 :   } 
   10302               0 :   arg2 = static_cast< double >(val2);
   10303                 :   {
   10304               0 :     if (!arg1) {
   10305               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10306                 :     }
   10307                 :   }
   10308                 :   {
   10309               0 :     if ( bUseExceptions ) {
   10310               0 :       CPLErrorReset();
   10311                 :     }
   10312               0 :     GDAL_GCP_set_GCPX(arg1,arg2);
   10313               0 :     if ( bUseExceptions ) {
   10314               0 :       CPLErr eclass = CPLGetLastErrorType();
   10315               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10316               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10317                 :       }
   10318                 :     }
   10319                 :   }
   10320               0 :   resultobj = SWIG_Py_Void();
   10321               0 :   return resultobj;
   10322                 : fail:
   10323               0 :   return NULL;
   10324                 : }
   10325                 : 
   10326                 : 
   10327               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10328               0 :   PyObject *resultobj = 0;
   10329               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10330               0 :   void *argp1 = 0 ;
   10331               0 :   int res1 = 0 ;
   10332               0 :   PyObject * obj0 = 0 ;
   10333                 :   double result;
   10334                 :   
   10335               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPY",&obj0)) SWIG_fail;
   10336               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10337               0 :   if (!SWIG_IsOK(res1)) {
   10338               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPY" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10339                 :   }
   10340               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10341                 :   {
   10342               0 :     if (!arg1) {
   10343               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10344                 :     }
   10345                 :   }
   10346                 :   {
   10347               0 :     if ( bUseExceptions ) {
   10348               0 :       CPLErrorReset();
   10349                 :     }
   10350               0 :     result = (double)GDAL_GCP_get_GCPY(arg1);
   10351               0 :     if ( bUseExceptions ) {
   10352               0 :       CPLErr eclass = CPLGetLastErrorType();
   10353               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10354               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10355                 :       }
   10356                 :     }
   10357                 :   }
   10358               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10359               0 :   return resultobj;
   10360                 : fail:
   10361               0 :   return NULL;
   10362                 : }
   10363                 : 
   10364                 : 
   10365               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10366               0 :   PyObject *resultobj = 0;
   10367               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10368                 :   double arg2 ;
   10369               0 :   void *argp1 = 0 ;
   10370               0 :   int res1 = 0 ;
   10371                 :   double val2 ;
   10372               0 :   int ecode2 = 0 ;
   10373               0 :   PyObject * obj0 = 0 ;
   10374               0 :   PyObject * obj1 = 0 ;
   10375                 :   
   10376               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPY",&obj0,&obj1)) SWIG_fail;
   10377               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10378               0 :   if (!SWIG_IsOK(res1)) {
   10379               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPY" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10380                 :   }
   10381               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10382               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10383               0 :   if (!SWIG_IsOK(ecode2)) {
   10384               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPY" "', argument " "2"" of type '" "double""'");
   10385                 :   } 
   10386               0 :   arg2 = static_cast< double >(val2);
   10387                 :   {
   10388               0 :     if (!arg1) {
   10389               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10390                 :     }
   10391                 :   }
   10392                 :   {
   10393               0 :     if ( bUseExceptions ) {
   10394               0 :       CPLErrorReset();
   10395                 :     }
   10396               0 :     GDAL_GCP_set_GCPY(arg1,arg2);
   10397               0 :     if ( bUseExceptions ) {
   10398               0 :       CPLErr eclass = CPLGetLastErrorType();
   10399               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10400               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10401                 :       }
   10402                 :     }
   10403                 :   }
   10404               0 :   resultobj = SWIG_Py_Void();
   10405               0 :   return resultobj;
   10406                 : fail:
   10407               0 :   return NULL;
   10408                 : }
   10409                 : 
   10410                 : 
   10411               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10412               0 :   PyObject *resultobj = 0;
   10413               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10414               0 :   void *argp1 = 0 ;
   10415               0 :   int res1 = 0 ;
   10416               0 :   PyObject * obj0 = 0 ;
   10417                 :   double result;
   10418                 :   
   10419               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPZ",&obj0)) SWIG_fail;
   10420               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10421               0 :   if (!SWIG_IsOK(res1)) {
   10422               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPZ" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10423                 :   }
   10424               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10425                 :   {
   10426               0 :     if (!arg1) {
   10427               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10428                 :     }
   10429                 :   }
   10430                 :   {
   10431               0 :     if ( bUseExceptions ) {
   10432               0 :       CPLErrorReset();
   10433                 :     }
   10434               0 :     result = (double)GDAL_GCP_get_GCPZ(arg1);
   10435               0 :     if ( bUseExceptions ) {
   10436               0 :       CPLErr eclass = CPLGetLastErrorType();
   10437               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10438               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10439                 :       }
   10440                 :     }
   10441                 :   }
   10442               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10443               0 :   return resultobj;
   10444                 : fail:
   10445               0 :   return NULL;
   10446                 : }
   10447                 : 
   10448                 : 
   10449               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10450               0 :   PyObject *resultobj = 0;
   10451               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10452                 :   double arg2 ;
   10453               0 :   void *argp1 = 0 ;
   10454               0 :   int res1 = 0 ;
   10455                 :   double val2 ;
   10456               0 :   int ecode2 = 0 ;
   10457               0 :   PyObject * obj0 = 0 ;
   10458               0 :   PyObject * obj1 = 0 ;
   10459                 :   
   10460               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPZ",&obj0,&obj1)) SWIG_fail;
   10461               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10462               0 :   if (!SWIG_IsOK(res1)) {
   10463               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPZ" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10464                 :   }
   10465               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10466               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10467               0 :   if (!SWIG_IsOK(ecode2)) {
   10468               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPZ" "', argument " "2"" of type '" "double""'");
   10469                 :   } 
   10470               0 :   arg2 = static_cast< double >(val2);
   10471                 :   {
   10472               0 :     if (!arg1) {
   10473               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10474                 :     }
   10475                 :   }
   10476                 :   {
   10477               0 :     if ( bUseExceptions ) {
   10478               0 :       CPLErrorReset();
   10479                 :     }
   10480               0 :     GDAL_GCP_set_GCPZ(arg1,arg2);
   10481               0 :     if ( bUseExceptions ) {
   10482               0 :       CPLErr eclass = CPLGetLastErrorType();
   10483               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10484               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10485                 :       }
   10486                 :     }
   10487                 :   }
   10488               0 :   resultobj = SWIG_Py_Void();
   10489               0 :   return resultobj;
   10490                 : fail:
   10491               0 :   return NULL;
   10492                 : }
   10493                 : 
   10494                 : 
   10495               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPPixel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10496               0 :   PyObject *resultobj = 0;
   10497               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10498               0 :   void *argp1 = 0 ;
   10499               0 :   int res1 = 0 ;
   10500               0 :   PyObject * obj0 = 0 ;
   10501                 :   double result;
   10502                 :   
   10503               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPPixel",&obj0)) SWIG_fail;
   10504               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10505               0 :   if (!SWIG_IsOK(res1)) {
   10506               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPPixel" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10507                 :   }
   10508               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10509                 :   {
   10510               0 :     if (!arg1) {
   10511               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10512                 :     }
   10513                 :   }
   10514                 :   {
   10515               0 :     if ( bUseExceptions ) {
   10516               0 :       CPLErrorReset();
   10517                 :     }
   10518               0 :     result = (double)GDAL_GCP_get_GCPPixel(arg1);
   10519               0 :     if ( bUseExceptions ) {
   10520               0 :       CPLErr eclass = CPLGetLastErrorType();
   10521               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10522               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10523                 :       }
   10524                 :     }
   10525                 :   }
   10526               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10527               0 :   return resultobj;
   10528                 : fail:
   10529               0 :   return NULL;
   10530                 : }
   10531                 : 
   10532                 : 
   10533               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPPixel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10534               0 :   PyObject *resultobj = 0;
   10535               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10536                 :   double arg2 ;
   10537               0 :   void *argp1 = 0 ;
   10538               0 :   int res1 = 0 ;
   10539                 :   double val2 ;
   10540               0 :   int ecode2 = 0 ;
   10541               0 :   PyObject * obj0 = 0 ;
   10542               0 :   PyObject * obj1 = 0 ;
   10543                 :   
   10544               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPPixel",&obj0,&obj1)) SWIG_fail;
   10545               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10546               0 :   if (!SWIG_IsOK(res1)) {
   10547               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPPixel" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10548                 :   }
   10549               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10550               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10551               0 :   if (!SWIG_IsOK(ecode2)) {
   10552               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPPixel" "', argument " "2"" of type '" "double""'");
   10553                 :   } 
   10554               0 :   arg2 = static_cast< double >(val2);
   10555                 :   {
   10556               0 :     if (!arg1) {
   10557               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10558                 :     }
   10559                 :   }
   10560                 :   {
   10561               0 :     if ( bUseExceptions ) {
   10562               0 :       CPLErrorReset();
   10563                 :     }
   10564               0 :     GDAL_GCP_set_GCPPixel(arg1,arg2);
   10565               0 :     if ( bUseExceptions ) {
   10566               0 :       CPLErr eclass = CPLGetLastErrorType();
   10567               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10568               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10569                 :       }
   10570                 :     }
   10571                 :   }
   10572               0 :   resultobj = SWIG_Py_Void();
   10573               0 :   return resultobj;
   10574                 : fail:
   10575               0 :   return NULL;
   10576                 : }
   10577                 : 
   10578                 : 
   10579               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10580               0 :   PyObject *resultobj = 0;
   10581               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10582               0 :   void *argp1 = 0 ;
   10583               0 :   int res1 = 0 ;
   10584               0 :   PyObject * obj0 = 0 ;
   10585                 :   double result;
   10586                 :   
   10587               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPLine",&obj0)) SWIG_fail;
   10588               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10589               0 :   if (!SWIG_IsOK(res1)) {
   10590               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPLine" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10591                 :   }
   10592               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10593                 :   {
   10594               0 :     if (!arg1) {
   10595               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10596                 :     }
   10597                 :   }
   10598                 :   {
   10599               0 :     if ( bUseExceptions ) {
   10600               0 :       CPLErrorReset();
   10601                 :     }
   10602               0 :     result = (double)GDAL_GCP_get_GCPLine(arg1);
   10603               0 :     if ( bUseExceptions ) {
   10604               0 :       CPLErr eclass = CPLGetLastErrorType();
   10605               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10606               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10607                 :       }
   10608                 :     }
   10609                 :   }
   10610               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10611               0 :   return resultobj;
   10612                 : fail:
   10613               0 :   return NULL;
   10614                 : }
   10615                 : 
   10616                 : 
   10617               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10618               0 :   PyObject *resultobj = 0;
   10619               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10620                 :   double arg2 ;
   10621               0 :   void *argp1 = 0 ;
   10622               0 :   int res1 = 0 ;
   10623                 :   double val2 ;
   10624               0 :   int ecode2 = 0 ;
   10625               0 :   PyObject * obj0 = 0 ;
   10626               0 :   PyObject * obj1 = 0 ;
   10627                 :   
   10628               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPLine",&obj0,&obj1)) SWIG_fail;
   10629               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10630               0 :   if (!SWIG_IsOK(res1)) {
   10631               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPLine" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10632                 :   }
   10633               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10634               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10635               0 :   if (!SWIG_IsOK(ecode2)) {
   10636               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPLine" "', argument " "2"" of type '" "double""'");
   10637                 :   } 
   10638               0 :   arg2 = static_cast< double >(val2);
   10639                 :   {
   10640               0 :     if (!arg1) {
   10641               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10642                 :     }
   10643                 :   }
   10644                 :   {
   10645               0 :     if ( bUseExceptions ) {
   10646               0 :       CPLErrorReset();
   10647                 :     }
   10648               0 :     GDAL_GCP_set_GCPLine(arg1,arg2);
   10649               0 :     if ( bUseExceptions ) {
   10650               0 :       CPLErr eclass = CPLGetLastErrorType();
   10651               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10652               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10653                 :       }
   10654                 :     }
   10655                 :   }
   10656               0 :   resultobj = SWIG_Py_Void();
   10657               0 :   return resultobj;
   10658                 : fail:
   10659               0 :   return NULL;
   10660                 : }
   10661                 : 
   10662                 : 
   10663               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_Info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10664               0 :   PyObject *resultobj = 0;
   10665               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10666               0 :   void *argp1 = 0 ;
   10667               0 :   int res1 = 0 ;
   10668               0 :   PyObject * obj0 = 0 ;
   10669               0 :   char *result = 0 ;
   10670                 :   
   10671               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_Info",&obj0)) SWIG_fail;
   10672               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10673               0 :   if (!SWIG_IsOK(res1)) {
   10674               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_Info" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10675                 :   }
   10676               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10677                 :   {
   10678               0 :     if (!arg1) {
   10679               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10680                 :     }
   10681                 :   }
   10682                 :   {
   10683               0 :     if ( bUseExceptions ) {
   10684               0 :       CPLErrorReset();
   10685                 :     }
   10686               0 :     result = (char *)GDAL_GCP_get_Info(arg1);
   10687               0 :     if ( bUseExceptions ) {
   10688               0 :       CPLErr eclass = CPLGetLastErrorType();
   10689               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10690               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10691                 :       }
   10692                 :     }
   10693                 :   }
   10694               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10695               0 :   return resultobj;
   10696                 : fail:
   10697               0 :   return NULL;
   10698                 : }
   10699                 : 
   10700                 : 
   10701               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_Info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10702               0 :   PyObject *resultobj = 0;
   10703               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10704               0 :   char *arg2 = (char *) 0 ;
   10705               0 :   void *argp1 = 0 ;
   10706               0 :   int res1 = 0 ;
   10707                 :   int res2 ;
   10708               0 :   char *buf2 = 0 ;
   10709               0 :   int alloc2 = 0 ;
   10710               0 :   PyObject * obj0 = 0 ;
   10711               0 :   PyObject * obj1 = 0 ;
   10712                 :   
   10713               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_Info",&obj0,&obj1)) SWIG_fail;
   10714               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10715               0 :   if (!SWIG_IsOK(res1)) {
   10716               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_Info" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10717                 :   }
   10718               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10719               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10720               0 :   if (!SWIG_IsOK(res2)) {
   10721               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_set_Info" "', argument " "2"" of type '" "char const *""'");
   10722                 :   }
   10723               0 :   arg2 = reinterpret_cast< char * >(buf2);
   10724                 :   {
   10725               0 :     if (!arg1) {
   10726               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10727                 :     }
   10728                 :   }
   10729                 :   {
   10730               0 :     if ( bUseExceptions ) {
   10731               0 :       CPLErrorReset();
   10732                 :     }
   10733               0 :     GDAL_GCP_set_Info(arg1,(char const *)arg2);
   10734               0 :     if ( bUseExceptions ) {
   10735               0 :       CPLErr eclass = CPLGetLastErrorType();
   10736               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10737               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10738                 :       }
   10739                 :     }
   10740                 :   }
   10741               0 :   resultobj = SWIG_Py_Void();
   10742               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10743               0 :   return resultobj;
   10744                 : fail:
   10745               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10746               0 :   return NULL;
   10747                 : }
   10748                 : 
   10749                 : 
   10750               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_Id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10751               0 :   PyObject *resultobj = 0;
   10752               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10753               0 :   void *argp1 = 0 ;
   10754               0 :   int res1 = 0 ;
   10755               0 :   PyObject * obj0 = 0 ;
   10756               0 :   char *result = 0 ;
   10757                 :   
   10758               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_Id",&obj0)) SWIG_fail;
   10759               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10760               0 :   if (!SWIG_IsOK(res1)) {
   10761               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_Id" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10762                 :   }
   10763               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10764                 :   {
   10765               0 :     if (!arg1) {
   10766               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10767                 :     }
   10768                 :   }
   10769                 :   {
   10770               0 :     if ( bUseExceptions ) {
   10771               0 :       CPLErrorReset();
   10772                 :     }
   10773               0 :     result = (char *)GDAL_GCP_get_Id(arg1);
   10774               0 :     if ( bUseExceptions ) {
   10775               0 :       CPLErr eclass = CPLGetLastErrorType();
   10776               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10777               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10778                 :       }
   10779                 :     }
   10780                 :   }
   10781               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10782               0 :   return resultobj;
   10783                 : fail:
   10784               0 :   return NULL;
   10785                 : }
   10786                 : 
   10787                 : 
   10788               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_Id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10789               0 :   PyObject *resultobj = 0;
   10790               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10791               0 :   char *arg2 = (char *) 0 ;
   10792               0 :   void *argp1 = 0 ;
   10793               0 :   int res1 = 0 ;
   10794                 :   int res2 ;
   10795               0 :   char *buf2 = 0 ;
   10796               0 :   int alloc2 = 0 ;
   10797               0 :   PyObject * obj0 = 0 ;
   10798               0 :   PyObject * obj1 = 0 ;
   10799                 :   
   10800               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_Id",&obj0,&obj1)) SWIG_fail;
   10801               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10802               0 :   if (!SWIG_IsOK(res1)) {
   10803               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_Id" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10804                 :   }
   10805               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10806               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10807               0 :   if (!SWIG_IsOK(res2)) {
   10808               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_set_Id" "', argument " "2"" of type '" "char const *""'");
   10809                 :   }
   10810               0 :   arg2 = reinterpret_cast< char * >(buf2);
   10811                 :   {
   10812               0 :     if (!arg1) {
   10813               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10814                 :     }
   10815                 :   }
   10816                 :   {
   10817               0 :     if ( bUseExceptions ) {
   10818               0 :       CPLErrorReset();
   10819                 :     }
   10820               0 :     GDAL_GCP_set_Id(arg1,(char const *)arg2);
   10821               0 :     if ( bUseExceptions ) {
   10822               0 :       CPLErr eclass = CPLGetLastErrorType();
   10823               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10824               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10825                 :       }
   10826                 :     }
   10827                 :   }
   10828               0 :   resultobj = SWIG_Py_Void();
   10829               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10830               0 :   return resultobj;
   10831                 : fail:
   10832               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10833               0 :   return NULL;
   10834                 : }
   10835                 : 
   10836                 : 
   10837               0 : SWIGINTERN PyObject *_wrap_GCPsToGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10838               0 :   PyObject *resultobj = 0;
   10839                 :   int arg1 ;
   10840               0 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   10841                 :   double *arg3 ;
   10842               0 :   int arg4 = (int) 1 ;
   10843                 :   GDAL_GCP *tmpGCPList1 ;
   10844                 :   double argout3[6] ;
   10845                 :   int val4 ;
   10846               0 :   int ecode4 = 0 ;
   10847               0 :   PyObject * obj0 = 0 ;
   10848               0 :   PyObject * obj1 = 0 ;
   10849                 :   RETURN_NONE result;
   10850                 :   
   10851                 :   {
   10852                 :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   10853               0 :     arg3 = argout3;
   10854                 :   }
   10855               0 :   if (!PyArg_ParseTuple(args,(char *)"O|O:GCPsToGeoTransform",&obj0,&obj1)) SWIG_fail;
   10856                 :   {
   10857                 :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   10858                 :     /* check if is List */
   10859               0 :     if ( !PySequence_Check(obj0) ) {
   10860               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   10861               0 :       SWIG_fail;
   10862                 :     }
   10863               0 :     arg1 = PySequence_Size(obj0);
   10864               0 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   10865               0 :     arg2 = tmpGCPList1;
   10866               0 :     for( int i = 0; i<arg1; i++ ) {
   10867               0 :       PyObject *o = PySequence_GetItem(obj0,i);
   10868               0 :       GDAL_GCP *item = 0;
   10869               0 :       SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 );
   10870               0 :       if ( ! item ) {
   10871               0 :         Py_DECREF(o);
   10872                 :         SWIG_fail;
   10873                 :       }
   10874               0 :       memcpy( (void*) tmpGCPList1, (void*) item, sizeof( GDAL_GCP ) );
   10875               0 :       ++tmpGCPList1;
   10876               0 :       Py_DECREF(o);
   10877                 :     }
   10878                 :   }
   10879               0 :   if (obj1) {
   10880               0 :     ecode4 = SWIG_AsVal_int(obj1, &val4);
   10881               0 :     if (!SWIG_IsOK(ecode4)) {
   10882               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GCPsToGeoTransform" "', argument " "4"" of type '" "int""'");
   10883                 :     } 
   10884               0 :     arg4 = static_cast< int >(val4);
   10885                 :   }
   10886                 :   {
   10887               0 :     if ( bUseExceptions ) {
   10888               0 :       CPLErrorReset();
   10889                 :     }
   10890               0 :     result = GDALGCPsToGeoTransform(arg1,(GDAL_GCP const *)arg2,arg3,arg4);
   10891               0 :     if ( bUseExceptions ) {
   10892               0 :       CPLErr eclass = CPLGetLastErrorType();
   10893               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10894               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10895                 :       }
   10896                 :     }
   10897                 :   }
   10898                 :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   10899                 :   {
   10900                 :     /* %typemap(argout) (double argout[ANY]) */
   10901               0 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 6 );
   10902               0 :     resultobj = t_output_helper(resultobj,out);
   10903                 :   }
   10904                 :   {
   10905                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   10906               0 :     if (arg2) {
   10907               0 :       free( (void*) arg2 );
   10908                 :     }
   10909                 :   }
   10910                 :   {
   10911                 :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   10912               0 :     if (result == 0 ) {
   10913               0 :       Py_XDECREF( resultobj );
   10914               0 :       resultobj = Py_None;
   10915               0 :       Py_INCREF(resultobj);
   10916                 :     }
   10917               0 :     if (resultobj == 0) {
   10918               0 :       resultobj = Py_None;
   10919               0 :       Py_INCREF(resultobj);
   10920                 :     }
   10921                 :   }
   10922               0 :   return resultobj;
   10923                 : fail:
   10924                 :   {
   10925                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   10926               0 :     if (arg2) {
   10927               0 :       free( (void*) arg2 );
   10928                 :     }
   10929                 :   }
   10930               0 :   return NULL;
   10931                 : }
   10932                 : 
   10933                 : 
   10934               1 : SWIGINTERN PyObject *_wrap_delete_AsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10935               1 :   PyObject *resultobj = 0;
   10936               1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10937               1 :   void *argp1 = 0 ;
   10938               1 :   int res1 = 0 ;
   10939               1 :   PyObject * obj0 = 0 ;
   10940                 :   
   10941               1 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_AsyncReader",&obj0)) SWIG_fail;
   10942               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_DISOWN |  0 );
   10943               1 :   if (!SWIG_IsOK(res1)) {
   10944               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AsyncReader" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10945                 :   }
   10946               1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   10947                 :   {
   10948               1 :     if ( bUseExceptions ) {
   10949               0 :       CPLErrorReset();
   10950                 :     }
   10951                 :     delete_GDALAsyncReaderShadow(arg1);
   10952               1 :     if ( bUseExceptions ) {
   10953               0 :       CPLErr eclass = CPLGetLastErrorType();
   10954               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10955               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10956                 :       }
   10957                 :     }
   10958                 :   }
   10959               1 :   resultobj = SWIG_Py_Void();
   10960               1 :   return resultobj;
   10961                 : fail:
   10962               0 :   return NULL;
   10963                 : }
   10964                 : 
   10965                 : 
   10966               1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetNextUpdatedRegion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10967               1 :   PyObject *resultobj = 0;
   10968               1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10969                 :   double arg2 ;
   10970               1 :   int *arg3 = (int *) 0 ;
   10971               1 :   int *arg4 = (int *) 0 ;
   10972               1 :   int *arg5 = (int *) 0 ;
   10973               1 :   int *arg6 = (int *) 0 ;
   10974               1 :   void *argp1 = 0 ;
   10975               1 :   int res1 = 0 ;
   10976                 :   double val2 ;
   10977               1 :   int ecode2 = 0 ;
   10978                 :   int temp3 ;
   10979               1 :   int res3 = SWIG_TMPOBJ ;
   10980                 :   int temp4 ;
   10981               1 :   int res4 = SWIG_TMPOBJ ;
   10982                 :   int temp5 ;
   10983               1 :   int res5 = SWIG_TMPOBJ ;
   10984                 :   int temp6 ;
   10985               1 :   int res6 = SWIG_TMPOBJ ;
   10986               1 :   PyObject * obj0 = 0 ;
   10987               1 :   PyObject * obj1 = 0 ;
   10988                 :   GDALAsyncStatusType result;
   10989                 :   
   10990               1 :   arg3 = &temp3;
   10991               1 :   arg4 = &temp4;
   10992               1 :   arg5 = &temp5;
   10993               1 :   arg6 = &temp6;
   10994               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:AsyncReader_GetNextUpdatedRegion",&obj0,&obj1)) SWIG_fail;
   10995               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   10996               1 :   if (!SWIG_IsOK(res1)) {
   10997               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10998                 :   }
   10999               1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   11000               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   11001               1 :   if (!SWIG_IsOK(ecode2)) {
   11002               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "2"" of type '" "double""'");
   11003                 :   } 
   11004               1 :   arg2 = static_cast< double >(val2);
   11005                 :   {
   11006               1 :     if ( bUseExceptions ) {
   11007               0 :       CPLErrorReset();
   11008                 :     }
   11009               1 :     result = (GDALAsyncStatusType)GDALAsyncReaderShadow_GetNextUpdatedRegion(arg1,arg2,arg3,arg4,arg5,arg6);
   11010               1 :     if ( bUseExceptions ) {
   11011               0 :       CPLErr eclass = CPLGetLastErrorType();
   11012               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11013               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11014                 :       }
   11015                 :     }
   11016                 :   }
   11017               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11018               2 :   if (SWIG_IsTmpObj(res3)) {
   11019               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   11020                 :   } else {
   11021               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   11022               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   11023                 :   }
   11024               2 :   if (SWIG_IsTmpObj(res4)) {
   11025               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   11026                 :   } else {
   11027               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   11028               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   11029                 :   }
   11030               2 :   if (SWIG_IsTmpObj(res5)) {
   11031               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   11032                 :   } else {
   11033               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   11034               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   11035                 :   }
   11036               2 :   if (SWIG_IsTmpObj(res6)) {
   11037               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   11038                 :   } else {
   11039               0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   11040               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   11041                 :   }
   11042               1 :   return resultobj;
   11043                 : fail:
   11044               0 :   return NULL;
   11045                 : }
   11046                 : 
   11047                 : 
   11048               1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11049               1 :   PyObject *resultobj = 0;
   11050               1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   11051               1 :   void **arg2 = (void **) 0 ;
   11052               1 :   void *argp1 = 0 ;
   11053               1 :   int res1 = 0 ;
   11054               1 :   void *pyObject2 = NULL ;
   11055               1 :   PyObject * obj0 = 0 ;
   11056                 :   
   11057                 :   {
   11058                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   11059               1 :     arg2 = &pyObject2;
   11060                 :   }
   11061               1 :   if (!PyArg_ParseTuple(args,(char *)"O:AsyncReader_GetBuffer",&obj0)) SWIG_fail;
   11062               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   11063               1 :   if (!SWIG_IsOK(res1)) {
   11064               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   11065                 :   }
   11066               1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   11067                 :   {
   11068               1 :     if ( bUseExceptions ) {
   11069               0 :       CPLErrorReset();
   11070                 :     }
   11071                 :     GDALAsyncReaderShadow_GetBuffer(arg1,arg2);
   11072               1 :     if ( bUseExceptions ) {
   11073               0 :       CPLErr eclass = CPLGetLastErrorType();
   11074               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11075               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11076                 :       }
   11077                 :     }
   11078                 :   }
   11079               1 :   resultobj = SWIG_Py_Void();
   11080                 :   {
   11081                 :     /* %typemap(argout) ( void **outPythonObject ) */
   11082               1 :     Py_XDECREF(resultobj);
   11083               1 :     if (*arg2)
   11084                 :     {
   11085               1 :       resultobj = (PyObject*)*arg2;
   11086                 :     }
   11087                 :     else
   11088                 :     {
   11089               0 :       resultobj = Py_None;
   11090               0 :       Py_INCREF(resultobj);
   11091                 :     }
   11092                 :   }
   11093               1 :   return resultobj;
   11094                 : fail:
   11095               0 :   return NULL;
   11096                 : }
   11097                 : 
   11098                 : 
   11099               0 : SWIGINTERN PyObject *_wrap_AsyncReader_LockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11100               0 :   PyObject *resultobj = 0;
   11101               0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   11102                 :   double arg2 ;
   11103               0 :   void *argp1 = 0 ;
   11104               0 :   int res1 = 0 ;
   11105                 :   double val2 ;
   11106               0 :   int ecode2 = 0 ;
   11107               0 :   PyObject * obj0 = 0 ;
   11108               0 :   PyObject * obj1 = 0 ;
   11109                 :   int result;
   11110                 :   
   11111               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:AsyncReader_LockBuffer",&obj0,&obj1)) SWIG_fail;
   11112               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   11113               0 :   if (!SWIG_IsOK(res1)) {
   11114               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_LockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   11115                 :   }
   11116               0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   11117               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   11118               0 :   if (!SWIG_IsOK(ecode2)) {
   11119               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_LockBuffer" "', argument " "2"" of type '" "double""'");
   11120                 :   } 
   11121               0 :   arg2 = static_cast< double >(val2);
   11122                 :   {
   11123               0 :     if ( bUseExceptions ) {
   11124               0 :       CPLErrorReset();
   11125                 :     }
   11126               0 :     result = (int)GDALAsyncReaderShadow_LockBuffer(arg1,arg2);
   11127               0 :     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               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11135               0 :   return resultobj;
   11136                 : fail:
   11137               0 :   return NULL;
   11138                 : }
   11139                 : 
   11140                 : 
   11141               0 : SWIGINTERN PyObject *_wrap_AsyncReader_UnlockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11142               0 :   PyObject *resultobj = 0;
   11143               0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   11144               0 :   void *argp1 = 0 ;
   11145               0 :   int res1 = 0 ;
   11146               0 :   PyObject * obj0 = 0 ;
   11147                 :   
   11148               0 :   if (!PyArg_ParseTuple(args,(char *)"O:AsyncReader_UnlockBuffer",&obj0)) SWIG_fail;
   11149               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   11150               0 :   if (!SWIG_IsOK(res1)) {
   11151               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_UnlockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   11152                 :   }
   11153               0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   11154                 :   {
   11155               0 :     if ( bUseExceptions ) {
   11156               0 :       CPLErrorReset();
   11157                 :     }
   11158                 :     GDALAsyncReaderShadow_UnlockBuffer(arg1);
   11159               0 :     if ( bUseExceptions ) {
   11160               0 :       CPLErr eclass = CPLGetLastErrorType();
   11161               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11162               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11163                 :       }
   11164                 :     }
   11165                 :   }
   11166               0 :   resultobj = SWIG_Py_Void();
   11167               0 :   return resultobj;
   11168                 : fail:
   11169               0 :   return NULL;
   11170                 : }
   11171                 : 
   11172                 : 
   11173              12 : SWIGINTERN PyObject *AsyncReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11174                 :   PyObject *obj;
   11175              12 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   11176              12 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_NewClientData(obj));
   11177              12 :   return SWIG_Py_Void();
   11178                 : }
   11179                 : 
   11180            4156 : SWIGINTERN PyObject *_wrap_Dataset_RasterXSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11181            4156 :   PyObject *resultobj = 0;
   11182            4156 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11183            4156 :   void *argp1 = 0 ;
   11184            4156 :   int res1 = 0 ;
   11185            4156 :   PyObject * obj0 = 0 ;
   11186                 :   int result;
   11187                 :   
   11188            4156 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterXSize_get",&obj0)) SWIG_fail;
   11189            4156 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11190            4156 :   if (!SWIG_IsOK(res1)) {
   11191               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterXSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11192                 :   }
   11193            4156 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11194                 :   {
   11195            4156 :     if ( bUseExceptions ) {
   11196               0 :       CPLErrorReset();
   11197                 :     }
   11198            4156 :     result = (int)GDALDatasetShadow_RasterXSize_get(arg1);
   11199            4156 :     if ( bUseExceptions ) {
   11200               0 :       CPLErr eclass = CPLGetLastErrorType();
   11201               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11202               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11203                 :       }
   11204                 :     }
   11205                 :   }
   11206            4156 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11207            4156 :   return resultobj;
   11208                 : fail:
   11209               0 :   return NULL;
   11210                 : }
   11211                 : 
   11212                 : 
   11213           12535 : SWIGINTERN PyObject *_wrap_Dataset_RasterYSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11214           12535 :   PyObject *resultobj = 0;
   11215           12535 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11216           12535 :   void *argp1 = 0 ;
   11217           12535 :   int res1 = 0 ;
   11218           12535 :   PyObject * obj0 = 0 ;
   11219                 :   int result;
   11220                 :   
   11221           12535 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterYSize_get",&obj0)) SWIG_fail;
   11222           12535 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11223           12535 :   if (!SWIG_IsOK(res1)) {
   11224               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterYSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11225                 :   }
   11226           12535 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11227                 :   {
   11228           12535 :     if ( bUseExceptions ) {
   11229               0 :       CPLErrorReset();
   11230                 :     }
   11231           12535 :     result = (int)GDALDatasetShadow_RasterYSize_get(arg1);
   11232           12535 :     if ( bUseExceptions ) {
   11233               0 :       CPLErr eclass = CPLGetLastErrorType();
   11234               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11235               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11236                 :       }
   11237                 :     }
   11238                 :   }
   11239           12535 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11240           12535 :   return resultobj;
   11241                 : fail:
   11242               0 :   return NULL;
   11243                 : }
   11244                 : 
   11245                 : 
   11246          336663 : SWIGINTERN PyObject *_wrap_Dataset_RasterCount_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11247          336663 :   PyObject *resultobj = 0;
   11248          336663 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11249          336663 :   void *argp1 = 0 ;
   11250          336663 :   int res1 = 0 ;
   11251          336663 :   PyObject * obj0 = 0 ;
   11252                 :   int result;
   11253                 :   
   11254          336663 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterCount_get",&obj0)) SWIG_fail;
   11255          336663 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11256          336663 :   if (!SWIG_IsOK(res1)) {
   11257               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterCount_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11258                 :   }
   11259          336663 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11260                 :   {
   11261          336663 :     if ( bUseExceptions ) {
   11262               0 :       CPLErrorReset();
   11263                 :     }
   11264          336663 :     result = (int)GDALDatasetShadow_RasterCount_get(arg1);
   11265          336663 :     if ( bUseExceptions ) {
   11266               0 :       CPLErr eclass = CPLGetLastErrorType();
   11267               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11268               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11269                 :       }
   11270                 :     }
   11271                 :   }
   11272          336663 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11273          336663 :   return resultobj;
   11274                 : fail:
   11275               0 :   return NULL;
   11276                 : }
   11277                 : 
   11278                 : 
   11279           16328 : SWIGINTERN PyObject *_wrap_delete_Dataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11280           16328 :   PyObject *resultobj = 0;
   11281           16328 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11282           16328 :   void *argp1 = 0 ;
   11283           16328 :   int res1 = 0 ;
   11284           16328 :   PyObject * obj0 = 0 ;
   11285                 :   
   11286           16328 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_Dataset",&obj0)) SWIG_fail;
   11287           16328 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_DISOWN |  0 );
   11288           16328 :   if (!SWIG_IsOK(res1)) {
   11289               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11290                 :   }
   11291           16328 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11292                 :   {
   11293           16328 :     if ( bUseExceptions ) {
   11294               0 :       CPLErrorReset();
   11295                 :     }
   11296                 :     delete_GDALDatasetShadow(arg1);
   11297           16328 :     if ( bUseExceptions ) {
   11298               0 :       CPLErr eclass = CPLGetLastErrorType();
   11299               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11300               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11301                 :       }
   11302                 :     }
   11303                 :   }
   11304           16328 :   resultobj = SWIG_Py_Void();
   11305           16328 :   return resultobj;
   11306                 : fail:
   11307               0 :   return NULL;
   11308                 : }
   11309                 : 
   11310                 : 
   11311             550 : SWIGINTERN PyObject *_wrap_Dataset_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11312             550 :   PyObject *resultobj = 0;
   11313             550 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11314             550 :   void *argp1 = 0 ;
   11315             550 :   int res1 = 0 ;
   11316             550 :   PyObject * obj0 = 0 ;
   11317             550 :   GDALDriverShadow *result = 0 ;
   11318                 :   
   11319             550 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetDriver",&obj0)) SWIG_fail;
   11320             550 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11321             550 :   if (!SWIG_IsOK(res1)) {
   11322               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetDriver" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11323                 :   }
   11324             550 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11325                 :   {
   11326             550 :     if ( bUseExceptions ) {
   11327               0 :       CPLErrorReset();
   11328                 :     }
   11329             550 :     result = (GDALDriverShadow *)GDALDatasetShadow_GetDriver(arg1);
   11330             550 :     if ( bUseExceptions ) {
   11331               0 :       CPLErr eclass = CPLGetLastErrorType();
   11332               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11333               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11334                 :       }
   11335                 :     }
   11336                 :   }
   11337             550 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   11338             550 :   return resultobj;
   11339                 : fail:
   11340               0 :   return NULL;
   11341                 : }
   11342                 : 
   11343                 : 
   11344          183419 : SWIGINTERN PyObject *_wrap_Dataset_GetRasterBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11345          183419 :   PyObject *resultobj = 0;
   11346          183419 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11347                 :   int arg2 ;
   11348          183419 :   void *argp1 = 0 ;
   11349          183419 :   int res1 = 0 ;
   11350                 :   int val2 ;
   11351          183419 :   int ecode2 = 0 ;
   11352          183419 :   PyObject * obj0 = 0 ;
   11353          183419 :   PyObject * obj1 = 0 ;
   11354          183419 :   GDALRasterBandShadow *result = 0 ;
   11355                 :   
   11356          183419 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_GetRasterBand",&obj0,&obj1)) SWIG_fail;
   11357          183419 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11358          183419 :   if (!SWIG_IsOK(res1)) {
   11359               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRasterBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11360                 :   }
   11361          183419 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11362          183419 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11363          183419 :   if (!SWIG_IsOK(ecode2)) {
   11364               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetRasterBand" "', argument " "2"" of type '" "int""'");
   11365                 :   } 
   11366          183419 :   arg2 = static_cast< int >(val2);
   11367                 :   {
   11368          183419 :     if ( bUseExceptions ) {
   11369               0 :       CPLErrorReset();
   11370                 :     }
   11371          183419 :     result = (GDALRasterBandShadow *)GDALDatasetShadow_GetRasterBand(arg1,arg2);
   11372          183419 :     if ( bUseExceptions ) {
   11373               0 :       CPLErr eclass = CPLGetLastErrorType();
   11374               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11375               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11376                 :       }
   11377                 :     }
   11378                 :   }
   11379          183419 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   11380          183419 :   return resultobj;
   11381                 : fail:
   11382               0 :   return NULL;
   11383                 : }
   11384                 : 
   11385                 : 
   11386             386 : SWIGINTERN PyObject *_wrap_Dataset_GetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11387             386 :   PyObject *resultobj = 0;
   11388             386 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11389             386 :   void *argp1 = 0 ;
   11390             386 :   int res1 = 0 ;
   11391             386 :   PyObject * obj0 = 0 ;
   11392             386 :   char *result = 0 ;
   11393                 :   
   11394             386 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetProjection",&obj0)) SWIG_fail;
   11395             386 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11396             386 :   if (!SWIG_IsOK(res1)) {
   11397               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11398                 :   }
   11399             386 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11400                 :   {
   11401             386 :     if ( bUseExceptions ) {
   11402               0 :       CPLErrorReset();
   11403                 :     }
   11404             386 :     result = (char *)GDALDatasetShadow_GetProjection(arg1);
   11405             386 :     if ( bUseExceptions ) {
   11406               0 :       CPLErr eclass = CPLGetLastErrorType();
   11407               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11408               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11409                 :       }
   11410                 :     }
   11411                 :   }
   11412             386 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11413             386 :   return resultobj;
   11414                 : fail:
   11415               0 :   return NULL;
   11416                 : }
   11417                 : 
   11418                 : 
   11419             196 : SWIGINTERN PyObject *_wrap_Dataset_GetProjectionRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11420             196 :   PyObject *resultobj = 0;
   11421             196 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11422             196 :   void *argp1 = 0 ;
   11423             196 :   int res1 = 0 ;
   11424             196 :   PyObject * obj0 = 0 ;
   11425             196 :   char *result = 0 ;
   11426                 :   
   11427             196 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetProjectionRef",&obj0)) SWIG_fail;
   11428             196 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11429             196 :   if (!SWIG_IsOK(res1)) {
   11430               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjectionRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11431                 :   }
   11432             196 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11433                 :   {
   11434             196 :     if ( bUseExceptions ) {
   11435               0 :       CPLErrorReset();
   11436                 :     }
   11437             196 :     result = (char *)GDALDatasetShadow_GetProjectionRef(arg1);
   11438             196 :     if ( bUseExceptions ) {
   11439               0 :       CPLErr eclass = CPLGetLastErrorType();
   11440               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11441               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11442                 :       }
   11443                 :     }
   11444                 :   }
   11445             196 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11446             196 :   return resultobj;
   11447                 : fail:
   11448               0 :   return NULL;
   11449                 : }
   11450                 : 
   11451                 : 
   11452             926 : SWIGINTERN PyObject *_wrap_Dataset_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11453             926 :   PyObject *resultobj = 0;
   11454             926 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11455             926 :   char *arg2 = (char *) 0 ;
   11456             926 :   void *argp1 = 0 ;
   11457             926 :   int res1 = 0 ;
   11458                 :   int res2 ;
   11459             926 :   char *buf2 = 0 ;
   11460             926 :   int alloc2 = 0 ;
   11461             926 :   PyObject * obj0 = 0 ;
   11462             926 :   PyObject * obj1 = 0 ;
   11463                 :   CPLErr result;
   11464                 :   
   11465             926 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_SetProjection",&obj0,&obj1)) SWIG_fail;
   11466             926 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11467             926 :   if (!SWIG_IsOK(res1)) {
   11468               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11469                 :   }
   11470             926 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11471             926 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   11472             926 :   if (!SWIG_IsOK(res2)) {
   11473               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetProjection" "', argument " "2"" of type '" "char const *""'");
   11474                 :   }
   11475             926 :   arg2 = reinterpret_cast< char * >(buf2);
   11476                 :   {
   11477             926 :     if (!arg2) {
   11478               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11479                 :     }
   11480                 :   }
   11481                 :   {
   11482             926 :     if ( bUseExceptions ) {
   11483               0 :       CPLErrorReset();
   11484                 :     }
   11485             926 :     result = (CPLErr)GDALDatasetShadow_SetProjection(arg1,(char const *)arg2);
   11486             926 :     if ( bUseExceptions ) {
   11487               0 :       CPLErr eclass = CPLGetLastErrorType();
   11488               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11489               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11490                 :       }
   11491                 :     }
   11492                 :   }
   11493            1852 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11494             926 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11495                 :   {
   11496                 :     /* %typemap(ret) CPLErr */
   11497             926 :     if ( bUseExceptions == 0 ) {
   11498                 :       /* We're not using exceptions.  And no error has occurred */
   11499             926 :       if ( resultobj == 0 ) {
   11500                 :         /* No other return values set so return ErrorCode */
   11501               0 :         resultobj = PyInt_FromLong(result);
   11502                 :       }
   11503                 :     }
   11504                 :   }
   11505             926 :   return resultobj;
   11506                 : fail:
   11507               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11508               0 :   return NULL;
   11509                 : }
   11510                 : 
   11511                 : 
   11512            1113 : SWIGINTERN PyObject *_wrap_Dataset_GetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11513            1113 :   PyObject *resultobj = 0;
   11514            1113 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11515                 :   double *arg2 ;
   11516            1113 :   int *arg3 = (int *) 0 ;
   11517            1113 :   int *arg4 = (int *) 0 ;
   11518            1113 :   void *argp1 = 0 ;
   11519            1113 :   int res1 = 0 ;
   11520                 :   double argout2[6] ;
   11521                 :   int isvalid2 ;
   11522                 :   int val4 ;
   11523            1113 :   PyObject * obj0 = 0 ;
   11524            1113 :   PyObject * obj1 = 0 ;
   11525                 :   char *  kwnames[] = {
   11526                 :     (char *) "self",(char *) "can_return_null", NULL 
   11527            1113 :   };
   11528                 :   
   11529                 :   {
   11530                 :     /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
   11531            1113 :     arg2 = argout2;
   11532            1113 :     arg3 = &isvalid2;
   11533                 :   }
   11534            1113 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Dataset_GetGeoTransform",kwnames,&obj0,&obj1)) SWIG_fail;
   11535            1113 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11536            1113 :   if (!SWIG_IsOK(res1)) {
   11537               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11538                 :   }
   11539            1113 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11540            1113 :   if (obj1) {
   11541                 :     {
   11542                 :       /* %typemap(in) (int *optional_##int) */
   11543             102 :       if ( obj1 == Py_None ) {
   11544               0 :         arg4 = 0;
   11545                 :       }
   11546             102 :       else if ( PyArg_Parse( obj1,"i" ,&val4 ) ) {
   11547             102 :         arg4 = (int *) &val4;
   11548                 :       }
   11549                 :       else {
   11550               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   11551               0 :         SWIG_fail;
   11552                 :       }
   11553                 :     }
   11554                 :   }
   11555                 :   {
   11556            1113 :     if ( bUseExceptions ) {
   11557               0 :       CPLErrorReset();
   11558                 :     }
   11559                 :     GDALDatasetShadow_GetGeoTransform(arg1,arg2,arg3,arg4);
   11560            1113 :     if ( bUseExceptions ) {
   11561               0 :       CPLErr eclass = CPLGetLastErrorType();
   11562               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11563               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11564                 :       }
   11565                 :     }
   11566                 :   }
   11567            1113 :   resultobj = SWIG_Py_Void();
   11568                 :   {
   11569                 :     /* %typemap(argout) (double argout[6], int* isvalid)  */
   11570                 :     PyObject *r;
   11571            1113 :     if ( !*arg3 ) {
   11572              24 :       Py_INCREF(Py_None);
   11573              24 :       r = Py_None;
   11574                 :     }
   11575                 :     else {
   11576            1089 :       r = CreateTupleFromDoubleArray(arg2, 6);
   11577                 :     }
   11578            1113 :     resultobj = t_output_helper(resultobj,r);
   11579                 :   }
   11580            1113 :   return resultobj;
   11581                 : fail:
   11582               0 :   return NULL;
   11583                 : }
   11584                 : 
   11585                 : 
   11586             910 : SWIGINTERN PyObject *_wrap_Dataset_SetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11587             910 :   PyObject *resultobj = 0;
   11588             910 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11589                 :   double *arg2 ;
   11590             910 :   void *argp1 = 0 ;
   11591             910 :   int res1 = 0 ;
   11592                 :   double argin2[6] ;
   11593             910 :   PyObject * obj0 = 0 ;
   11594             910 :   PyObject * obj1 = 0 ;
   11595                 :   CPLErr result;
   11596                 :   
   11597             910 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_SetGeoTransform",&obj0,&obj1)) SWIG_fail;
   11598             910 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11599             910 :   if (!SWIG_IsOK(res1)) {
   11600               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11601                 :   }
   11602             910 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11603                 :   {
   11604                 :     /* %typemap(in) (double argin2[ANY]) */
   11605             910 :     arg2 = argin2;
   11606             910 :     if (! PySequence_Check(obj1) ) {
   11607               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   11608               0 :       SWIG_fail;
   11609                 :     }
   11610             910 :     int seq_size = PySequence_Size(obj1);
   11611             910 :     if ( seq_size != 6 ) {
   11612               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   11613               0 :       SWIG_fail;
   11614                 :     }
   11615            6370 :     for (unsigned int i=0; i<6; i++) {
   11616            5460 :       PyObject *o = PySequence_GetItem(obj1,i);
   11617                 :       double val;
   11618            5460 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   11619               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   11620               0 :         Py_DECREF(o);
   11621                 :         SWIG_fail;
   11622                 :       }
   11623            5460 :       arg2[i] =  val;
   11624            5460 :       Py_DECREF(o);
   11625                 :     }
   11626                 :   }
   11627                 :   {
   11628             910 :     if ( bUseExceptions ) {
   11629               0 :       CPLErrorReset();
   11630                 :     }
   11631             910 :     result = (CPLErr)GDALDatasetShadow_SetGeoTransform(arg1,arg2);
   11632             910 :     if ( bUseExceptions ) {
   11633               0 :       CPLErr eclass = CPLGetLastErrorType();
   11634               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11635               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11636                 :       }
   11637                 :     }
   11638                 :   }
   11639            1820 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11640                 :   {
   11641                 :     /* %typemap(ret) CPLErr */
   11642             910 :     if ( bUseExceptions == 0 ) {
   11643                 :       /* We're not using exceptions.  And no error has occurred */
   11644             910 :       if ( resultobj == 0 ) {
   11645                 :         /* No other return values set so return ErrorCode */
   11646               0 :         resultobj = PyInt_FromLong(result);
   11647                 :       }
   11648                 :     }
   11649                 :   }
   11650             910 :   return resultobj;
   11651                 : fail:
   11652               0 :   return NULL;
   11653                 : }
   11654                 : 
   11655                 : 
   11656             180 : SWIGINTERN PyObject *_wrap_Dataset_BuildOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11657             180 :   PyObject *resultobj = 0;
   11658             180 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11659             180 :   char *arg2 = (char *) "NEAREST" ;
   11660             180 :   int arg3 = (int) 0 ;
   11661             180 :   int *arg4 = (int *) 0 ;
   11662             180 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   11663             180 :   void *arg6 = (void *) NULL ;
   11664             180 :   void *argp1 = 0 ;
   11665             180 :   int res1 = 0 ;
   11666                 :   int res2 ;
   11667             180 :   char *buf2 = 0 ;
   11668             180 :   int alloc2 = 0 ;
   11669             180 :   PyObject * obj0 = 0 ;
   11670             180 :   PyObject * obj1 = 0 ;
   11671             180 :   PyObject * obj2 = 0 ;
   11672             180 :   PyObject * obj3 = 0 ;
   11673             180 :   PyObject * obj4 = 0 ;
   11674                 :   char *  kwnames[] = {
   11675                 :     (char *) "self",(char *) "resampling",(char *) "overviewlist",(char *) "callback",(char *) "callback_data", NULL 
   11676             180 :   };
   11677                 :   int result;
   11678                 :   
   11679                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   11680                 :   PyProgressData *psProgressInfo;
   11681             180 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   11682             180 :   psProgressInfo->nLastReported = -1;
   11683             180 :   psProgressInfo->psPyCallback = NULL;
   11684             180 :   psProgressInfo->psPyCallbackData = NULL;
   11685             180 :   arg6 = psProgressInfo;
   11686             180 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOO:Dataset_BuildOverviews",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   11687             180 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11688             180 :   if (!SWIG_IsOK(res1)) {
   11689               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BuildOverviews" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11690                 :   }
   11691             180 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11692             180 :   if (obj1) {
   11693             146 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   11694             146 :     if (!SWIG_IsOK(res2)) {
   11695               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_BuildOverviews" "', argument " "2"" of type '" "char const *""'");
   11696                 :     }
   11697             146 :     arg2 = reinterpret_cast< char * >(buf2);
   11698                 :   }
   11699             180 :   if (obj2) {
   11700                 :     {
   11701                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   11702                 :       /* check if is List */
   11703             180 :       if ( !PySequence_Check(obj2) ) {
   11704               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   11705               0 :         SWIG_fail;
   11706                 :       }
   11707             180 :       arg3 = PySequence_Size(obj2);
   11708             180 :       arg4 = (int*) malloc(arg3*sizeof(int));
   11709             430 :       for( int i = 0; i<arg3; i++ ) {
   11710             250 :         PyObject *o = PySequence_GetItem(obj2,i);
   11711             250 :         if ( !PyArg_Parse(o,"i",&arg4[i]) ) {
   11712               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   11713               0 :           Py_DECREF(o);
   11714                 :           SWIG_fail;
   11715                 :         }
   11716             250 :         Py_DECREF(o);
   11717                 :       }
   11718                 :     }
   11719                 :   }
   11720             180 :   if (obj3) {
   11721                 :     {
   11722                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   11723                 :       /* callback_func typemap */
   11724               0 :       if (obj3 && obj3 != Py_None ) {
   11725               0 :         void* cbfunction = NULL;
   11726                 :         SWIG_ConvertPtr( obj3, 
   11727                 :           (void**)&cbfunction,
   11728                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   11729               0 :           SWIG_POINTER_EXCEPTION | 0 );
   11730                 :         
   11731               0 :         if ( cbfunction == GDALTermProgress ) {
   11732               0 :           arg5 = GDALTermProgress;
   11733                 :         } else {
   11734               0 :           if (!PyCallable_Check(obj3)) {
   11735                 :             PyErr_SetString( PyExc_RuntimeError, 
   11736               0 :               "Object given is not a Python function" );
   11737               0 :             SWIG_fail;
   11738                 :           }
   11739               0 :           psProgressInfo->psPyCallback = obj3;
   11740               0 :           arg5 = PyProgressProxy;
   11741                 :         }
   11742                 :         
   11743                 :       }
   11744                 :       
   11745                 :     }
   11746                 :   }
   11747             180 :   if (obj4) {
   11748                 :     {
   11749                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   11750               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   11751                 :     }
   11752                 :   }
   11753                 :   {
   11754             180 :     if ( bUseExceptions ) {
   11755               0 :       CPLErrorReset();
   11756                 :     }
   11757             180 :     result = (int)GDALDatasetShadow_BuildOverviews(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   11758             180 :     if ( bUseExceptions ) {
   11759               0 :       CPLErr eclass = CPLGetLastErrorType();
   11760               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11761               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11762                 :       }
   11763                 :     }
   11764                 :   }
   11765             180 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11766             180 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11767                 :   {
   11768                 :     /* %typemap(freearg) (int nList, int* pList) */
   11769             180 :     if (arg4) {
   11770             180 :       free((void*) arg4);
   11771                 :     }
   11772                 :   }
   11773                 :   {
   11774                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   11775                 :     
   11776             180 :     CPLFree(psProgressInfo);
   11777                 :     
   11778                 :   }
   11779             180 :   return resultobj;
   11780                 : fail:
   11781               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11782                 :   {
   11783                 :     /* %typemap(freearg) (int nList, int* pList) */
   11784               0 :     if (arg4) {
   11785               0 :       free((void*) arg4);
   11786                 :     }
   11787                 :   }
   11788                 :   {
   11789                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   11790                 :     
   11791               0 :     CPLFree(psProgressInfo);
   11792                 :     
   11793                 :   }
   11794               0 :   return NULL;
   11795                 : }
   11796                 : 
   11797                 : 
   11798              32 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11799              32 :   PyObject *resultobj = 0;
   11800              32 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11801              32 :   void *argp1 = 0 ;
   11802              32 :   int res1 = 0 ;
   11803              32 :   PyObject * obj0 = 0 ;
   11804                 :   int result;
   11805                 :   
   11806              32 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPCount",&obj0)) SWIG_fail;
   11807              32 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11808              32 :   if (!SWIG_IsOK(res1)) {
   11809               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11810                 :   }
   11811              32 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11812                 :   {
   11813              32 :     if ( bUseExceptions ) {
   11814               0 :       CPLErrorReset();
   11815                 :     }
   11816              32 :     result = (int)GDALDatasetShadow_GetGCPCount(arg1);
   11817              32 :     if ( bUseExceptions ) {
   11818               0 :       CPLErr eclass = CPLGetLastErrorType();
   11819               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11820               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11821                 :       }
   11822                 :     }
   11823                 :   }
   11824              32 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11825              32 :   return resultobj;
   11826                 : fail:
   11827               0 :   return NULL;
   11828                 : }
   11829                 : 
   11830                 : 
   11831              26 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11832              26 :   PyObject *resultobj = 0;
   11833              26 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11834              26 :   void *argp1 = 0 ;
   11835              26 :   int res1 = 0 ;
   11836              26 :   PyObject * obj0 = 0 ;
   11837              26 :   char *result = 0 ;
   11838                 :   
   11839              26 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPProjection",&obj0)) SWIG_fail;
   11840              26 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11841              26 :   if (!SWIG_IsOK(res1)) {
   11842               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11843                 :   }
   11844              26 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11845                 :   {
   11846              26 :     if ( bUseExceptions ) {
   11847               0 :       CPLErrorReset();
   11848                 :     }
   11849              26 :     result = (char *)GDALDatasetShadow_GetGCPProjection(arg1);
   11850              26 :     if ( bUseExceptions ) {
   11851               0 :       CPLErr eclass = CPLGetLastErrorType();
   11852               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11853               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11854                 :       }
   11855                 :     }
   11856                 :   }
   11857              26 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11858              26 :   return resultobj;
   11859                 : fail:
   11860               0 :   return NULL;
   11861                 : }
   11862                 : 
   11863                 : 
   11864              47 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11865              47 :   PyObject *resultobj = 0;
   11866              47 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11867              47 :   int *arg2 = (int *) 0 ;
   11868              47 :   GDAL_GCP **arg3 = (GDAL_GCP **) 0 ;
   11869              47 :   void *argp1 = 0 ;
   11870              47 :   int res1 = 0 ;
   11871              47 :   int nGCPs2 = 0 ;
   11872              47 :   GDAL_GCP *pGCPs2 = 0 ;
   11873              47 :   PyObject * obj0 = 0 ;
   11874                 :   
   11875                 :   {
   11876                 :     /* %typemap(in,numinputs=0) (int *nGCPs2, GDAL_GCP const **pGCPs2 ) */
   11877              47 :     arg2 = &nGCPs2;
   11878              47 :     arg3 = &pGCPs2;
   11879                 :   }
   11880              47 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPs",&obj0)) SWIG_fail;
   11881              47 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11882              47 :   if (!SWIG_IsOK(res1)) {
   11883               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11884                 :   }
   11885              47 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11886                 :   {
   11887              47 :     if ( bUseExceptions ) {
   11888               0 :       CPLErrorReset();
   11889                 :     }
   11890                 :     GDALDatasetShadow_GetGCPs(arg1,arg2,(GDAL_GCP const **)arg3);
   11891              47 :     if ( bUseExceptions ) {
   11892               0 :       CPLErr eclass = CPLGetLastErrorType();
   11893               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11894               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11895                 :       }
   11896                 :     }
   11897                 :   }
   11898              47 :   resultobj = SWIG_Py_Void();
   11899                 :   {
   11900                 :     /* %typemap(argout) (int *nGCPs, GDAL_GCP const **pGCPs ) */
   11901              47 :     PyObject *dict = PyTuple_New( *arg2 );
   11902            5597 :     for( int i = 0; i < *arg2; i++ ) {
   11903            5550 :       GDAL_GCP *o = new_GDAL_GCP( (*arg3)[i].dfGCPX,
   11904            5550 :         (*arg3)[i].dfGCPY,
   11905            5550 :         (*arg3)[i].dfGCPZ,
   11906            5550 :         (*arg3)[i].dfGCPPixel,
   11907            5550 :         (*arg3)[i].dfGCPLine,
   11908            5550 :         (*arg3)[i].pszInfo,
   11909           38850 :         (*arg3)[i].pszId );
   11910                 :       
   11911                 :       PyTuple_SetItem(dict, i, 
   11912            5550 :         SWIG_NewPointerObj((void*)o,SWIGTYPE_p_GDAL_GCP,1) );
   11913                 :     }
   11914              47 :     Py_DECREF(resultobj);
   11915              47 :     resultobj = dict;
   11916                 :   }
   11917              47 :   return resultobj;
   11918                 : fail:
   11919               0 :   return NULL;
   11920                 : }
   11921                 : 
   11922                 : 
   11923              11 : SWIGINTERN PyObject *_wrap_Dataset_SetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11924              11 :   PyObject *resultobj = 0;
   11925              11 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11926                 :   int arg2 ;
   11927              11 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   11928              11 :   char *arg4 = (char *) 0 ;
   11929              11 :   void *argp1 = 0 ;
   11930              11 :   int res1 = 0 ;
   11931                 :   GDAL_GCP *tmpGCPList2 ;
   11932                 :   int res4 ;
   11933              11 :   char *buf4 = 0 ;
   11934              11 :   int alloc4 = 0 ;
   11935              11 :   PyObject * obj0 = 0 ;
   11936              11 :   PyObject * obj1 = 0 ;
   11937              11 :   PyObject * obj2 = 0 ;
   11938                 :   CPLErr result;
   11939                 :   
   11940              11 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Dataset_SetGCPs",&obj0,&obj1,&obj2)) SWIG_fail;
   11941              11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11942              11 :   if (!SWIG_IsOK(res1)) {
   11943               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11944                 :   }
   11945              11 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11946                 :   {
   11947                 :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   11948                 :     /* check if is List */
   11949              11 :     if ( !PySequence_Check(obj1) ) {
   11950               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   11951               0 :       SWIG_fail;
   11952                 :     }
   11953              11 :     arg2 = PySequence_Size(obj1);
   11954              11 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   11955              11 :     arg3 = tmpGCPList2;
   11956              42 :     for( int i = 0; i<arg2; i++ ) {
   11957              31 :       PyObject *o = PySequence_GetItem(obj1,i);
   11958              31 :       GDAL_GCP *item = 0;
   11959              31 :       SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 );
   11960              31 :       if ( ! item ) {
   11961               0 :         Py_DECREF(o);
   11962                 :         SWIG_fail;
   11963                 :       }
   11964              31 :       memcpy( (void*) tmpGCPList2, (void*) item, sizeof( GDAL_GCP ) );
   11965              31 :       ++tmpGCPList2;
   11966              31 :       Py_DECREF(o);
   11967                 :     }
   11968                 :   }
   11969              11 :   res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
   11970              11 :   if (!SWIG_IsOK(res4)) {
   11971               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_SetGCPs" "', argument " "4"" of type '" "char const *""'");
   11972                 :   }
   11973              11 :   arg4 = reinterpret_cast< char * >(buf4);
   11974                 :   {
   11975              11 :     if ( bUseExceptions ) {
   11976               0 :       CPLErrorReset();
   11977                 :     }
   11978              11 :     result = (CPLErr)GDALDatasetShadow_SetGCPs(arg1,arg2,(GDAL_GCP const *)arg3,(char const *)arg4);
   11979              11 :     if ( bUseExceptions ) {
   11980               0 :       CPLErr eclass = CPLGetLastErrorType();
   11981               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11982               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11983                 :       }
   11984                 :     }
   11985                 :   }
   11986              22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11987                 :   {
   11988                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   11989              11 :     if (arg3) {
   11990              11 :       free( (void*) arg3 );
   11991                 :     }
   11992                 :   }
   11993              11 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   11994                 :   {
   11995                 :     /* %typemap(ret) CPLErr */
   11996              11 :     if ( bUseExceptions == 0 ) {
   11997                 :       /* We're not using exceptions.  And no error has occurred */
   11998              11 :       if ( resultobj == 0 ) {
   11999                 :         /* No other return values set so return ErrorCode */
   12000               0 :         resultobj = PyInt_FromLong(result);
   12001                 :       }
   12002                 :     }
   12003                 :   }
   12004              11 :   return resultobj;
   12005                 : fail:
   12006                 :   {
   12007                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   12008               0 :     if (arg3) {
   12009               0 :       free( (void*) arg3 );
   12010                 :     }
   12011                 :   }
   12012               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   12013               0 :   return NULL;
   12014                 : }
   12015                 : 
   12016                 : 
   12017              21 : SWIGINTERN PyObject *_wrap_Dataset_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12018              21 :   PyObject *resultobj = 0;
   12019              21 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12020              21 :   void *argp1 = 0 ;
   12021              21 :   int res1 = 0 ;
   12022              21 :   PyObject * obj0 = 0 ;
   12023                 :   
   12024              21 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_FlushCache",&obj0)) SWIG_fail;
   12025              21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12026              21 :   if (!SWIG_IsOK(res1)) {
   12027               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_FlushCache" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12028                 :   }
   12029              21 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12030                 :   {
   12031              21 :     if ( bUseExceptions ) {
   12032               0 :       CPLErrorReset();
   12033                 :     }
   12034                 :     GDALDatasetShadow_FlushCache(arg1);
   12035              21 :     if ( bUseExceptions ) {
   12036               0 :       CPLErr eclass = CPLGetLastErrorType();
   12037               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12038               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12039                 :       }
   12040                 :     }
   12041                 :   }
   12042              21 :   resultobj = SWIG_Py_Void();
   12043              21 :   return resultobj;
   12044                 : fail:
   12045               0 :   return NULL;
   12046                 : }
   12047                 : 
   12048                 : 
   12049              11 : SWIGINTERN PyObject *_wrap_Dataset_AddBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12050              11 :   PyObject *resultobj = 0;
   12051              11 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12052              11 :   GDALDataType arg2 = (GDALDataType) GDT_Byte ;
   12053              11 :   char **arg3 = (char **) 0 ;
   12054              11 :   void *argp1 = 0 ;
   12055              11 :   int res1 = 0 ;
   12056                 :   int val2 ;
   12057              11 :   int ecode2 = 0 ;
   12058              11 :   PyObject * obj0 = 0 ;
   12059              11 :   PyObject * obj1 = 0 ;
   12060              11 :   PyObject * obj2 = 0 ;
   12061                 :   char *  kwnames[] = {
   12062                 :     (char *) "self",(char *) "datatype",(char *) "options", NULL 
   12063              11 :   };
   12064                 :   CPLErr result;
   12065                 :   
   12066              11 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Dataset_AddBand",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   12067              11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12068              11 :   if (!SWIG_IsOK(res1)) {
   12069               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12070                 :   }
   12071              11 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12072              11 :   if (obj1) {
   12073              11 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   12074              11 :     if (!SWIG_IsOK(ecode2)) {
   12075               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_AddBand" "', argument " "2"" of type '" "GDALDataType""'");
   12076                 :     } 
   12077              11 :     arg2 = static_cast< GDALDataType >(val2);
   12078                 :   }
   12079              11 :   if (obj2) {
   12080                 :     {
   12081                 :       /* %typemap(in) char **options */
   12082                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   12083               8 :       if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
   12084                 :   #if PY_VERSION_HEX < 0x03000000
   12085                 :         || PyString_Check(obj2)
   12086                 :   #endif
   12087                 :         ) {
   12088               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   12089               0 :         SWIG_fail;
   12090                 :       }
   12091                 :       
   12092               8 :       int size = PySequence_Size(obj2);
   12093              33 :       for (int i = 0; i < size; i++) {
   12094              25 :         PyObject* pyObj = PySequence_GetItem(obj2,i);
   12095              25 :         if (PyUnicode_Check(pyObj))
   12096                 :         {
   12097                 :           char *pszStr;
   12098                 :           Py_ssize_t nLen;
   12099               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   12100                 : #if PY_VERSION_HEX >= 0x03000000
   12101                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12102                 : #else
   12103               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12104                 : #endif
   12105               0 :           arg3 = CSLAddString( arg3, pszStr );
   12106               0 :           Py_XDECREF(pyUTF8Str);
   12107                 :         }
   12108                 : #if PY_VERSION_HEX >= 0x03000000
   12109                 :         else if (PyBytes_Check(pyObj))
   12110                 :         arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
   12111                 : #else
   12112              25 :         else if (PyString_Check(pyObj))
   12113              25 :         arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
   12114                 : #endif
   12115                 :         else
   12116                 :         {
   12117               0 :           Py_DECREF(pyObj);
   12118               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   12119               0 :           SWIG_fail;
   12120                 :         }
   12121              25 :         Py_DECREF(pyObj);
   12122                 :       }
   12123                 :     }
   12124                 :   }
   12125                 :   {
   12126              11 :     if ( bUseExceptions ) {
   12127               0 :       CPLErrorReset();
   12128                 :     }
   12129              11 :     result = (CPLErr)GDALDatasetShadow_AddBand(arg1,arg2,arg3);
   12130              11 :     if ( bUseExceptions ) {
   12131               0 :       CPLErr eclass = CPLGetLastErrorType();
   12132               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12133               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12134                 :       }
   12135                 :     }
   12136                 :   }
   12137              22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12138                 :   {
   12139                 :     /* %typemap(freearg) char **options */
   12140              11 :     CSLDestroy( arg3 );
   12141                 :   }
   12142                 :   {
   12143                 :     /* %typemap(ret) CPLErr */
   12144              11 :     if ( bUseExceptions == 0 ) {
   12145                 :       /* We're not using exceptions.  And no error has occurred */
   12146              11 :       if ( resultobj == 0 ) {
   12147                 :         /* No other return values set so return ErrorCode */
   12148               0 :         resultobj = PyInt_FromLong(result);
   12149                 :       }
   12150                 :     }
   12151                 :   }
   12152              11 :   return resultobj;
   12153                 : fail:
   12154                 :   {
   12155                 :     /* %typemap(freearg) char **options */
   12156               0 :     CSLDestroy( arg3 );
   12157                 :   }
   12158               0 :   return NULL;
   12159                 : }
   12160                 : 
   12161                 : 
   12162              20 : SWIGINTERN PyObject *_wrap_Dataset_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12163              20 :   PyObject *resultobj = 0;
   12164              20 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12165                 :   int arg2 ;
   12166              20 :   void *argp1 = 0 ;
   12167              20 :   int res1 = 0 ;
   12168                 :   int val2 ;
   12169              20 :   int ecode2 = 0 ;
   12170              20 :   PyObject * obj0 = 0 ;
   12171              20 :   PyObject * obj1 = 0 ;
   12172                 :   CPLErr result;
   12173                 :   
   12174              20 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_CreateMaskBand",&obj0,&obj1)) SWIG_fail;
   12175              20 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12176              20 :   if (!SWIG_IsOK(res1)) {
   12177               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateMaskBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12178                 :   }
   12179              20 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12180              20 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12181              20 :   if (!SWIG_IsOK(ecode2)) {
   12182               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   12183                 :   } 
   12184              20 :   arg2 = static_cast< int >(val2);
   12185                 :   {
   12186              20 :     if ( bUseExceptions ) {
   12187               0 :       CPLErrorReset();
   12188                 :     }
   12189              20 :     result = (CPLErr)GDALDatasetShadow_CreateMaskBand(arg1,arg2);
   12190              20 :     if ( bUseExceptions ) {
   12191               0 :       CPLErr eclass = CPLGetLastErrorType();
   12192               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12193               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12194                 :       }
   12195                 :     }
   12196                 :   }
   12197              40 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12198                 :   {
   12199                 :     /* %typemap(ret) CPLErr */
   12200              20 :     if ( bUseExceptions == 0 ) {
   12201                 :       /* We're not using exceptions.  And no error has occurred */
   12202              20 :       if ( resultobj == 0 ) {
   12203                 :         /* No other return values set so return ErrorCode */
   12204               0 :         resultobj = PyInt_FromLong(result);
   12205                 :       }
   12206                 :     }
   12207                 :   }
   12208              20 :   return resultobj;
   12209                 : fail:
   12210               0 :   return NULL;
   12211                 : }
   12212                 : 
   12213                 : 
   12214              39 : SWIGINTERN PyObject *_wrap_Dataset_GetFileList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12215              39 :   PyObject *resultobj = 0;
   12216              39 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12217              39 :   void *argp1 = 0 ;
   12218              39 :   int res1 = 0 ;
   12219              39 :   PyObject * obj0 = 0 ;
   12220              39 :   char **result = 0 ;
   12221                 :   
   12222              39 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetFileList",&obj0)) SWIG_fail;
   12223              39 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12224              39 :   if (!SWIG_IsOK(res1)) {
   12225               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFileList" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12226                 :   }
   12227              39 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12228                 :   {
   12229              39 :     if ( bUseExceptions ) {
   12230               0 :       CPLErrorReset();
   12231                 :     }
   12232              39 :     result = (char **)GDALDatasetShadow_GetFileList(arg1);
   12233              39 :     if ( bUseExceptions ) {
   12234               0 :       CPLErr eclass = CPLGetLastErrorType();
   12235               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12236               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12237                 :       }
   12238                 :     }
   12239                 :   }
   12240                 :   {
   12241                 :     /* %typemap(out) char **CSL -> ( string ) */
   12242              39 :     char **stringarray = result;
   12243              39 :     if ( stringarray == NULL ) {
   12244               0 :       resultobj = Py_None;
   12245               0 :       Py_INCREF( resultobj );
   12246                 :     }
   12247                 :     else {
   12248              39 :       int len = CSLCount( stringarray );
   12249              39 :       resultobj = PyList_New( len );
   12250             112 :       for ( int i = 0; i < len; ++i ) {
   12251              73 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   12252              73 :         PyList_SetItem(resultobj, i, o );
   12253                 :       }
   12254                 :     }
   12255              39 :     CSLDestroy(result);
   12256                 :   }
   12257              39 :   return resultobj;
   12258                 : fail:
   12259               0 :   return NULL;
   12260                 : }
   12261                 : 
   12262                 : 
   12263          170105 : SWIGINTERN PyObject *_wrap_Dataset_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12264          170105 :   PyObject *resultobj = 0;
   12265          170105 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12266                 :   int arg2 ;
   12267                 :   int arg3 ;
   12268                 :   int arg4 ;
   12269                 :   int arg5 ;
   12270                 :   GIntBig arg6 ;
   12271          170105 :   char *arg7 = (char *) 0 ;
   12272          170105 :   int *arg8 = (int *) 0 ;
   12273          170105 :   int *arg9 = (int *) 0 ;
   12274          170105 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   12275          170105 :   int arg11 = (int) 0 ;
   12276          170105 :   int *arg12 = (int *) 0 ;
   12277          170105 :   int *arg13 = (int *) 0 ;
   12278          170105 :   int *arg14 = (int *) 0 ;
   12279          170105 :   int *arg15 = (int *) 0 ;
   12280          170105 :   void *argp1 = 0 ;
   12281          170105 :   int res1 = 0 ;
   12282                 :   int val2 ;
   12283          170105 :   int ecode2 = 0 ;
   12284                 :   int val3 ;
   12285          170105 :   int ecode3 = 0 ;
   12286                 :   int val4 ;
   12287          170105 :   int ecode4 = 0 ;
   12288                 :   int val5 ;
   12289          170105 :   int ecode5 = 0 ;
   12290          170105 :   int alloc6 = 0 ;
   12291                 :   int val8 ;
   12292                 :   int val9 ;
   12293                 :   int val10 ;
   12294                 :   int val13 ;
   12295                 :   int val14 ;
   12296                 :   int val15 ;
   12297          170105 :   PyObject * obj0 = 0 ;
   12298          170105 :   PyObject * obj1 = 0 ;
   12299          170105 :   PyObject * obj2 = 0 ;
   12300          170105 :   PyObject * obj3 = 0 ;
   12301          170105 :   PyObject * obj4 = 0 ;
   12302          170105 :   PyObject * obj5 = 0 ;
   12303          170105 :   PyObject * obj6 = 0 ;
   12304          170105 :   PyObject * obj7 = 0 ;
   12305          170105 :   PyObject * obj8 = 0 ;
   12306          170105 :   PyObject * obj9 = 0 ;
   12307          170105 :   PyObject * obj10 = 0 ;
   12308          170105 :   PyObject * obj11 = 0 ;
   12309          170105 :   PyObject * obj12 = 0 ;
   12310                 :   char *  kwnames[] = {
   12311                 :     (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 
   12312          170105 :   };
   12313                 :   CPLErr result;
   12314                 :   
   12315          170105 :   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;
   12316          170105 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12317          170105 :   if (!SWIG_IsOK(res1)) {
   12318               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_WriteRaster" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12319                 :   }
   12320          170105 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12321          170105 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12322          170105 :   if (!SWIG_IsOK(ecode2)) {
   12323               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_WriteRaster" "', argument " "2"" of type '" "int""'");
   12324                 :   } 
   12325          170105 :   arg2 = static_cast< int >(val2);
   12326          170105 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   12327          170105 :   if (!SWIG_IsOK(ecode3)) {
   12328               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_WriteRaster" "', argument " "3"" of type '" "int""'");
   12329                 :   } 
   12330          170105 :   arg3 = static_cast< int >(val3);
   12331          170105 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   12332          170105 :   if (!SWIG_IsOK(ecode4)) {
   12333               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_WriteRaster" "', argument " "4"" of type '" "int""'");
   12334                 :   } 
   12335          170105 :   arg4 = static_cast< int >(val4);
   12336          170105 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   12337          170105 :   if (!SWIG_IsOK(ecode5)) {
   12338               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_WriteRaster" "', argument " "5"" of type '" "int""'");
   12339                 :   } 
   12340          170105 :   arg5 = static_cast< int >(val5);
   12341                 :   {
   12342                 :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   12343                 : #if PY_VERSION_HEX>=0x03000000
   12344                 :     if (PyUnicode_Check(obj5))
   12345                 :     {
   12346                 :       size_t safeLen = 0;
   12347                 :       int ret = SWIG_AsCharPtrAndSize(obj5, (char**) &arg7, &safeLen, &alloc6);
   12348                 :       if (!SWIG_IsOK(ret)) {
   12349                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
   12350                 :       }
   12351                 :       
   12352                 :       if (safeLen) safeLen--;
   12353                 :       arg6 = (GIntBig) safeLen;
   12354                 :     }
   12355                 :     else if (PyBytes_Check(obj5))
   12356                 :     {
   12357                 :       Py_ssize_t safeLen = 0;
   12358                 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12359                 :       arg6 = (GIntBig) safeLen;
   12360                 :     }
   12361                 :     else
   12362                 :     {
   12363                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
   12364                 :       SWIG_fail;
   12365                 :     }
   12366                 : #else
   12367          170105 :     if (PyString_Check(obj5))
   12368                 :     {
   12369          170104 :       Py_ssize_t safeLen = 0;
   12370          170104 :       PyString_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12371          170104 :       arg6 = (GIntBig) safeLen;
   12372                 :     }
   12373                 :     else
   12374                 :     {
   12375               1 :       PyErr_SetString(PyExc_TypeError, "not a string");
   12376               1 :       SWIG_fail;
   12377                 :     }
   12378                 : #endif
   12379                 :   }
   12380          170104 :   if (obj6) {
   12381                 :     {
   12382                 :       /* %typemap(in) (int *optional_##int) */
   12383          170104 :       if ( obj6 == Py_None ) {
   12384               0 :         arg8 = 0;
   12385                 :       }
   12386          170104 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   12387          170104 :         arg8 = (int *) &val8;
   12388                 :       }
   12389                 :       else {
   12390               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12391               0 :         SWIG_fail;
   12392                 :       }
   12393                 :     }
   12394                 :   }
   12395          170104 :   if (obj7) {
   12396                 :     {
   12397                 :       /* %typemap(in) (int *optional_##int) */
   12398          170104 :       if ( obj7 == Py_None ) {
   12399               0 :         arg9 = 0;
   12400                 :       }
   12401          170104 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   12402          170104 :         arg9 = (int *) &val9;
   12403                 :       }
   12404                 :       else {
   12405               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12406               0 :         SWIG_fail;
   12407                 :       }
   12408                 :     }
   12409                 :   }
   12410          170104 :   if (obj8) {
   12411                 :     {
   12412                 :       /* %typemap(in) (int *optional_##int) */
   12413          170104 :       if ( obj8 == Py_None ) {
   12414               0 :         arg10 = 0;
   12415                 :       }
   12416          170104 :       else if ( PyArg_Parse( obj8,"i" ,&val10 ) ) {
   12417          170104 :         arg10 = (GDALDataType *) &val10;
   12418                 :       }
   12419                 :       else {
   12420               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12421               0 :         SWIG_fail;
   12422                 :       }
   12423                 :     }
   12424                 :   }
   12425          170104 :   if (obj9) {
   12426                 :     {
   12427                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   12428                 :       /* check if is List */
   12429          170104 :       if ( !PySequence_Check(obj9) ) {
   12430               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   12431               0 :         SWIG_fail;
   12432                 :       }
   12433          170104 :       arg11 = PySequence_Size(obj9);
   12434          170104 :       arg12 = (int*) malloc(arg11*sizeof(int));
   12435          341617 :       for( int i = 0; i<arg11; i++ ) {
   12436          171513 :         PyObject *o = PySequence_GetItem(obj9,i);
   12437          171513 :         if ( !PyArg_Parse(o,"i",&arg12[i]) ) {
   12438               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   12439               0 :           Py_DECREF(o);
   12440                 :           SWIG_fail;
   12441                 :         }
   12442          171513 :         Py_DECREF(o);
   12443                 :       }
   12444                 :     }
   12445                 :   }
   12446          170104 :   if (obj10) {
   12447                 :     {
   12448                 :       /* %typemap(in) (int *optional_##int) */
   12449          170104 :       if ( obj10 == Py_None ) {
   12450          170104 :         arg13 = 0;
   12451                 :       }
   12452               0 :       else if ( PyArg_Parse( obj10,"i" ,&val13 ) ) {
   12453               0 :         arg13 = (int *) &val13;
   12454                 :       }
   12455                 :       else {
   12456               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12457               0 :         SWIG_fail;
   12458                 :       }
   12459                 :     }
   12460                 :   }
   12461          170104 :   if (obj11) {
   12462                 :     {
   12463                 :       /* %typemap(in) (int *optional_##int) */
   12464          170104 :       if ( obj11 == Py_None ) {
   12465          170104 :         arg14 = 0;
   12466                 :       }
   12467               0 :       else if ( PyArg_Parse( obj11,"i" ,&val14 ) ) {
   12468               0 :         arg14 = (int *) &val14;
   12469                 :       }
   12470                 :       else {
   12471               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12472               0 :         SWIG_fail;
   12473                 :       }
   12474                 :     }
   12475                 :   }
   12476          170104 :   if (obj12) {
   12477                 :     {
   12478                 :       /* %typemap(in) (int *optional_##int) */
   12479          170104 :       if ( obj12 == Py_None ) {
   12480          170104 :         arg15 = 0;
   12481                 :       }
   12482               0 :       else if ( PyArg_Parse( obj12,"i" ,&val15 ) ) {
   12483               0 :         arg15 = (int *) &val15;
   12484                 :       }
   12485                 :       else {
   12486               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12487               0 :         SWIG_fail;
   12488                 :       }
   12489                 :     }
   12490                 :   }
   12491                 :   {
   12492          170104 :     if ( bUseExceptions ) {
   12493               0 :       CPLErrorReset();
   12494                 :     }
   12495          170104 :     result = (CPLErr)GDALDatasetShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   12496          170104 :     if ( bUseExceptions ) {
   12497               0 :       CPLErr eclass = CPLGetLastErrorType();
   12498               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12499               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12500                 :       }
   12501                 :     }
   12502                 :   }
   12503          340208 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12504                 :   {
   12505                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   12506          170104 :     if( alloc6 == SWIG_NEWOBJ ) {
   12507               0 :       delete[] arg7;
   12508                 :     }
   12509                 :   }
   12510                 :   {
   12511                 :     /* %typemap(freearg) (int nList, int* pList) */
   12512          170104 :     if (arg12) {
   12513          170104 :       free((void*) arg12);
   12514                 :     }
   12515                 :   }
   12516                 :   {
   12517                 :     /* %typemap(ret) CPLErr */
   12518          170104 :     if ( bUseExceptions == 0 ) {
   12519                 :       /* We're not using exceptions.  And no error has occurred */
   12520          170104 :       if ( resultobj == 0 ) {
   12521                 :         /* No other return values set so return ErrorCode */
   12522               0 :         resultobj = PyInt_FromLong(result);
   12523                 :       }
   12524                 :     }
   12525                 :   }
   12526          170104 :   return resultobj;
   12527                 : fail:
   12528                 :   {
   12529                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   12530               1 :     if( alloc6 == SWIG_NEWOBJ ) {
   12531               0 :       delete[] arg7;
   12532                 :     }
   12533                 :   }
   12534                 :   {
   12535                 :     /* %typemap(freearg) (int nList, int* pList) */
   12536               1 :     if (arg12) {
   12537               0 :       free((void*) arg12);
   12538                 :     }
   12539                 :   }
   12540               1 :   return NULL;
   12541                 : }
   12542                 : 
   12543                 : 
   12544               1 : SWIGINTERN PyObject *_wrap_Dataset_BeginAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12545               1 :   PyObject *resultobj = 0;
   12546               1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12547                 :   int arg2 ;
   12548                 :   int arg3 ;
   12549                 :   int arg4 ;
   12550                 :   int arg5 ;
   12551                 :   int arg6 ;
   12552               1 :   char *arg7 = (char *) 0 ;
   12553               1 :   void *arg8 = (void *) 0 ;
   12554                 :   int arg9 ;
   12555                 :   int arg10 ;
   12556               1 :   GDALDataType arg11 = (GDALDataType) (GDALDataType) 0 ;
   12557               1 :   int arg12 = (int) 0 ;
   12558               1 :   int *arg13 = (int *) 0 ;
   12559               1 :   int arg14 = (int) 0 ;
   12560               1 :   int arg15 = (int) 0 ;
   12561               1 :   int arg16 = (int) 0 ;
   12562               1 :   char **arg17 = (char **) 0 ;
   12563               1 :   void *argp1 = 0 ;
   12564               1 :   int res1 = 0 ;
   12565                 :   int val2 ;
   12566               1 :   int ecode2 = 0 ;
   12567                 :   int val3 ;
   12568               1 :   int ecode3 = 0 ;
   12569                 :   int val4 ;
   12570               1 :   int ecode4 = 0 ;
   12571                 :   int val5 ;
   12572               1 :   int ecode5 = 0 ;
   12573                 :   int val9 ;
   12574               1 :   int ecode9 = 0 ;
   12575                 :   int val10 ;
   12576               1 :   int ecode10 = 0 ;
   12577                 :   int val11 ;
   12578               1 :   int ecode11 = 0 ;
   12579                 :   int val14 ;
   12580               1 :   int ecode14 = 0 ;
   12581                 :   int val15 ;
   12582               1 :   int ecode15 = 0 ;
   12583                 :   int val16 ;
   12584               1 :   int ecode16 = 0 ;
   12585               1 :   PyObject * obj0 = 0 ;
   12586               1 :   PyObject * obj1 = 0 ;
   12587               1 :   PyObject * obj2 = 0 ;
   12588               1 :   PyObject * obj3 = 0 ;
   12589               1 :   PyObject * obj4 = 0 ;
   12590               1 :   PyObject * obj5 = 0 ;
   12591               1 :   PyObject * obj6 = 0 ;
   12592               1 :   PyObject * obj7 = 0 ;
   12593               1 :   PyObject * obj8 = 0 ;
   12594               1 :   PyObject * obj9 = 0 ;
   12595               1 :   PyObject * obj10 = 0 ;
   12596               1 :   PyObject * obj11 = 0 ;
   12597               1 :   PyObject * obj12 = 0 ;
   12598               1 :   PyObject * obj13 = 0 ;
   12599                 :   char *  kwnames[] = {
   12600                 :     (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 
   12601               1 :   };
   12602               1 :   GDALAsyncReaderShadow *result = 0 ;
   12603                 :   
   12604               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;
   12605               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12606               1 :   if (!SWIG_IsOK(res1)) {
   12607               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BeginAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12608                 :   }
   12609               1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12610               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12611               1 :   if (!SWIG_IsOK(ecode2)) {
   12612               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_BeginAsyncReader" "', argument " "2"" of type '" "int""'");
   12613                 :   } 
   12614               1 :   arg2 = static_cast< int >(val2);
   12615               1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   12616               1 :   if (!SWIG_IsOK(ecode3)) {
   12617               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_BeginAsyncReader" "', argument " "3"" of type '" "int""'");
   12618                 :   } 
   12619               1 :   arg3 = static_cast< int >(val3);
   12620               1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   12621               1 :   if (!SWIG_IsOK(ecode4)) {
   12622               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_BeginAsyncReader" "', argument " "4"" of type '" "int""'");
   12623                 :   } 
   12624               1 :   arg4 = static_cast< int >(val4);
   12625               1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   12626               1 :   if (!SWIG_IsOK(ecode5)) {
   12627               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_BeginAsyncReader" "', argument " "5"" of type '" "int""'");
   12628                 :   } 
   12629               1 :   arg5 = static_cast< int >(val5);
   12630                 :   {
   12631                 :     /* %typemap(in,numinputs=1) (int nLenKeepObject, char *pBufKeepObject, void* pyObject) */
   12632                 : #if PY_VERSION_HEX>=0x03000000
   12633                 :     if (PyBytes_Check(obj5))
   12634                 :     {
   12635                 :       Py_ssize_t safeLen = 0;
   12636                 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12637                 :       arg6 = (int) safeLen;
   12638                 :       arg8 = obj5;
   12639                 :     }
   12640                 :     else
   12641                 :     {
   12642                 :       PyErr_SetString(PyExc_TypeError, "not a bytes");
   12643                 :       SWIG_fail;
   12644                 :     }
   12645                 : #else
   12646               1 :     if (PyString_Check(obj5))
   12647                 :     {
   12648               1 :       Py_ssize_t safeLen = 0;
   12649               1 :       PyString_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12650               1 :       arg6 = (int) safeLen;
   12651               1 :       arg8 = obj5;
   12652                 :     }
   12653                 :     else
   12654                 :     {
   12655               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
   12656               0 :       SWIG_fail;
   12657                 :     }
   12658                 : #endif
   12659                 :   }
   12660               1 :   ecode9 = SWIG_AsVal_int(obj6, &val9);
   12661               1 :   if (!SWIG_IsOK(ecode9)) {
   12662               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Dataset_BeginAsyncReader" "', argument " "9"" of type '" "int""'");
   12663                 :   } 
   12664               1 :   arg9 = static_cast< int >(val9);
   12665               1 :   ecode10 = SWIG_AsVal_int(obj7, &val10);
   12666               1 :   if (!SWIG_IsOK(ecode10)) {
   12667               0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Dataset_BeginAsyncReader" "', argument " "10"" of type '" "int""'");
   12668                 :   } 
   12669               1 :   arg10 = static_cast< int >(val10);
   12670               1 :   if (obj8) {
   12671               1 :     ecode11 = SWIG_AsVal_int(obj8, &val11);
   12672               1 :     if (!SWIG_IsOK(ecode11)) {
   12673               0 :       SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Dataset_BeginAsyncReader" "', argument " "11"" of type '" "GDALDataType""'");
   12674                 :     } 
   12675               1 :     arg11 = static_cast< GDALDataType >(val11);
   12676                 :   }
   12677               1 :   if (obj9) {
   12678                 :     {
   12679                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   12680                 :       /* check if is List */
   12681               1 :       if ( !PySequence_Check(obj9) ) {
   12682               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   12683               0 :         SWIG_fail;
   12684                 :       }
   12685               1 :       arg12 = PySequence_Size(obj9);
   12686               1 :       arg13 = (int*) malloc(arg12*sizeof(int));
   12687               4 :       for( int i = 0; i<arg12; i++ ) {
   12688               3 :         PyObject *o = PySequence_GetItem(obj9,i);
   12689               3 :         if ( !PyArg_Parse(o,"i",&arg13[i]) ) {
   12690               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   12691               0 :           Py_DECREF(o);
   12692                 :           SWIG_fail;
   12693                 :         }
   12694               3 :         Py_DECREF(o);
   12695                 :       }
   12696                 :     }
   12697                 :   }
   12698               1 :   if (obj10) {
   12699               1 :     ecode14 = SWIG_AsVal_int(obj10, &val14);
   12700               1 :     if (!SWIG_IsOK(ecode14)) {
   12701               0 :       SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_BeginAsyncReader" "', argument " "14"" of type '" "int""'");
   12702                 :     } 
   12703               1 :     arg14 = static_cast< int >(val14);
   12704                 :   }
   12705               1 :   if (obj11) {
   12706               1 :     ecode15 = SWIG_AsVal_int(obj11, &val15);
   12707               1 :     if (!SWIG_IsOK(ecode15)) {
   12708               0 :       SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "Dataset_BeginAsyncReader" "', argument " "15"" of type '" "int""'");
   12709                 :     } 
   12710               1 :     arg15 = static_cast< int >(val15);
   12711                 :   }
   12712               1 :   if (obj12) {
   12713               1 :     ecode16 = SWIG_AsVal_int(obj12, &val16);
   12714               1 :     if (!SWIG_IsOK(ecode16)) {
   12715               0 :       SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "Dataset_BeginAsyncReader" "', argument " "16"" of type '" "int""'");
   12716                 :     } 
   12717               1 :     arg16 = static_cast< int >(val16);
   12718                 :   }
   12719               1 :   if (obj13) {
   12720                 :     {
   12721                 :       /* %typemap(in) char **options */
   12722                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   12723               1 :       if ( ! PySequence_Check(obj13) || PyUnicode_Check(obj13)
   12724                 :   #if PY_VERSION_HEX < 0x03000000
   12725                 :         || PyString_Check(obj13)
   12726                 :   #endif
   12727                 :         ) {
   12728               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   12729               0 :         SWIG_fail;
   12730                 :       }
   12731                 :       
   12732               1 :       int size = PySequence_Size(obj13);
   12733               1 :       for (int i = 0; i < size; i++) {
   12734               0 :         PyObject* pyObj = PySequence_GetItem(obj13,i);
   12735               0 :         if (PyUnicode_Check(pyObj))
   12736                 :         {
   12737                 :           char *pszStr;
   12738                 :           Py_ssize_t nLen;
   12739               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   12740                 : #if PY_VERSION_HEX >= 0x03000000
   12741                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12742                 : #else
   12743               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12744                 : #endif
   12745               0 :           arg17 = CSLAddString( arg17, pszStr );
   12746               0 :           Py_XDECREF(pyUTF8Str);
   12747                 :         }
   12748                 : #if PY_VERSION_HEX >= 0x03000000
   12749                 :         else if (PyBytes_Check(pyObj))
   12750                 :         arg17 = CSLAddString( arg17, PyBytes_AsString(pyObj) );
   12751                 : #else
   12752               0 :         else if (PyString_Check(pyObj))
   12753               0 :         arg17 = CSLAddString( arg17, PyString_AsString(pyObj) );
   12754                 : #endif
   12755                 :         else
   12756                 :         {
   12757               0 :           Py_DECREF(pyObj);
   12758               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   12759               0 :           SWIG_fail;
   12760                 :         }
   12761               0 :         Py_DECREF(pyObj);
   12762                 :       }
   12763                 :     }
   12764                 :   }
   12765                 :   {
   12766               1 :     if ( bUseExceptions ) {
   12767               0 :       CPLErrorReset();
   12768                 :     }
   12769               1 :     result = (GDALAsyncReaderShadow *)GDALDatasetShadow_BeginAsyncReader(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
   12770               1 :     if ( bUseExceptions ) {
   12771               0 :       CPLErr eclass = CPLGetLastErrorType();
   12772               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12773               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12774                 :       }
   12775                 :     }
   12776                 :   }
   12777               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_OWN |  0 );
   12778                 :   {
   12779                 :     /* %typemap(freearg) (int nList, int* pList) */
   12780               1 :     if (arg13) {
   12781               1 :       free((void*) arg13);
   12782                 :     }
   12783                 :   }
   12784                 :   {
   12785                 :     /* %typemap(freearg) char **options */
   12786               1 :     CSLDestroy( arg17 );
   12787                 :   }
   12788               1 :   return resultobj;
   12789                 : fail:
   12790                 :   {
   12791                 :     /* %typemap(freearg) (int nList, int* pList) */
   12792               0 :     if (arg13) {
   12793               0 :       free((void*) arg13);
   12794                 :     }
   12795                 :   }
   12796                 :   {
   12797                 :     /* %typemap(freearg) char **options */
   12798               0 :     CSLDestroy( arg17 );
   12799                 :   }
   12800               0 :   return NULL;
   12801                 : }
   12802                 : 
   12803                 : 
   12804               1 : SWIGINTERN PyObject *_wrap_Dataset_EndAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12805               1 :   PyObject *resultobj = 0;
   12806               1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12807               1 :   GDALAsyncReaderShadow *arg2 = (GDALAsyncReaderShadow *) 0 ;
   12808               1 :   void *argp1 = 0 ;
   12809               1 :   int res1 = 0 ;
   12810               1 :   void *argp2 = 0 ;
   12811               1 :   int res2 = 0 ;
   12812               1 :   PyObject * obj0 = 0 ;
   12813               1 :   PyObject * obj1 = 0 ;
   12814                 :   
   12815               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_EndAsyncReader",&obj0,&obj1)) SWIG_fail;
   12816               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12817               1 :   if (!SWIG_IsOK(res1)) {
   12818               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_EndAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12819                 :   }
   12820               1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12821               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   12822               1 :   if (!SWIG_IsOK(res2)) {
   12823               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_EndAsyncReader" "', argument " "2"" of type '" "GDALAsyncReaderShadow *""'"); 
   12824                 :   }
   12825               1 :   arg2 = reinterpret_cast< GDALAsyncReaderShadow * >(argp2);
   12826                 :   {
   12827               1 :     if ( bUseExceptions ) {
   12828               0 :       CPLErrorReset();
   12829                 :     }
   12830                 :     GDALDatasetShadow_EndAsyncReader(arg1,arg2);
   12831               1 :     if ( bUseExceptions ) {
   12832               0 :       CPLErr eclass = CPLGetLastErrorType();
   12833               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12834               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12835                 :       }
   12836                 :     }
   12837                 :   }
   12838               1 :   resultobj = SWIG_Py_Void();
   12839               1 :   return resultobj;
   12840                 : fail:
   12841               0 :   return NULL;
   12842                 : }
   12843                 : 
   12844                 : 
   12845          167648 : SWIGINTERN PyObject *_wrap_Dataset_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12846          167648 :   PyObject *resultobj = 0;
   12847          167648 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12848                 :   int arg2 ;
   12849                 :   int arg3 ;
   12850                 :   int arg4 ;
   12851                 :   int arg5 ;
   12852          167648 :   void **arg6 = (void **) 0 ;
   12853          167648 :   int *arg7 = (int *) 0 ;
   12854          167648 :   int *arg8 = (int *) 0 ;
   12855          167648 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   12856          167648 :   int arg10 = (int) 0 ;
   12857          167648 :   int *arg11 = (int *) 0 ;
   12858          167648 :   int *arg12 = (int *) 0 ;
   12859          167648 :   int *arg13 = (int *) 0 ;
   12860          167648 :   int *arg14 = (int *) 0 ;
   12861          167648 :   void *argp1 = 0 ;
   12862          167648 :   int res1 = 0 ;
   12863                 :   int val2 ;
   12864          167648 :   int ecode2 = 0 ;
   12865                 :   int val3 ;
   12866          167648 :   int ecode3 = 0 ;
   12867                 :   int val4 ;
   12868          167648 :   int ecode4 = 0 ;
   12869                 :   int val5 ;
   12870          167648 :   int ecode5 = 0 ;
   12871          167648 :   void *pyObject6 = NULL ;
   12872                 :   int val7 ;
   12873                 :   int val8 ;
   12874                 :   int val9 ;
   12875                 :   int val12 ;
   12876                 :   int val13 ;
   12877                 :   int val14 ;
   12878          167648 :   PyObject * obj0 = 0 ;
   12879          167648 :   PyObject * obj1 = 0 ;
   12880          167648 :   PyObject * obj2 = 0 ;
   12881          167648 :   PyObject * obj3 = 0 ;
   12882          167648 :   PyObject * obj4 = 0 ;
   12883          167648 :   PyObject * obj5 = 0 ;
   12884          167648 :   PyObject * obj6 = 0 ;
   12885          167648 :   PyObject * obj7 = 0 ;
   12886          167648 :   PyObject * obj8 = 0 ;
   12887          167648 :   PyObject * obj9 = 0 ;
   12888          167648 :   PyObject * obj10 = 0 ;
   12889          167648 :   PyObject * obj11 = 0 ;
   12890                 :   char *  kwnames[] = {
   12891                 :     (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 
   12892          167648 :   };
   12893                 :   CPLErr result;
   12894                 :   
   12895                 :   {
   12896                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   12897          167648 :     arg6 = &pyObject6;
   12898                 :   }
   12899          167648 :   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;
   12900          167648 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12901          167648 :   if (!SWIG_IsOK(res1)) {
   12902               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReadRaster1" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12903                 :   }
   12904          167648 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12905          167648 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12906          167648 :   if (!SWIG_IsOK(ecode2)) {
   12907               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_ReadRaster1" "', argument " "2"" of type '" "int""'");
   12908                 :   } 
   12909          167648 :   arg2 = static_cast< int >(val2);
   12910          167648 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   12911          167648 :   if (!SWIG_IsOK(ecode3)) {
   12912               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_ReadRaster1" "', argument " "3"" of type '" "int""'");
   12913                 :   } 
   12914          167648 :   arg3 = static_cast< int >(val3);
   12915          167648 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   12916          167648 :   if (!SWIG_IsOK(ecode4)) {
   12917               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_ReadRaster1" "', argument " "4"" of type '" "int""'");
   12918                 :   } 
   12919          167648 :   arg4 = static_cast< int >(val4);
   12920          167648 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   12921          167648 :   if (!SWIG_IsOK(ecode5)) {
   12922               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_ReadRaster1" "', argument " "5"" of type '" "int""'");
   12923                 :   } 
   12924          167648 :   arg5 = static_cast< int >(val5);
   12925          167648 :   if (obj5) {
   12926                 :     {
   12927                 :       /* %typemap(in) (int *optional_##int) */
   12928          167648 :       if ( obj5 == Py_None ) {
   12929               0 :         arg7 = 0;
   12930                 :       }
   12931          167648 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   12932          167648 :         arg7 = (int *) &val7;
   12933                 :       }
   12934                 :       else {
   12935               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12936               0 :         SWIG_fail;
   12937                 :       }
   12938                 :     }
   12939                 :   }
   12940          167648 :   if (obj6) {
   12941                 :     {
   12942                 :       /* %typemap(in) (int *optional_##int) */
   12943          167648 :       if ( obj6 == Py_None ) {
   12944               0 :         arg8 = 0;
   12945                 :       }
   12946          167648 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   12947          167648 :         arg8 = (int *) &val8;
   12948                 :       }
   12949                 :       else {
   12950               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12951               0 :         SWIG_fail;
   12952                 :       }
   12953                 :     }
   12954                 :   }
   12955          167648 :   if (obj7) {
   12956                 :     {
   12957                 :       /* %typemap(in) (int *optional_##int) */
   12958          167648 :       if ( obj7 == Py_None ) {
   12959               0 :         arg9 = 0;
   12960                 :       }
   12961          167648 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   12962          167648 :         arg9 = (GDALDataType *) &val9;
   12963                 :       }
   12964                 :       else {
   12965               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12966               0 :         SWIG_fail;
   12967                 :       }
   12968                 :     }
   12969                 :   }
   12970          167648 :   if (obj8) {
   12971                 :     {
   12972                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   12973                 :       /* check if is List */
   12974          167648 :       if ( !PySequence_Check(obj8) ) {
   12975               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   12976               0 :         SWIG_fail;
   12977                 :       }
   12978          167648 :       arg10 = PySequence_Size(obj8);
   12979          167648 :       arg11 = (int*) malloc(arg10*sizeof(int));
   12980          335313 :       for( int i = 0; i<arg10; i++ ) {
   12981          167665 :         PyObject *o = PySequence_GetItem(obj8,i);
   12982          167665 :         if ( !PyArg_Parse(o,"i",&arg11[i]) ) {
   12983               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   12984               0 :           Py_DECREF(o);
   12985                 :           SWIG_fail;
   12986                 :         }
   12987          167665 :         Py_DECREF(o);
   12988                 :       }
   12989                 :     }
   12990                 :   }
   12991          167648 :   if (obj9) {
   12992                 :     {
   12993                 :       /* %typemap(in) (int *optional_##int) */
   12994          167648 :       if ( obj9 == Py_None ) {
   12995          167648 :         arg12 = 0;
   12996                 :       }
   12997               0 :       else if ( PyArg_Parse( obj9,"i" ,&val12 ) ) {
   12998               0 :         arg12 = (int *) &val12;
   12999                 :       }
   13000                 :       else {
   13001               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   13002               0 :         SWIG_fail;
   13003                 :       }
   13004                 :     }
   13005                 :   }
   13006          167648 :   if (obj10) {
   13007                 :     {
   13008                 :       /* %typemap(in) (int *optional_##int) */
   13009          167648 :       if ( obj10 == Py_None ) {
   13010          167648 :         arg13 = 0;
   13011                 :       }
   13012               0 :       else if ( PyArg_Parse( obj10,"i" ,&val13 ) ) {
   13013               0 :         arg13 = (int *) &val13;
   13014                 :       }
   13015                 :       else {
   13016               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   13017               0 :         SWIG_fail;
   13018                 :       }
   13019                 :     }
   13020                 :   }
   13021          167648 :   if (obj11) {
   13022                 :     {
   13023                 :       /* %typemap(in) (int *optional_##int) */
   13024          167648 :       if ( obj11 == Py_None ) {
   13025          167648 :         arg14 = 0;
   13026                 :       }
   13027               0 :       else if ( PyArg_Parse( obj11,"i" ,&val14 ) ) {
   13028               0 :         arg14 = (int *) &val14;
   13029                 :       }
   13030                 :       else {
   13031               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   13032               0 :         SWIG_fail;
   13033                 :       }
   13034                 :     }
   13035                 :   }
   13036                 :   {
   13037          167648 :     if ( bUseExceptions ) {
   13038               0 :       CPLErrorReset();
   13039                 :     }
   13040          167648 :     result = (CPLErr)GDALDatasetShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
   13041          167648 :     if ( bUseExceptions ) {
   13042               0 :       CPLErr eclass = CPLGetLastErrorType();
   13043               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13044               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13045                 :       }
   13046                 :     }
   13047                 :   }
   13048          335296 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13049                 :   {
   13050                 :     /* %typemap(argout) ( void **outPythonObject ) */
   13051          167648 :     Py_XDECREF(resultobj);
   13052          167648 :     if (*arg6)
   13053                 :     {
   13054          167645 :       resultobj = (PyObject*)*arg6;
   13055                 :     }
   13056                 :     else
   13057                 :     {
   13058               3 :       resultobj = Py_None;
   13059               3 :       Py_INCREF(resultobj);
   13060                 :     }
   13061                 :   }
   13062                 :   {
   13063                 :     /* %typemap(freearg) (int nList, int* pList) */
   13064          167648 :     if (arg11) {
   13065          167648 :       free((void*) arg11);
   13066                 :     }
   13067                 :   }
   13068                 :   {
   13069                 :     /* %typemap(ret) CPLErr */
   13070          167648 :     if ( bUseExceptions == 0 ) {
   13071                 :       /* We're not using exceptions.  And no error has occurred */
   13072          167648 :       if ( resultobj == 0 ) {
   13073                 :         /* No other return values set so return ErrorCode */
   13074               0 :         resultobj = PyInt_FromLong(result);
   13075                 :       }
   13076                 :     }
   13077                 :   }
   13078          167648 :   return resultobj;
   13079                 : fail:
   13080                 :   {
   13081                 :     /* %typemap(freearg) (int nList, int* pList) */
   13082               0 :     if (arg11) {
   13083               0 :       free((void*) arg11);
   13084                 :     }
   13085                 :   }
   13086               0 :   return NULL;
   13087                 : }
   13088                 : 
   13089                 : 
   13090              12 : SWIGINTERN PyObject *Dataset_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13091                 :   PyObject *obj;
   13092              12 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   13093              12 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDatasetShadow, SWIG_NewClientData(obj));
   13094              12 :   return SWIG_Py_Void();
   13095                 : }
   13096                 : 
   13097            8306 : SWIGINTERN PyObject *_wrap_Band_XSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13098            8306 :   PyObject *resultobj = 0;
   13099            8306 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13100            8306 :   void *argp1 = 0 ;
   13101            8306 :   int res1 = 0 ;
   13102            8306 :   PyObject * obj0 = 0 ;
   13103                 :   int result;
   13104                 :   
   13105            8306 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_XSize_get",&obj0)) SWIG_fail;
   13106            8306 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13107            8306 :   if (!SWIG_IsOK(res1)) {
   13108               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_XSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13109                 :   }
   13110            8306 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13111                 :   {
   13112            8306 :     if ( bUseExceptions ) {
   13113               0 :       CPLErrorReset();
   13114                 :     }
   13115            8306 :     result = (int)GDALRasterBandShadow_XSize_get(arg1);
   13116            8306 :     if ( bUseExceptions ) {
   13117               0 :       CPLErr eclass = CPLGetLastErrorType();
   13118               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13119               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13120                 :       }
   13121                 :     }
   13122                 :   }
   13123            8306 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13124            8306 :   return resultobj;
   13125                 : fail:
   13126               0 :   return NULL;
   13127                 : }
   13128                 : 
   13129                 : 
   13130            8267 : SWIGINTERN PyObject *_wrap_Band_YSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13131            8267 :   PyObject *resultobj = 0;
   13132            8267 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13133            8267 :   void *argp1 = 0 ;
   13134            8267 :   int res1 = 0 ;
   13135            8267 :   PyObject * obj0 = 0 ;
   13136                 :   int result;
   13137                 :   
   13138            8267 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_YSize_get",&obj0)) SWIG_fail;
   13139            8267 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13140            8267 :   if (!SWIG_IsOK(res1)) {
   13141               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_YSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13142                 :   }
   13143            8267 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13144                 :   {
   13145            8267 :     if ( bUseExceptions ) {
   13146               0 :       CPLErrorReset();
   13147                 :     }
   13148            8267 :     result = (int)GDALRasterBandShadow_YSize_get(arg1);
   13149            8267 :     if ( bUseExceptions ) {
   13150               0 :       CPLErr eclass = CPLGetLastErrorType();
   13151               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13152               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13153                 :       }
   13154                 :     }
   13155                 :   }
   13156            8267 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13157            8267 :   return resultobj;
   13158                 : fail:
   13159               0 :   return NULL;
   13160                 : }
   13161                 : 
   13162                 : 
   13163            3632 : SWIGINTERN PyObject *_wrap_Band_DataType_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13164            3632 :   PyObject *resultobj = 0;
   13165            3632 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13166            3632 :   void *argp1 = 0 ;
   13167            3632 :   int res1 = 0 ;
   13168            3632 :   PyObject * obj0 = 0 ;
   13169                 :   GDALDataType result;
   13170                 :   
   13171            3632 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_DataType_get",&obj0)) SWIG_fail;
   13172            3632 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13173            3632 :   if (!SWIG_IsOK(res1)) {
   13174               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DataType_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13175                 :   }
   13176            3632 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13177                 :   {
   13178            3632 :     if ( bUseExceptions ) {
   13179               0 :       CPLErrorReset();
   13180                 :     }
   13181            3632 :     result = (GDALDataType)GDALRasterBandShadow_DataType_get(arg1);
   13182            3632 :     if ( bUseExceptions ) {
   13183               0 :       CPLErr eclass = CPLGetLastErrorType();
   13184               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13185               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13186                 :       }
   13187                 :     }
   13188                 :   }
   13189            7264 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13190            3632 :   return resultobj;
   13191                 : fail:
   13192               0 :   return NULL;
   13193                 : }
   13194                 : 
   13195                 : 
   13196               0 : SWIGINTERN PyObject *_wrap_Band_GetBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13197               0 :   PyObject *resultobj = 0;
   13198               0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13199               0 :   void *argp1 = 0 ;
   13200               0 :   int res1 = 0 ;
   13201               0 :   PyObject * obj0 = 0 ;
   13202                 :   int result;
   13203                 :   
   13204               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetBand",&obj0)) SWIG_fail;
   13205               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13206               0 :   if (!SWIG_IsOK(res1)) {
   13207               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13208                 :   }
   13209               0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13210                 :   {
   13211               0 :     if ( bUseExceptions ) {
   13212               0 :       CPLErrorReset();
   13213                 :     }
   13214               0 :     result = (int)GDALRasterBandShadow_GetBand(arg1);
   13215               0 :     if ( bUseExceptions ) {
   13216               0 :       CPLErr eclass = CPLGetLastErrorType();
   13217               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13218               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13219                 :       }
   13220                 :     }
   13221                 :   }
   13222               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13223               0 :   return resultobj;
   13224                 : fail:
   13225               0 :   return NULL;
   13226                 : }
   13227                 : 
   13228                 : 
   13229              33 : SWIGINTERN PyObject *_wrap_Band_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13230              33 :   PyObject *resultobj = 0;
   13231              33 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13232              33 :   int *arg2 = (int *) 0 ;
   13233              33 :   int *arg3 = (int *) 0 ;
   13234              33 :   void *argp1 = 0 ;
   13235              33 :   int res1 = 0 ;
   13236                 :   int temp2 ;
   13237              33 :   int res2 = SWIG_TMPOBJ ;
   13238                 :   int temp3 ;
   13239              33 :   int res3 = SWIG_TMPOBJ ;
   13240              33 :   PyObject * obj0 = 0 ;
   13241                 :   
   13242              33 :   arg2 = &temp2;
   13243              33 :   arg3 = &temp3;
   13244              33 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetBlockSize",&obj0)) SWIG_fail;
   13245              33 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13246              33 :   if (!SWIG_IsOK(res1)) {
   13247               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13248                 :   }
   13249              33 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13250                 :   {
   13251              33 :     if ( bUseExceptions ) {
   13252               0 :       CPLErrorReset();
   13253                 :     }
   13254                 :     GDALRasterBandShadow_GetBlockSize(arg1,arg2,arg3);
   13255              33 :     if ( bUseExceptions ) {
   13256               0 :       CPLErr eclass = CPLGetLastErrorType();
   13257               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13258               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13259                 :       }
   13260                 :     }
   13261                 :   }
   13262              33 :   resultobj = SWIG_Py_Void();
   13263              66 :   if (SWIG_IsTmpObj(res2)) {
   13264              66 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
   13265                 :   } else {
   13266               0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   13267               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
   13268                 :   }
   13269              66 :   if (SWIG_IsTmpObj(res3)) {
   13270              66 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   13271                 :   } else {
   13272               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   13273               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   13274                 :   }
   13275              33 :   return resultobj;
   13276                 : fail:
   13277               0 :   return NULL;
   13278                 : }
   13279                 : 
   13280                 : 
   13281              27 : SWIGINTERN PyObject *_wrap_Band_GetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13282              27 :   PyObject *resultobj = 0;
   13283              27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13284              27 :   void *argp1 = 0 ;
   13285              27 :   int res1 = 0 ;
   13286              27 :   PyObject * obj0 = 0 ;
   13287                 :   GDALColorInterp result;
   13288                 :   
   13289              27 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetColorInterpretation",&obj0)) SWIG_fail;
   13290              27 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13291              27 :   if (!SWIG_IsOK(res1)) {
   13292               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13293                 :   }
   13294              27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13295                 :   {
   13296              27 :     if ( bUseExceptions ) {
   13297               0 :       CPLErrorReset();
   13298                 :     }
   13299              27 :     result = (GDALColorInterp)GDALRasterBandShadow_GetColorInterpretation(arg1);
   13300              27 :     if ( bUseExceptions ) {
   13301               0 :       CPLErr eclass = CPLGetLastErrorType();
   13302               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13303               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13304                 :       }
   13305                 :     }
   13306                 :   }
   13307              54 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13308              27 :   return resultobj;
   13309                 : fail:
   13310               0 :   return NULL;
   13311                 : }
   13312                 : 
   13313                 : 
   13314             164 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13315             164 :   PyObject *resultobj = 0;
   13316             164 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13317             164 :   void *argp1 = 0 ;
   13318             164 :   int res1 = 0 ;
   13319             164 :   PyObject * obj0 = 0 ;
   13320                 :   GDALColorInterp result;
   13321                 :   
   13322             164 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetRasterColorInterpretation",&obj0)) SWIG_fail;
   13323             164 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13324             164 :   if (!SWIG_IsOK(res1)) {
   13325               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13326                 :   }
   13327             164 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13328                 :   {
   13329             164 :     if ( bUseExceptions ) {
   13330               0 :       CPLErrorReset();
   13331                 :     }
   13332             164 :     result = (GDALColorInterp)GDALRasterBandShadow_GetRasterColorInterpretation(arg1);
   13333             164 :     if ( bUseExceptions ) {
   13334               0 :       CPLErr eclass = CPLGetLastErrorType();
   13335               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13336               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13337                 :       }
   13338                 :     }
   13339                 :   }
   13340             328 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13341             164 :   return resultobj;
   13342                 : fail:
   13343               0 :   return NULL;
   13344                 : }
   13345                 : 
   13346                 : 
   13347              16 : SWIGINTERN PyObject *_wrap_Band_SetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13348              16 :   PyObject *resultobj = 0;
   13349              16 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13350                 :   GDALColorInterp arg2 ;
   13351              16 :   void *argp1 = 0 ;
   13352              16 :   int res1 = 0 ;
   13353                 :   int val2 ;
   13354              16 :   int ecode2 = 0 ;
   13355              16 :   PyObject * obj0 = 0 ;
   13356              16 :   PyObject * obj1 = 0 ;
   13357                 :   CPLErr result;
   13358                 :   
   13359              16 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetColorInterpretation",&obj0,&obj1)) SWIG_fail;
   13360              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13361              16 :   if (!SWIG_IsOK(res1)) {
   13362               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13363                 :   }
   13364              16 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13365              16 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13366              16 :   if (!SWIG_IsOK(ecode2)) {
   13367               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   13368                 :   } 
   13369              16 :   arg2 = static_cast< GDALColorInterp >(val2);
   13370                 :   {
   13371              16 :     if ( bUseExceptions ) {
   13372               0 :       CPLErrorReset();
   13373                 :     }
   13374              16 :     result = (CPLErr)GDALRasterBandShadow_SetColorInterpretation(arg1,arg2);
   13375              16 :     if ( bUseExceptions ) {
   13376               0 :       CPLErr eclass = CPLGetLastErrorType();
   13377               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13378               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13379                 :       }
   13380                 :     }
   13381                 :   }
   13382              32 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13383                 :   {
   13384                 :     /* %typemap(ret) CPLErr */
   13385              16 :     if ( bUseExceptions == 0 ) {
   13386                 :       /* We're not using exceptions.  And no error has occurred */
   13387              16 :       if ( resultobj == 0 ) {
   13388                 :         /* No other return values set so return ErrorCode */
   13389               0 :         resultobj = PyInt_FromLong(result);
   13390                 :       }
   13391                 :     }
   13392                 :   }
   13393              16 :   return resultobj;
   13394                 : fail:
   13395               0 :   return NULL;
   13396                 : }
   13397                 : 
   13398                 : 
   13399              57 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13400              57 :   PyObject *resultobj = 0;
   13401              57 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13402                 :   GDALColorInterp arg2 ;
   13403              57 :   void *argp1 = 0 ;
   13404              57 :   int res1 = 0 ;
   13405                 :   int val2 ;
   13406              57 :   int ecode2 = 0 ;
   13407              57 :   PyObject * obj0 = 0 ;
   13408              57 :   PyObject * obj1 = 0 ;
   13409                 :   CPLErr result;
   13410                 :   
   13411              57 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetRasterColorInterpretation",&obj0,&obj1)) SWIG_fail;
   13412              57 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13413              57 :   if (!SWIG_IsOK(res1)) {
   13414               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13415                 :   }
   13416              57 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13417              57 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13418              57 :   if (!SWIG_IsOK(ecode2)) {
   13419               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetRasterColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   13420                 :   } 
   13421              57 :   arg2 = static_cast< GDALColorInterp >(val2);
   13422                 :   {
   13423              57 :     if ( bUseExceptions ) {
   13424               0 :       CPLErrorReset();
   13425                 :     }
   13426              57 :     result = (CPLErr)GDALRasterBandShadow_SetRasterColorInterpretation(arg1,arg2);
   13427              57 :     if ( bUseExceptions ) {
   13428               0 :       CPLErr eclass = CPLGetLastErrorType();
   13429               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13430               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13431                 :       }
   13432                 :     }
   13433                 :   }
   13434             114 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13435                 :   {
   13436                 :     /* %typemap(ret) CPLErr */
   13437              57 :     if ( bUseExceptions == 0 ) {
   13438                 :       /* We're not using exceptions.  And no error has occurred */
   13439              57 :       if ( resultobj == 0 ) {
   13440                 :         /* No other return values set so return ErrorCode */
   13441               0 :         resultobj = PyInt_FromLong(result);
   13442                 :       }
   13443                 :     }
   13444                 :   }
   13445              57 :   return resultobj;
   13446                 : fail:
   13447               0 :   return NULL;
   13448                 : }
   13449                 : 
   13450                 : 
   13451             123 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13452             123 :   PyObject *resultobj = 0;
   13453             123 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13454             123 :   double *arg2 = (double *) 0 ;
   13455             123 :   int *arg3 = (int *) 0 ;
   13456             123 :   void *argp1 = 0 ;
   13457             123 :   int res1 = 0 ;
   13458                 :   double tmpval2 ;
   13459                 :   int tmphasval2 ;
   13460             123 :   PyObject * obj0 = 0 ;
   13461                 :   
   13462                 :   {
   13463                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13464             123 :     arg2 = &tmpval2;
   13465             123 :     arg3 = &tmphasval2;
   13466                 :   }
   13467             123 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetNoDataValue",&obj0)) SWIG_fail;
   13468             123 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13469             123 :   if (!SWIG_IsOK(res1)) {
   13470               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13471                 :   }
   13472             123 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13473                 :   {
   13474             123 :     if ( bUseExceptions ) {
   13475               0 :       CPLErrorReset();
   13476                 :     }
   13477                 :     GDALRasterBandShadow_GetNoDataValue(arg1,arg2,arg3);
   13478             123 :     if ( bUseExceptions ) {
   13479               0 :       CPLErr eclass = CPLGetLastErrorType();
   13480               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13481               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13482                 :       }
   13483                 :     }
   13484                 :   }
   13485             123 :   resultobj = SWIG_Py_Void();
   13486                 :   {
   13487                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13488                 :     PyObject *r;
   13489             123 :     if ( !*arg3 ) {
   13490              23 :       Py_INCREF(Py_None);
   13491              23 :       r = Py_None;
   13492              23 :       resultobj = t_output_helper(resultobj,r);
   13493                 :     }
   13494                 :     else {
   13495             100 :       r = PyFloat_FromDouble( *arg2 );
   13496             100 :       resultobj = t_output_helper(resultobj,r);
   13497                 :     }
   13498                 :   }
   13499             123 :   return resultobj;
   13500                 : fail:
   13501               0 :   return NULL;
   13502                 : }
   13503                 : 
   13504                 : 
   13505              58 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13506              58 :   PyObject *resultobj = 0;
   13507              58 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13508                 :   double arg2 ;
   13509              58 :   void *argp1 = 0 ;
   13510              58 :   int res1 = 0 ;
   13511                 :   double val2 ;
   13512              58 :   int ecode2 = 0 ;
   13513              58 :   PyObject * obj0 = 0 ;
   13514              58 :   PyObject * obj1 = 0 ;
   13515                 :   CPLErr result;
   13516                 :   
   13517              58 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetNoDataValue",&obj0,&obj1)) SWIG_fail;
   13518              58 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13519              58 :   if (!SWIG_IsOK(res1)) {
   13520               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13521                 :   }
   13522              58 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13523              58 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   13524              58 :   if (!SWIG_IsOK(ecode2)) {
   13525               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetNoDataValue" "', argument " "2"" of type '" "double""'");
   13526                 :   } 
   13527              58 :   arg2 = static_cast< double >(val2);
   13528                 :   {
   13529              58 :     if ( bUseExceptions ) {
   13530               0 :       CPLErrorReset();
   13531                 :     }
   13532              58 :     result = (CPLErr)GDALRasterBandShadow_SetNoDataValue(arg1,arg2);
   13533              58 :     if ( bUseExceptions ) {
   13534               0 :       CPLErr eclass = CPLGetLastErrorType();
   13535               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13536               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13537                 :       }
   13538                 :     }
   13539                 :   }
   13540             116 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13541                 :   {
   13542                 :     /* %typemap(ret) CPLErr */
   13543              58 :     if ( bUseExceptions == 0 ) {
   13544                 :       /* We're not using exceptions.  And no error has occurred */
   13545              58 :       if ( resultobj == 0 ) {
   13546                 :         /* No other return values set so return ErrorCode */
   13547               0 :         resultobj = PyInt_FromLong(result);
   13548                 :       }
   13549                 :     }
   13550                 :   }
   13551              58 :   return resultobj;
   13552                 : fail:
   13553               0 :   return NULL;
   13554                 : }
   13555                 : 
   13556                 : 
   13557              30 : SWIGINTERN PyObject *_wrap_Band_GetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13558              30 :   PyObject *resultobj = 0;
   13559              30 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13560              30 :   void *argp1 = 0 ;
   13561              30 :   int res1 = 0 ;
   13562              30 :   PyObject * obj0 = 0 ;
   13563              30 :   char *result = 0 ;
   13564                 :   
   13565              30 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetUnitType",&obj0)) SWIG_fail;
   13566              30 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13567              30 :   if (!SWIG_IsOK(res1)) {
   13568               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13569                 :   }
   13570              30 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13571                 :   {
   13572              30 :     if ( bUseExceptions ) {
   13573               0 :       CPLErrorReset();
   13574                 :     }
   13575              30 :     result = (char *)GDALRasterBandShadow_GetUnitType(arg1);
   13576              30 :     if ( bUseExceptions ) {
   13577               0 :       CPLErr eclass = CPLGetLastErrorType();
   13578               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13579               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13580                 :       }
   13581                 :     }
   13582                 :   }
   13583              30 :   resultobj = SWIG_FromCharPtr((const char *)result);
   13584              30 :   return resultobj;
   13585                 : fail:
   13586               0 :   return NULL;
   13587                 : }
   13588                 : 
   13589                 : 
   13590               8 : SWIGINTERN PyObject *_wrap_Band_SetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13591               8 :   PyObject *resultobj = 0;
   13592               8 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13593               8 :   char *arg2 = (char *) 0 ;
   13594               8 :   void *argp1 = 0 ;
   13595               8 :   int res1 = 0 ;
   13596                 :   int res2 ;
   13597               8 :   char *buf2 = 0 ;
   13598               8 :   int alloc2 = 0 ;
   13599               8 :   PyObject * obj0 = 0 ;
   13600               8 :   PyObject * obj1 = 0 ;
   13601                 :   CPLErr result;
   13602                 :   
   13603               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetUnitType",&obj0,&obj1)) SWIG_fail;
   13604               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13605               8 :   if (!SWIG_IsOK(res1)) {
   13606               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13607                 :   }
   13608               8 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13609               8 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   13610               8 :   if (!SWIG_IsOK(res2)) {
   13611               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetUnitType" "', argument " "2"" of type '" "char const *""'");
   13612                 :   }
   13613               8 :   arg2 = reinterpret_cast< char * >(buf2);
   13614                 :   {
   13615               8 :     if ( bUseExceptions ) {
   13616               0 :       CPLErrorReset();
   13617                 :     }
   13618               8 :     result = (CPLErr)GDALRasterBandShadow_SetUnitType(arg1,(char const *)arg2);
   13619               8 :     if ( bUseExceptions ) {
   13620               0 :       CPLErr eclass = CPLGetLastErrorType();
   13621               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13622               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13623                 :       }
   13624                 :     }
   13625                 :   }
   13626              16 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13627               8 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   13628                 :   {
   13629                 :     /* %typemap(ret) CPLErr */
   13630               8 :     if ( bUseExceptions == 0 ) {
   13631                 :       /* We're not using exceptions.  And no error has occurred */
   13632               8 :       if ( resultobj == 0 ) {
   13633                 :         /* No other return values set so return ErrorCode */
   13634               0 :         resultobj = PyInt_FromLong(result);
   13635                 :       }
   13636                 :     }
   13637                 :   }
   13638               8 :   return resultobj;
   13639                 : fail:
   13640               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   13641               0 :   return NULL;
   13642                 : }
   13643                 : 
   13644                 : 
   13645              18 : SWIGINTERN PyObject *_wrap_Band_GetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13646              18 :   PyObject *resultobj = 0;
   13647              18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13648              18 :   void *argp1 = 0 ;
   13649              18 :   int res1 = 0 ;
   13650              18 :   PyObject * obj0 = 0 ;
   13651              18 :   char **result = 0 ;
   13652                 :   
   13653              18 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetRasterCategoryNames",&obj0)) SWIG_fail;
   13654              18 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13655              18 :   if (!SWIG_IsOK(res1)) {
   13656               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13657                 :   }
   13658              18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13659                 :   {
   13660              18 :     if ( bUseExceptions ) {
   13661               0 :       CPLErrorReset();
   13662                 :     }
   13663              18 :     result = (char **)GDALRasterBandShadow_GetRasterCategoryNames(arg1);
   13664              18 :     if ( bUseExceptions ) {
   13665               0 :       CPLErr eclass = CPLGetLastErrorType();
   13666               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13667               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13668                 :       }
   13669                 :     }
   13670                 :   }
   13671                 :   {
   13672                 :     /* %typemap(out) char **options -> ( string ) */
   13673              18 :     char **stringarray = result;
   13674              18 :     if ( stringarray == NULL ) {
   13675              17 :       resultobj = Py_None;
   13676              17 :       Py_INCREF( resultobj );
   13677                 :     }
   13678                 :     else {
   13679               1 :       int len = CSLCount( stringarray );
   13680               1 :       resultobj = PyList_New( len );
   13681              94 :       for ( int i = 0; i < len; ++i ) {
   13682              93 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   13683              93 :         PyList_SetItem(resultobj, i, o );
   13684                 :       }
   13685                 :     }
   13686                 :   }
   13687              18 :   return resultobj;
   13688                 : fail:
   13689               0 :   return NULL;
   13690                 : }
   13691                 : 
   13692                 : 
   13693               0 : SWIGINTERN PyObject *_wrap_Band_SetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13694               0 :   PyObject *resultobj = 0;
   13695               0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13696               0 :   char **arg2 = (char **) 0 ;
   13697               0 :   void *argp1 = 0 ;
   13698               0 :   int res1 = 0 ;
   13699               0 :   PyObject * obj0 = 0 ;
   13700               0 :   PyObject * obj1 = 0 ;
   13701                 :   CPLErr result;
   13702                 :   
   13703               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetRasterCategoryNames",&obj0,&obj1)) SWIG_fail;
   13704               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13705               0 :   if (!SWIG_IsOK(res1)) {
   13706               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13707                 :   }
   13708               0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13709                 :   {
   13710                 :     /* %typemap(in) char **options */
   13711                 :     /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   13712               0 :     if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
   13713                 :   #if PY_VERSION_HEX < 0x03000000
   13714                 :       || PyString_Check(obj1)
   13715                 :   #endif
   13716                 :       ) {
   13717               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   13718               0 :       SWIG_fail;
   13719                 :     }
   13720                 :     
   13721               0 :     int size = PySequence_Size(obj1);
   13722               0 :     for (int i = 0; i < size; i++) {
   13723               0 :       PyObject* pyObj = PySequence_GetItem(obj1,i);
   13724               0 :       if (PyUnicode_Check(pyObj))
   13725                 :       {
   13726                 :         char *pszStr;
   13727                 :         Py_ssize_t nLen;
   13728               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   13729                 : #if PY_VERSION_HEX >= 0x03000000
   13730                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   13731                 : #else
   13732               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   13733                 : #endif
   13734               0 :         arg2 = CSLAddString( arg2, pszStr );
   13735               0 :         Py_XDECREF(pyUTF8Str);
   13736                 :       }
   13737                 : #if PY_VERSION_HEX >= 0x03000000
   13738                 :       else if (PyBytes_Check(pyObj))
   13739                 :       arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   13740                 : #else
   13741               0 :       else if (PyString_Check(pyObj))
   13742               0 :       arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   13743                 : #endif
   13744                 :       else
   13745                 :       {
   13746               0 :         Py_DECREF(pyObj);
   13747               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   13748               0 :         SWIG_fail;
   13749                 :       }
   13750               0 :       Py_DECREF(pyObj);
   13751                 :     }
   13752                 :   }
   13753                 :   {
   13754               0 :     if ( bUseExceptions ) {
   13755               0 :       CPLErrorReset();
   13756                 :     }
   13757               0 :     result = (CPLErr)GDALRasterBandShadow_SetRasterCategoryNames(arg1,arg2);
   13758               0 :     if ( bUseExceptions ) {
   13759               0 :       CPLErr eclass = CPLGetLastErrorType();
   13760               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13761               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13762                 :       }
   13763                 :     }
   13764                 :   }
   13765               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13766                 :   {
   13767                 :     /* %typemap(freearg) char **options */
   13768               0 :     CSLDestroy( arg2 );
   13769                 :   }
   13770                 :   {
   13771                 :     /* %typemap(ret) CPLErr */
   13772               0 :     if ( bUseExceptions == 0 ) {
   13773                 :       /* We're not using exceptions.  And no error has occurred */
   13774               0 :       if ( resultobj == 0 ) {
   13775                 :         /* No other return values set so return ErrorCode */
   13776               0 :         resultobj = PyInt_FromLong(result);
   13777                 :       }
   13778                 :     }
   13779                 :   }
   13780               0 :   return resultobj;
   13781                 : fail:
   13782                 :   {
   13783                 :     /* %typemap(freearg) char **options */
   13784               0 :     CSLDestroy( arg2 );
   13785                 :   }
   13786               0 :   return NULL;
   13787                 : }
   13788                 : 
   13789                 : 
   13790              37 : SWIGINTERN PyObject *_wrap_Band_GetMinimum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13791              37 :   PyObject *resultobj = 0;
   13792              37 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13793              37 :   double *arg2 = (double *) 0 ;
   13794              37 :   int *arg3 = (int *) 0 ;
   13795              37 :   void *argp1 = 0 ;
   13796              37 :   int res1 = 0 ;
   13797                 :   double tmpval2 ;
   13798                 :   int tmphasval2 ;
   13799              37 :   PyObject * obj0 = 0 ;
   13800                 :   
   13801                 :   {
   13802                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13803              37 :     arg2 = &tmpval2;
   13804              37 :     arg3 = &tmphasval2;
   13805                 :   }
   13806              37 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMinimum",&obj0)) SWIG_fail;
   13807              37 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13808              37 :   if (!SWIG_IsOK(res1)) {
   13809               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMinimum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13810                 :   }
   13811              37 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13812                 :   {
   13813              37 :     if ( bUseExceptions ) {
   13814               0 :       CPLErrorReset();
   13815                 :     }
   13816                 :     GDALRasterBandShadow_GetMinimum(arg1,arg2,arg3);
   13817              37 :     if ( bUseExceptions ) {
   13818               0 :       CPLErr eclass = CPLGetLastErrorType();
   13819               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13820               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13821                 :       }
   13822                 :     }
   13823                 :   }
   13824              37 :   resultobj = SWIG_Py_Void();
   13825                 :   {
   13826                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13827                 :     PyObject *r;
   13828              37 :     if ( !*arg3 ) {
   13829              22 :       Py_INCREF(Py_None);
   13830              22 :       r = Py_None;
   13831              22 :       resultobj = t_output_helper(resultobj,r);
   13832                 :     }
   13833                 :     else {
   13834              15 :       r = PyFloat_FromDouble( *arg2 );
   13835              15 :       resultobj = t_output_helper(resultobj,r);
   13836                 :     }
   13837                 :   }
   13838              37 :   return resultobj;
   13839                 : fail:
   13840               0 :   return NULL;
   13841                 : }
   13842                 : 
   13843                 : 
   13844              31 : SWIGINTERN PyObject *_wrap_Band_GetMaximum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13845              31 :   PyObject *resultobj = 0;
   13846              31 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13847              31 :   double *arg2 = (double *) 0 ;
   13848              31 :   int *arg3 = (int *) 0 ;
   13849              31 :   void *argp1 = 0 ;
   13850              31 :   int res1 = 0 ;
   13851                 :   double tmpval2 ;
   13852                 :   int tmphasval2 ;
   13853              31 :   PyObject * obj0 = 0 ;
   13854                 :   
   13855                 :   {
   13856                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13857              31 :     arg2 = &tmpval2;
   13858              31 :     arg3 = &tmphasval2;
   13859                 :   }
   13860              31 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMaximum",&obj0)) SWIG_fail;
   13861              31 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13862              31 :   if (!SWIG_IsOK(res1)) {
   13863               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaximum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13864                 :   }
   13865              31 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13866                 :   {
   13867              31 :     if ( bUseExceptions ) {
   13868               0 :       CPLErrorReset();
   13869                 :     }
   13870                 :     GDALRasterBandShadow_GetMaximum(arg1,arg2,arg3);
   13871              31 :     if ( bUseExceptions ) {
   13872               0 :       CPLErr eclass = CPLGetLastErrorType();
   13873               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13874               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13875                 :       }
   13876                 :     }
   13877                 :   }
   13878              31 :   resultobj = SWIG_Py_Void();
   13879                 :   {
   13880                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13881                 :     PyObject *r;
   13882              31 :     if ( !*arg3 ) {
   13883              18 :       Py_INCREF(Py_None);
   13884              18 :       r = Py_None;
   13885              18 :       resultobj = t_output_helper(resultobj,r);
   13886                 :     }
   13887                 :     else {
   13888              13 :       r = PyFloat_FromDouble( *arg2 );
   13889              13 :       resultobj = t_output_helper(resultobj,r);
   13890                 :     }
   13891                 :   }
   13892              31 :   return resultobj;
   13893                 : fail:
   13894               0 :   return NULL;
   13895                 : }
   13896                 : 
   13897                 : 
   13898              38 : SWIGINTERN PyObject *_wrap_Band_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13899              38 :   PyObject *resultobj = 0;
   13900              38 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13901              38 :   double *arg2 = (double *) 0 ;
   13902              38 :   int *arg3 = (int *) 0 ;
   13903              38 :   void *argp1 = 0 ;
   13904              38 :   int res1 = 0 ;
   13905                 :   double tmpval2 ;
   13906                 :   int tmphasval2 ;
   13907              38 :   PyObject * obj0 = 0 ;
   13908                 :   
   13909                 :   {
   13910                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13911              38 :     arg2 = &tmpval2;
   13912              38 :     arg3 = &tmphasval2;
   13913                 :   }
   13914              38 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetOffset",&obj0)) SWIG_fail;
   13915              38 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13916              38 :   if (!SWIG_IsOK(res1)) {
   13917               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13918                 :   }
   13919              38 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13920                 :   {
   13921              38 :     if ( bUseExceptions ) {
   13922               0 :       CPLErrorReset();
   13923                 :     }
   13924                 :     GDALRasterBandShadow_GetOffset(arg1,arg2,arg3);
   13925              38 :     if ( bUseExceptions ) {
   13926               0 :       CPLErr eclass = CPLGetLastErrorType();
   13927               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13928               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13929                 :       }
   13930                 :     }
   13931                 :   }
   13932              38 :   resultobj = SWIG_Py_Void();
   13933                 :   {
   13934                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13935                 :     PyObject *r;
   13936              38 :     if ( !*arg3 ) {
   13937               1 :       Py_INCREF(Py_None);
   13938               1 :       r = Py_None;
   13939               1 :       resultobj = t_output_helper(resultobj,r);
   13940                 :     }
   13941                 :     else {
   13942              37 :       r = PyFloat_FromDouble( *arg2 );
   13943              37 :       resultobj = t_output_helper(resultobj,r);
   13944                 :     }
   13945                 :   }
   13946              38 :   return resultobj;
   13947                 : fail:
   13948               0 :   return NULL;
   13949                 : }
   13950                 : 
   13951                 : 
   13952              38 : SWIGINTERN PyObject *_wrap_Band_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13953              38 :   PyObject *resultobj = 0;
   13954              38 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13955              38 :   double *arg2 = (double *) 0 ;
   13956              38 :   int *arg3 = (int *) 0 ;
   13957              38 :   void *argp1 = 0 ;
   13958              38 :   int res1 = 0 ;
   13959                 :   double tmpval2 ;
   13960                 :   int tmphasval2 ;
   13961              38 :   PyObject * obj0 = 0 ;
   13962                 :   
   13963                 :   {
   13964                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13965              38 :     arg2 = &tmpval2;
   13966              38 :     arg3 = &tmphasval2;
   13967                 :   }
   13968              38 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetScale",&obj0)) SWIG_fail;
   13969              38 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13970              38 :   if (!SWIG_IsOK(res1)) {
   13971               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13972                 :   }
   13973              38 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13974                 :   {
   13975              38 :     if ( bUseExceptions ) {
   13976               0 :       CPLErrorReset();
   13977                 :     }
   13978                 :     GDALRasterBandShadow_GetScale(arg1,arg2,arg3);
   13979              38 :     if ( bUseExceptions ) {
   13980               0 :       CPLErr eclass = CPLGetLastErrorType();
   13981               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13982               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13983                 :       }
   13984                 :     }
   13985                 :   }
   13986              38 :   resultobj = SWIG_Py_Void();
   13987                 :   {
   13988                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13989                 :     PyObject *r;
   13990              38 :     if ( !*arg3 ) {
   13991               1 :       Py_INCREF(Py_None);
   13992               1 :       r = Py_None;
   13993               1 :       resultobj = t_output_helper(resultobj,r);
   13994                 :     }
   13995                 :     else {
   13996              37 :       r = PyFloat_FromDouble( *arg2 );
   13997              37 :       resultobj = t_output_helper(resultobj,r);
   13998                 :     }
   13999                 :   }
   14000              38 :   return resultobj;
   14001                 : fail:
   14002               0 :   return NULL;
   14003                 : }
   14004                 : 
   14005                 : 
   14006               8 : SWIGINTERN PyObject *_wrap_Band_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14007               8 :   PyObject *resultobj = 0;
   14008               8 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14009                 :   double arg2 ;
   14010               8 :   void *argp1 = 0 ;
   14011               8 :   int res1 = 0 ;
   14012                 :   double val2 ;
   14013               8 :   int ecode2 = 0 ;
   14014               8 :   PyObject * obj0 = 0 ;
   14015               8 :   PyObject * obj1 = 0 ;
   14016                 :   CPLErr result;
   14017                 :   
   14018               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetOffset",&obj0,&obj1)) SWIG_fail;
   14019               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14020               8 :   if (!SWIG_IsOK(res1)) {
   14021               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14022                 :   }
   14023               8 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14024               8 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   14025               8 :   if (!SWIG_IsOK(ecode2)) {
   14026               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetOffset" "', argument " "2"" of type '" "double""'");
   14027                 :   } 
   14028               8 :   arg2 = static_cast< double >(val2);
   14029                 :   {
   14030               8 :     if ( bUseExceptions ) {
   14031               0 :       CPLErrorReset();
   14032                 :     }
   14033               8 :     result = (CPLErr)GDALRasterBandShadow_SetOffset(arg1,arg2);
   14034               8 :     if ( bUseExceptions ) {
   14035               0 :       CPLErr eclass = CPLGetLastErrorType();
   14036               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14037               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14038                 :       }
   14039                 :     }
   14040                 :   }
   14041              16 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14042                 :   {
   14043                 :     /* %typemap(ret) CPLErr */
   14044               8 :     if ( bUseExceptions == 0 ) {
   14045                 :       /* We're not using exceptions.  And no error has occurred */
   14046               8 :       if ( resultobj == 0 ) {
   14047                 :         /* No other return values set so return ErrorCode */
   14048               0 :         resultobj = PyInt_FromLong(result);
   14049                 :       }
   14050                 :     }
   14051                 :   }
   14052               8 :   return resultobj;
   14053                 : fail:
   14054               0 :   return NULL;
   14055                 : }
   14056                 : 
   14057                 : 
   14058               8 : SWIGINTERN PyObject *_wrap_Band_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14059               8 :   PyObject *resultobj = 0;
   14060               8 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14061                 :   double arg2 ;
   14062               8 :   void *argp1 = 0 ;
   14063               8 :   int res1 = 0 ;
   14064                 :   double val2 ;
   14065               8 :   int ecode2 = 0 ;
   14066               8 :   PyObject * obj0 = 0 ;
   14067               8 :   PyObject * obj1 = 0 ;
   14068                 :   CPLErr result;
   14069                 :   
   14070               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetScale",&obj0,&obj1)) SWIG_fail;
   14071               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14072               8 :   if (!SWIG_IsOK(res1)) {
   14073               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14074                 :   }
   14075               8 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14076               8 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   14077               8 :   if (!SWIG_IsOK(ecode2)) {
   14078               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetScale" "', argument " "2"" of type '" "double""'");
   14079                 :   } 
   14080               8 :   arg2 = static_cast< double >(val2);
   14081                 :   {
   14082               8 :     if ( bUseExceptions ) {
   14083               0 :       CPLErrorReset();
   14084                 :     }
   14085               8 :     result = (CPLErr)GDALRasterBandShadow_SetScale(arg1,arg2);
   14086               8 :     if ( bUseExceptions ) {
   14087               0 :       CPLErr eclass = CPLGetLastErrorType();
   14088               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14089               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14090                 :       }
   14091                 :     }
   14092                 :   }
   14093              16 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14094                 :   {
   14095                 :     /* %typemap(ret) CPLErr */
   14096               8 :     if ( bUseExceptions == 0 ) {
   14097                 :       /* We're not using exceptions.  And no error has occurred */
   14098               8 :       if ( resultobj == 0 ) {
   14099                 :         /* No other return values set so return ErrorCode */
   14100               0 :         resultobj = PyInt_FromLong(result);
   14101                 :       }
   14102                 :     }
   14103                 :   }
   14104               8 :   return resultobj;
   14105                 : fail:
   14106               0 :   return NULL;
   14107                 : }
   14108                 : 
   14109                 : 
   14110              72 : SWIGINTERN PyObject *_wrap_Band_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14111              72 :   PyObject *resultobj = 0;
   14112              72 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14113                 :   int arg2 ;
   14114                 :   int arg3 ;
   14115              72 :   double *arg4 = (double *) 0 ;
   14116              72 :   double *arg5 = (double *) 0 ;
   14117              72 :   double *arg6 = (double *) 0 ;
   14118              72 :   double *arg7 = (double *) 0 ;
   14119              72 :   void *argp1 = 0 ;
   14120              72 :   int res1 = 0 ;
   14121                 :   int val2 ;
   14122              72 :   int ecode2 = 0 ;
   14123                 :   int val3 ;
   14124              72 :   int ecode3 = 0 ;
   14125                 :   double temp4 ;
   14126              72 :   int res4 = SWIG_TMPOBJ ;
   14127                 :   double temp5 ;
   14128              72 :   int res5 = SWIG_TMPOBJ ;
   14129                 :   double temp6 ;
   14130              72 :   int res6 = SWIG_TMPOBJ ;
   14131                 :   double temp7 ;
   14132              72 :   int res7 = SWIG_TMPOBJ ;
   14133              72 :   PyObject * obj0 = 0 ;
   14134              72 :   PyObject * obj1 = 0 ;
   14135              72 :   PyObject * obj2 = 0 ;
   14136                 :   CPLErr result;
   14137                 :   
   14138              72 :   arg4 = &temp4;
   14139              72 :   arg5 = &temp5;
   14140              72 :   arg6 = &temp6;
   14141              72 :   arg7 = &temp7;
   14142              72 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Band_GetStatistics",&obj0,&obj1,&obj2)) SWIG_fail;
   14143              72 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14144              72 :   if (!SWIG_IsOK(res1)) {
   14145               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14146                 :   }
   14147              72 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14148              72 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   14149              72 :   if (!SWIG_IsOK(ecode2)) {
   14150               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetStatistics" "', argument " "2"" of type '" "int""'");
   14151                 :   } 
   14152              72 :   arg2 = static_cast< int >(val2);
   14153              72 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   14154              72 :   if (!SWIG_IsOK(ecode3)) {
   14155               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetStatistics" "', argument " "3"" of type '" "int""'");
   14156                 :   } 
   14157              72 :   arg3 = static_cast< int >(val3);
   14158                 :   {
   14159              72 :     if ( bUseExceptions ) {
   14160               0 :       CPLErrorReset();
   14161                 :     }
   14162              72 :     result = (CPLErr)GDALRasterBandShadow_GetStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   14163              72 :     if ( bUseExceptions ) {
   14164               0 :       CPLErr eclass = CPLGetLastErrorType();
   14165               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14166               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14167                 :       }
   14168                 :     }
   14169                 :   }
   14170                 :   {
   14171                 :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   14172                 :   }
   14173             144 :   if (SWIG_IsTmpObj(res4)) {
   14174              72 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   14175                 :   } else {
   14176               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14177               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   14178                 :   }
   14179             144 :   if (SWIG_IsTmpObj(res5)) {
   14180              72 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   14181                 :   } else {
   14182               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14183               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   14184                 :   }
   14185             144 :   if (SWIG_IsTmpObj(res6)) {
   14186              72 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   14187                 :   } else {
   14188               0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14189               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   14190                 :   }
   14191             144 :   if (SWIG_IsTmpObj(res7)) {
   14192              72 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   14193                 :   } else {
   14194               0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14195               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   14196                 :   }
   14197                 :   {
   14198                 :     /* %typemap(ret) CPLErr */
   14199              72 :     if ( bUseExceptions == 0 ) {
   14200                 :       /* We're not using exceptions.  And no error has occurred */
   14201              72 :       if ( resultobj == 0 ) {
   14202                 :         /* No other return values set so return ErrorCode */
   14203               0 :         resultobj = PyInt_FromLong(result);
   14204                 :       }
   14205                 :     }
   14206                 :   }
   14207              72 :   return resultobj;
   14208                 : fail:
   14209               0 :   return NULL;
   14210                 : }
   14211                 : 
   14212                 : 
   14213              10 : SWIGINTERN PyObject *_wrap_Band_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14214              10 :   PyObject *resultobj = 0;
   14215              10 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14216                 :   bool arg2 ;
   14217              10 :   double *arg3 = (double *) NULL ;
   14218              10 :   double *arg4 = (double *) NULL ;
   14219              10 :   double *arg5 = (double *) NULL ;
   14220              10 :   double *arg6 = (double *) NULL ;
   14221              10 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   14222              10 :   void *arg8 = (void *) NULL ;
   14223              10 :   void *argp1 = 0 ;
   14224              10 :   int res1 = 0 ;
   14225                 :   bool val2 ;
   14226              10 :   int ecode2 = 0 ;
   14227                 :   double temp3 ;
   14228              10 :   int res3 = SWIG_TMPOBJ ;
   14229                 :   double temp4 ;
   14230              10 :   int res4 = SWIG_TMPOBJ ;
   14231                 :   double temp5 ;
   14232              10 :   int res5 = SWIG_TMPOBJ ;
   14233                 :   double temp6 ;
   14234              10 :   int res6 = SWIG_TMPOBJ ;
   14235              10 :   PyObject * obj0 = 0 ;
   14236              10 :   PyObject * obj1 = 0 ;
   14237              10 :   PyObject * obj2 = 0 ;
   14238              10 :   PyObject * obj3 = 0 ;
   14239                 :   CPLErr result;
   14240                 :   
   14241                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14242                 :   PyProgressData *psProgressInfo;
   14243              10 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14244              10 :   psProgressInfo->nLastReported = -1;
   14245              10 :   psProgressInfo->psPyCallback = NULL;
   14246              10 :   psProgressInfo->psPyCallbackData = NULL;
   14247              10 :   arg8 = psProgressInfo;
   14248              10 :   arg3 = &temp3;
   14249              10 :   arg4 = &temp4;
   14250              10 :   arg5 = &temp5;
   14251              10 :   arg6 = &temp6;
   14252              10 :   if (!PyArg_ParseTuple(args,(char *)"OO|OO:Band_ComputeStatistics",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   14253              10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14254              10 :   if (!SWIG_IsOK(res1)) {
   14255               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14256                 :   }
   14257              10 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14258              20 :   ecode2 = SWIG_AsVal_bool(obj1, &val2);
   14259              10 :   if (!SWIG_IsOK(ecode2)) {
   14260               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   14261                 :   } 
   14262              10 :   arg2 = static_cast< bool >(val2);
   14263              10 :   if (obj2) {
   14264                 :     {
   14265                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14266                 :       /* callback_func typemap */
   14267               0 :       if (obj2 && obj2 != Py_None ) {
   14268               0 :         void* cbfunction = NULL;
   14269                 :         SWIG_ConvertPtr( obj2, 
   14270                 :           (void**)&cbfunction,
   14271                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14272               0 :           SWIG_POINTER_EXCEPTION | 0 );
   14273                 :         
   14274               0 :         if ( cbfunction == GDALTermProgress ) {
   14275               0 :           arg7 = GDALTermProgress;
   14276                 :         } else {
   14277               0 :           if (!PyCallable_Check(obj2)) {
   14278                 :             PyErr_SetString( PyExc_RuntimeError, 
   14279               0 :               "Object given is not a Python function" );
   14280               0 :             SWIG_fail;
   14281                 :           }
   14282               0 :           psProgressInfo->psPyCallback = obj2;
   14283               0 :           arg7 = PyProgressProxy;
   14284                 :         }
   14285                 :         
   14286                 :       }
   14287                 :       
   14288                 :     }
   14289                 :   }
   14290              10 :   if (obj3) {
   14291                 :     {
   14292                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   14293               0 :       psProgressInfo->psPyCallbackData = obj3 ;
   14294                 :     }
   14295                 :   }
   14296                 :   {
   14297              10 :     if ( bUseExceptions ) {
   14298               0 :       CPLErrorReset();
   14299                 :     }
   14300              20 :     result = (CPLErr)GDALRasterBandShadow_ComputeStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   14301              10 :     if ( bUseExceptions ) {
   14302               0 :       CPLErr eclass = CPLGetLastErrorType();
   14303               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14304               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14305                 :       }
   14306                 :     }
   14307                 :   }
   14308                 :   {
   14309                 :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   14310                 :   }
   14311              20 :   if (SWIG_IsTmpObj(res3)) {
   14312              10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   14313                 :   } else {
   14314               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14315               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   14316                 :   }
   14317              20 :   if (SWIG_IsTmpObj(res4)) {
   14318              10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   14319                 :   } else {
   14320               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14321               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   14322                 :   }
   14323              20 :   if (SWIG_IsTmpObj(res5)) {
   14324              10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   14325                 :   } else {
   14326               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14327               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   14328                 :   }
   14329              20 :   if (SWIG_IsTmpObj(res6)) {
   14330              10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   14331                 :   } else {
   14332               0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14333               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   14334                 :   }
   14335                 :   {
   14336                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14337                 :     
   14338              10 :     CPLFree(psProgressInfo);
   14339                 :     
   14340                 :   }
   14341              10 :   return resultobj;
   14342                 : fail:
   14343                 :   {
   14344                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14345                 :     
   14346               0 :     CPLFree(psProgressInfo);
   14347                 :     
   14348                 :   }
   14349               0 :   return NULL;
   14350                 : }
   14351                 : 
   14352                 : 
   14353               3 : SWIGINTERN PyObject *_wrap_Band_SetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14354               3 :   PyObject *resultobj = 0;
   14355               3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14356                 :   double arg2 ;
   14357                 :   double arg3 ;
   14358                 :   double arg4 ;
   14359                 :   double arg5 ;
   14360               3 :   void *argp1 = 0 ;
   14361               3 :   int res1 = 0 ;
   14362                 :   double val2 ;
   14363               3 :   int ecode2 = 0 ;
   14364                 :   double val3 ;
   14365               3 :   int ecode3 = 0 ;
   14366                 :   double val4 ;
   14367               3 :   int ecode4 = 0 ;
   14368                 :   double val5 ;
   14369               3 :   int ecode5 = 0 ;
   14370               3 :   PyObject * obj0 = 0 ;
   14371               3 :   PyObject * obj1 = 0 ;
   14372               3 :   PyObject * obj2 = 0 ;
   14373               3 :   PyObject * obj3 = 0 ;
   14374               3 :   PyObject * obj4 = 0 ;
   14375                 :   CPLErr result;
   14376                 :   
   14377               3 :   if (!PyArg_ParseTuple(args,(char *)"OOOOO:Band_SetStatistics",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   14378               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14379               3 :   if (!SWIG_IsOK(res1)) {
   14380               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14381                 :   }
   14382               3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14383               3 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   14384               3 :   if (!SWIG_IsOK(ecode2)) {
   14385               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetStatistics" "', argument " "2"" of type '" "double""'");
   14386                 :   } 
   14387               3 :   arg2 = static_cast< double >(val2);
   14388               3 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   14389               3 :   if (!SWIG_IsOK(ecode3)) {
   14390               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetStatistics" "', argument " "3"" of type '" "double""'");
   14391                 :   } 
   14392               3 :   arg3 = static_cast< double >(val3);
   14393               3 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   14394               3 :   if (!SWIG_IsOK(ecode4)) {
   14395               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_SetStatistics" "', argument " "4"" of type '" "double""'");
   14396                 :   } 
   14397               3 :   arg4 = static_cast< double >(val4);
   14398               3 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   14399               3 :   if (!SWIG_IsOK(ecode5)) {
   14400               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_SetStatistics" "', argument " "5"" of type '" "double""'");
   14401                 :   } 
   14402               3 :   arg5 = static_cast< double >(val5);
   14403                 :   {
   14404               3 :     if ( bUseExceptions ) {
   14405               0 :       CPLErrorReset();
   14406                 :     }
   14407               3 :     result = (CPLErr)GDALRasterBandShadow_SetStatistics(arg1,arg2,arg3,arg4,arg5);
   14408               3 :     if ( bUseExceptions ) {
   14409               0 :       CPLErr eclass = CPLGetLastErrorType();
   14410               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14411               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14412                 :       }
   14413                 :     }
   14414                 :   }
   14415               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14416               3 :   return resultobj;
   14417                 : fail:
   14418               0 :   return NULL;
   14419                 : }
   14420                 : 
   14421                 : 
   14422              94 : SWIGINTERN PyObject *_wrap_Band_GetOverviewCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14423              94 :   PyObject *resultobj = 0;
   14424              94 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14425              94 :   void *argp1 = 0 ;
   14426              94 :   int res1 = 0 ;
   14427              94 :   PyObject * obj0 = 0 ;
   14428                 :   int result;
   14429                 :   
   14430              94 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetOverviewCount",&obj0)) SWIG_fail;
   14431              94 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14432              94 :   if (!SWIG_IsOK(res1)) {
   14433               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverviewCount" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14434                 :   }
   14435              94 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14436                 :   {
   14437              94 :     if ( bUseExceptions ) {
   14438               0 :       CPLErrorReset();
   14439                 :     }
   14440              94 :     result = (int)GDALRasterBandShadow_GetOverviewCount(arg1);
   14441              94 :     if ( bUseExceptions ) {
   14442               0 :       CPLErr eclass = CPLGetLastErrorType();
   14443               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14444               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14445                 :       }
   14446                 :     }
   14447                 :   }
   14448              94 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14449              94 :   return resultobj;
   14450                 : fail:
   14451               0 :   return NULL;
   14452                 : }
   14453                 : 
   14454                 : 
   14455             289 : SWIGINTERN PyObject *_wrap_Band_GetOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14456             289 :   PyObject *resultobj = 0;
   14457             289 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14458                 :   int arg2 ;
   14459             289 :   void *argp1 = 0 ;
   14460             289 :   int res1 = 0 ;
   14461                 :   int val2 ;
   14462             289 :   int ecode2 = 0 ;
   14463             289 :   PyObject * obj0 = 0 ;
   14464             289 :   PyObject * obj1 = 0 ;
   14465             289 :   GDALRasterBandShadow *result = 0 ;
   14466                 :   
   14467             289 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_GetOverview",&obj0,&obj1)) SWIG_fail;
   14468             289 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14469             289 :   if (!SWIG_IsOK(res1)) {
   14470               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14471                 :   }
   14472             289 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14473             289 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   14474             289 :   if (!SWIG_IsOK(ecode2)) {
   14475               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetOverview" "', argument " "2"" of type '" "int""'");
   14476                 :   } 
   14477             289 :   arg2 = static_cast< int >(val2);
   14478                 :   {
   14479             289 :     if ( bUseExceptions ) {
   14480               0 :       CPLErrorReset();
   14481                 :     }
   14482             289 :     result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetOverview(arg1,arg2);
   14483             289 :     if ( bUseExceptions ) {
   14484               0 :       CPLErr eclass = CPLGetLastErrorType();
   14485               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14486               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14487                 :       }
   14488                 :     }
   14489                 :   }
   14490             289 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14491             289 :   return resultobj;
   14492                 : fail:
   14493               0 :   return NULL;
   14494                 : }
   14495                 : 
   14496                 : 
   14497            2433 : SWIGINTERN PyObject *_wrap_Band_Checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14498            2433 :   PyObject *resultobj = 0;
   14499            2433 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14500            2433 :   int arg2 = (int) 0 ;
   14501            2433 :   int arg3 = (int) 0 ;
   14502            2433 :   int *arg4 = (int *) 0 ;
   14503            2433 :   int *arg5 = (int *) 0 ;
   14504            2433 :   void *argp1 = 0 ;
   14505            2433 :   int res1 = 0 ;
   14506                 :   int val2 ;
   14507            2433 :   int ecode2 = 0 ;
   14508                 :   int val3 ;
   14509            2433 :   int ecode3 = 0 ;
   14510                 :   int val4 ;
   14511                 :   int val5 ;
   14512            2433 :   PyObject * obj0 = 0 ;
   14513            2433 :   PyObject * obj1 = 0 ;
   14514            2433 :   PyObject * obj2 = 0 ;
   14515            2433 :   PyObject * obj3 = 0 ;
   14516            2433 :   PyObject * obj4 = 0 ;
   14517                 :   char *  kwnames[] = {
   14518                 :     (char *) "self",(char *) "xoff",(char *) "yoff",(char *) "xsize",(char *) "ysize", NULL 
   14519            2433 :   };
   14520                 :   int result;
   14521                 :   
   14522            2433 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOO:Band_Checksum",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   14523            2433 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14524            2433 :   if (!SWIG_IsOK(res1)) {
   14525               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Checksum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14526                 :   }
   14527            2433 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14528            2433 :   if (obj1) {
   14529             363 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   14530             363 :     if (!SWIG_IsOK(ecode2)) {
   14531               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Checksum" "', argument " "2"" of type '" "int""'");
   14532                 :     } 
   14533             363 :     arg2 = static_cast< int >(val2);
   14534                 :   }
   14535            2433 :   if (obj2) {
   14536             363 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   14537             363 :     if (!SWIG_IsOK(ecode3)) {
   14538               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Checksum" "', argument " "3"" of type '" "int""'");
   14539                 :     } 
   14540             363 :     arg3 = static_cast< int >(val3);
   14541                 :   }
   14542            2433 :   if (obj3) {
   14543                 :     {
   14544                 :       /* %typemap(in) (int *optional_##int) */
   14545             363 :       if ( obj3 == Py_None ) {
   14546               0 :         arg4 = 0;
   14547                 :       }
   14548             363 :       else if ( PyArg_Parse( obj3,"i" ,&val4 ) ) {
   14549             363 :         arg4 = (int *) &val4;
   14550                 :       }
   14551                 :       else {
   14552               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14553               0 :         SWIG_fail;
   14554                 :       }
   14555                 :     }
   14556                 :   }
   14557            2433 :   if (obj4) {
   14558                 :     {
   14559                 :       /* %typemap(in) (int *optional_##int) */
   14560             363 :       if ( obj4 == Py_None ) {
   14561               0 :         arg5 = 0;
   14562                 :       }
   14563             363 :       else if ( PyArg_Parse( obj4,"i" ,&val5 ) ) {
   14564             363 :         arg5 = (int *) &val5;
   14565                 :       }
   14566                 :       else {
   14567               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14568               0 :         SWIG_fail;
   14569                 :       }
   14570                 :     }
   14571                 :   }
   14572                 :   {
   14573            2433 :     if ( bUseExceptions ) {
   14574               0 :       CPLErrorReset();
   14575                 :     }
   14576            2433 :     result = (int)GDALRasterBandShadow_Checksum(arg1,arg2,arg3,arg4,arg5);
   14577            2433 :     if ( bUseExceptions ) {
   14578               0 :       CPLErr eclass = CPLGetLastErrorType();
   14579               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14580               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14581                 :       }
   14582                 :     }
   14583                 :   }
   14584            2433 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14585            2433 :   return resultobj;
   14586                 : fail:
   14587               0 :   return NULL;
   14588                 : }
   14589                 : 
   14590                 : 
   14591             747 : SWIGINTERN PyObject *_wrap_Band_ComputeRasterMinMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14592             747 :   PyObject *resultobj = 0;
   14593             747 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14594                 :   double *arg2 ;
   14595             747 :   int arg3 = (int) 0 ;
   14596             747 :   void *argp1 = 0 ;
   14597             747 :   int res1 = 0 ;
   14598                 :   double argout2[2] ;
   14599                 :   int val3 ;
   14600             747 :   int ecode3 = 0 ;
   14601             747 :   PyObject * obj0 = 0 ;
   14602             747 :   PyObject * obj1 = 0 ;
   14603                 :   
   14604                 :   {
   14605                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   14606             747 :     arg2 = argout2;
   14607                 :   }
   14608             747 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Band_ComputeRasterMinMax",&obj0,&obj1)) SWIG_fail;
   14609             747 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14610             747 :   if (!SWIG_IsOK(res1)) {
   14611               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeRasterMinMax" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14612                 :   }
   14613             747 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14614             747 :   if (obj1) {
   14615               1 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
   14616               1 :     if (!SWIG_IsOK(ecode3)) {
   14617               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeRasterMinMax" "', argument " "3"" of type '" "int""'");
   14618                 :     } 
   14619               1 :     arg3 = static_cast< int >(val3);
   14620                 :   }
   14621                 :   {
   14622             747 :     if ( bUseExceptions ) {
   14623               0 :       CPLErrorReset();
   14624                 :     }
   14625                 :     GDALRasterBandShadow_ComputeRasterMinMax(arg1,arg2,arg3);
   14626             747 :     if ( bUseExceptions ) {
   14627               0 :       CPLErr eclass = CPLGetLastErrorType();
   14628               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14629               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14630                 :       }
   14631                 :     }
   14632                 :   }
   14633             747 :   resultobj = SWIG_Py_Void();
   14634                 :   {
   14635                 :     /* %typemap(argout) (double argout[ANY]) */
   14636             747 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
   14637             747 :     resultobj = t_output_helper(resultobj,out);
   14638                 :   }
   14639             747 :   return resultobj;
   14640                 : fail:
   14641               0 :   return NULL;
   14642                 : }
   14643                 : 
   14644                 : 
   14645              12 : SWIGINTERN PyObject *_wrap_Band_ComputeBandStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14646              12 :   PyObject *resultobj = 0;
   14647              12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14648                 :   double *arg2 ;
   14649              12 :   int arg3 = (int) 1 ;
   14650              12 :   void *argp1 = 0 ;
   14651              12 :   int res1 = 0 ;
   14652                 :   double argout2[2] ;
   14653                 :   int val3 ;
   14654              12 :   int ecode3 = 0 ;
   14655              12 :   PyObject * obj0 = 0 ;
   14656              12 :   PyObject * obj1 = 0 ;
   14657                 :   
   14658                 :   {
   14659                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   14660              12 :     arg2 = argout2;
   14661                 :   }
   14662              12 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Band_ComputeBandStats",&obj0,&obj1)) SWIG_fail;
   14663              12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14664              12 :   if (!SWIG_IsOK(res1)) {
   14665               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeBandStats" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14666                 :   }
   14667              12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14668              12 :   if (obj1) {
   14669               0 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
   14670               0 :     if (!SWIG_IsOK(ecode3)) {
   14671               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeBandStats" "', argument " "3"" of type '" "int""'");
   14672                 :     } 
   14673               0 :     arg3 = static_cast< int >(val3);
   14674                 :   }
   14675                 :   {
   14676              12 :     if ( bUseExceptions ) {
   14677               0 :       CPLErrorReset();
   14678                 :     }
   14679                 :     GDALRasterBandShadow_ComputeBandStats(arg1,arg2,arg3);
   14680              12 :     if ( bUseExceptions ) {
   14681               0 :       CPLErr eclass = CPLGetLastErrorType();
   14682               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14683               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14684                 :       }
   14685                 :     }
   14686                 :   }
   14687              12 :   resultobj = SWIG_Py_Void();
   14688                 :   {
   14689                 :     /* %typemap(argout) (double argout[ANY]) */
   14690              12 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
   14691              12 :     resultobj = t_output_helper(resultobj,out);
   14692                 :   }
   14693              12 :   return resultobj;
   14694                 : fail:
   14695               0 :   return NULL;
   14696                 : }
   14697                 : 
   14698                 : 
   14699          168032 : SWIGINTERN PyObject *_wrap_Band_Fill(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14700          168032 :   PyObject *resultobj = 0;
   14701          168032 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14702                 :   double arg2 ;
   14703          168032 :   double arg3 = (double) 0.0 ;
   14704          168032 :   void *argp1 = 0 ;
   14705          168032 :   int res1 = 0 ;
   14706                 :   double val2 ;
   14707          168032 :   int ecode2 = 0 ;
   14708                 :   double val3 ;
   14709          168032 :   int ecode3 = 0 ;
   14710          168032 :   PyObject * obj0 = 0 ;
   14711          168032 :   PyObject * obj1 = 0 ;
   14712          168032 :   PyObject * obj2 = 0 ;
   14713                 :   CPLErr result;
   14714                 :   
   14715          168032 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:Band_Fill",&obj0,&obj1,&obj2)) SWIG_fail;
   14716          168032 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14717          168032 :   if (!SWIG_IsOK(res1)) {
   14718               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Fill" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14719                 :   }
   14720          168032 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14721          168032 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   14722          168032 :   if (!SWIG_IsOK(ecode2)) {
   14723               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Fill" "', argument " "2"" of type '" "double""'");
   14724                 :   } 
   14725          168032 :   arg2 = static_cast< double >(val2);
   14726          168032 :   if (obj2) {
   14727             220 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
   14728             220 :     if (!SWIG_IsOK(ecode3)) {
   14729               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Fill" "', argument " "3"" of type '" "double""'");
   14730                 :     } 
   14731             220 :     arg3 = static_cast< double >(val3);
   14732                 :   }
   14733                 :   {
   14734          168032 :     if ( bUseExceptions ) {
   14735               0 :       CPLErrorReset();
   14736                 :     }
   14737          168032 :     result = (CPLErr)GDALRasterBandShadow_Fill(arg1,arg2,arg3);
   14738          168032 :     if ( bUseExceptions ) {
   14739               0 :       CPLErr eclass = CPLGetLastErrorType();
   14740               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14741               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14742                 :       }
   14743                 :     }
   14744                 :   }
   14745          336064 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14746          168032 :   return resultobj;
   14747                 : fail:
   14748               0 :   return NULL;
   14749                 : }
   14750                 : 
   14751                 : 
   14752            1381 : SWIGINTERN PyObject *_wrap_Band_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14753            1381 :   PyObject *resultobj = 0;
   14754            1381 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14755                 :   int arg2 ;
   14756                 :   int arg3 ;
   14757                 :   int arg4 ;
   14758                 :   int arg5 ;
   14759                 :   GIntBig arg6 ;
   14760            1381 :   char *arg7 = (char *) 0 ;
   14761            1381 :   int *arg8 = (int *) 0 ;
   14762            1381 :   int *arg9 = (int *) 0 ;
   14763            1381 :   int *arg10 = (int *) 0 ;
   14764            1381 :   int *arg11 = (int *) 0 ;
   14765            1381 :   int *arg12 = (int *) 0 ;
   14766            1381 :   void *argp1 = 0 ;
   14767            1381 :   int res1 = 0 ;
   14768                 :   int val2 ;
   14769            1381 :   int ecode2 = 0 ;
   14770                 :   int val3 ;
   14771            1381 :   int ecode3 = 0 ;
   14772                 :   int val4 ;
   14773            1381 :   int ecode4 = 0 ;
   14774                 :   int val5 ;
   14775            1381 :   int ecode5 = 0 ;
   14776            1381 :   int alloc6 = 0 ;
   14777                 :   int val8 ;
   14778                 :   int val9 ;
   14779                 :   int val10 ;
   14780                 :   int val11 ;
   14781                 :   int val12 ;
   14782            1381 :   PyObject * obj0 = 0 ;
   14783            1381 :   PyObject * obj1 = 0 ;
   14784            1381 :   PyObject * obj2 = 0 ;
   14785            1381 :   PyObject * obj3 = 0 ;
   14786            1381 :   PyObject * obj4 = 0 ;
   14787            1381 :   PyObject * obj5 = 0 ;
   14788            1381 :   PyObject * obj6 = 0 ;
   14789            1381 :   PyObject * obj7 = 0 ;
   14790            1381 :   PyObject * obj8 = 0 ;
   14791            1381 :   PyObject * obj9 = 0 ;
   14792            1381 :   PyObject * obj10 = 0 ;
   14793                 :   char *  kwnames[] = {
   14794                 :     (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 
   14795            1381 :   };
   14796                 :   CPLErr result;
   14797                 :   
   14798            1381 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|OOOOO:Band_WriteRaster",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
   14799            1381 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14800            1381 :   if (!SWIG_IsOK(res1)) {
   14801               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_WriteRaster" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14802                 :   }
   14803            1381 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14804            1381 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   14805            1381 :   if (!SWIG_IsOK(ecode2)) {
   14806               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_WriteRaster" "', argument " "2"" of type '" "int""'");
   14807                 :   } 
   14808            1381 :   arg2 = static_cast< int >(val2);
   14809            1381 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   14810            1381 :   if (!SWIG_IsOK(ecode3)) {
   14811               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_WriteRaster" "', argument " "3"" of type '" "int""'");
   14812                 :   } 
   14813            1381 :   arg3 = static_cast< int >(val3);
   14814            1381 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   14815            1381 :   if (!SWIG_IsOK(ecode4)) {
   14816               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_WriteRaster" "', argument " "4"" of type '" "int""'");
   14817                 :   } 
   14818            1381 :   arg4 = static_cast< int >(val4);
   14819            1381 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   14820            1381 :   if (!SWIG_IsOK(ecode5)) {
   14821               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_WriteRaster" "', argument " "5"" of type '" "int""'");
   14822                 :   } 
   14823            1381 :   arg5 = static_cast< int >(val5);
   14824                 :   {
   14825                 :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   14826                 : #if PY_VERSION_HEX>=0x03000000
   14827                 :     if (PyUnicode_Check(obj5))
   14828                 :     {
   14829                 :       size_t safeLen = 0;
   14830                 :       int ret = SWIG_AsCharPtrAndSize(obj5, (char**) &arg7, &safeLen, &alloc6);
   14831                 :       if (!SWIG_IsOK(ret)) {
   14832                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
   14833                 :       }
   14834                 :       
   14835                 :       if (safeLen) safeLen--;
   14836                 :       arg6 = (GIntBig) safeLen;
   14837                 :     }
   14838                 :     else if (PyBytes_Check(obj5))
   14839                 :     {
   14840                 :       Py_ssize_t safeLen = 0;
   14841                 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   14842                 :       arg6 = (GIntBig) safeLen;
   14843                 :     }
   14844                 :     else
   14845                 :     {
   14846                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
   14847                 :       SWIG_fail;
   14848                 :     }
   14849                 : #else
   14850            1381 :     if (PyString_Check(obj5))
   14851                 :     {
   14852            1380 :       Py_ssize_t safeLen = 0;
   14853            1380 :       PyString_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   14854            1380 :       arg6 = (GIntBig) safeLen;
   14855                 :     }
   14856                 :     else
   14857                 :     {
   14858               1 :       PyErr_SetString(PyExc_TypeError, "not a string");
   14859               1 :       SWIG_fail;
   14860                 :     }
   14861                 : #endif
   14862                 :   }
   14863            1380 :   if (obj6) {
   14864                 :     {
   14865                 :       /* %typemap(in) (int *optional_##int) */
   14866              29 :       if ( obj6 == Py_None ) {
   14867               0 :         arg8 = 0;
   14868                 :       }
   14869              29 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   14870              29 :         arg8 = (int *) &val8;
   14871                 :       }
   14872                 :       else {
   14873               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14874               0 :         SWIG_fail;
   14875                 :       }
   14876                 :     }
   14877                 :   }
   14878            1380 :   if (obj7) {
   14879                 :     {
   14880                 :       /* %typemap(in) (int *optional_##int) */
   14881              29 :       if ( obj7 == Py_None ) {
   14882               0 :         arg9 = 0;
   14883                 :       }
   14884              29 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   14885              29 :         arg9 = (int *) &val9;
   14886                 :       }
   14887                 :       else {
   14888               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14889               0 :         SWIG_fail;
   14890                 :       }
   14891                 :     }
   14892                 :   }
   14893            1380 :   if (obj8) {
   14894                 :     {
   14895                 :       /* %typemap(in) (int *optional_##int) */
   14896              50 :       if ( obj8 == Py_None ) {
   14897               0 :         arg10 = 0;
   14898                 :       }
   14899              50 :       else if ( PyArg_Parse( obj8,"i" ,&val10 ) ) {
   14900              50 :         arg10 = (int *) &val10;
   14901                 :       }
   14902                 :       else {
   14903               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14904               0 :         SWIG_fail;
   14905                 :       }
   14906                 :     }
   14907                 :   }
   14908            1380 :   if (obj9) {
   14909                 :     {
   14910                 :       /* %typemap(in) (int *optional_##int) */
   14911               0 :       if ( obj9 == Py_None ) {
   14912               0 :         arg11 = 0;
   14913                 :       }
   14914               0 :       else if ( PyArg_Parse( obj9,"i" ,&val11 ) ) {
   14915               0 :         arg11 = (int *) &val11;
   14916                 :       }
   14917                 :       else {
   14918               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14919               0 :         SWIG_fail;
   14920                 :       }
   14921                 :     }
   14922                 :   }
   14923            1380 :   if (obj10) {
   14924                 :     {
   14925                 :       /* %typemap(in) (int *optional_##int) */
   14926               0 :       if ( obj10 == Py_None ) {
   14927               0 :         arg12 = 0;
   14928                 :       }
   14929               0 :       else if ( PyArg_Parse( obj10,"i" ,&val12 ) ) {
   14930               0 :         arg12 = (int *) &val12;
   14931                 :       }
   14932                 :       else {
   14933               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14934               0 :         SWIG_fail;
   14935                 :       }
   14936                 :     }
   14937                 :   }
   14938                 :   {
   14939            1380 :     if ( bUseExceptions ) {
   14940               0 :       CPLErrorReset();
   14941                 :     }
   14942            1380 :     result = (CPLErr)GDALRasterBandShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   14943            1380 :     if ( bUseExceptions ) {
   14944               0 :       CPLErr eclass = CPLGetLastErrorType();
   14945               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14946               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14947                 :       }
   14948                 :     }
   14949                 :   }
   14950            2760 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14951                 :   {
   14952                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   14953            1380 :     if( alloc6 == SWIG_NEWOBJ ) {
   14954               0 :       delete[] arg7;
   14955                 :     }
   14956                 :   }
   14957            1380 :   return resultobj;
   14958                 : fail:
   14959                 :   {
   14960                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   14961               1 :     if( alloc6 == SWIG_NEWOBJ ) {
   14962               0 :       delete[] arg7;
   14963                 :     }
   14964                 :   }
   14965               1 :   return NULL;
   14966                 : }
   14967                 : 
   14968                 : 
   14969              11 : SWIGINTERN PyObject *_wrap_Band_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14970              11 :   PyObject *resultobj = 0;
   14971              11 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14972              11 :   void *argp1 = 0 ;
   14973              11 :   int res1 = 0 ;
   14974              11 :   PyObject * obj0 = 0 ;
   14975                 :   
   14976              11 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_FlushCache",&obj0)) SWIG_fail;
   14977              11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14978              11 :   if (!SWIG_IsOK(res1)) {
   14979               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_FlushCache" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14980                 :   }
   14981              11 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14982                 :   {
   14983              11 :     if ( bUseExceptions ) {
   14984               0 :       CPLErrorReset();
   14985                 :     }
   14986                 :     GDALRasterBandShadow_FlushCache(arg1);
   14987              11 :     if ( bUseExceptions ) {
   14988               0 :       CPLErr eclass = CPLGetLastErrorType();
   14989               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14990               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14991                 :       }
   14992                 :     }
   14993                 :   }
   14994              11 :   resultobj = SWIG_Py_Void();
   14995              11 :   return resultobj;
   14996                 : fail:
   14997               0 :   return NULL;
   14998                 : }
   14999                 : 
   15000                 : 
   15001              64 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15002              64 :   PyObject *resultobj = 0;
   15003              64 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15004              64 :   void *argp1 = 0 ;
   15005              64 :   int res1 = 0 ;
   15006              64 :   PyObject * obj0 = 0 ;
   15007              64 :   GDALColorTableShadow *result = 0 ;
   15008                 :   
   15009              64 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetRasterColorTable",&obj0)) SWIG_fail;
   15010              64 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15011              64 :   if (!SWIG_IsOK(res1)) {
   15012               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15013                 :   }
   15014              64 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15015                 :   {
   15016              64 :     if ( bUseExceptions ) {
   15017               0 :       CPLErrorReset();
   15018                 :     }
   15019              64 :     result = (GDALColorTableShadow *)GDALRasterBandShadow_GetRasterColorTable(arg1);
   15020              64 :     if ( bUseExceptions ) {
   15021               0 :       CPLErr eclass = CPLGetLastErrorType();
   15022               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15023               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15024                 :       }
   15025                 :     }
   15026                 :   }
   15027              64 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   15028              64 :   return resultobj;
   15029                 : fail:
   15030               0 :   return NULL;
   15031                 : }
   15032                 : 
   15033                 : 
   15034              19 : SWIGINTERN PyObject *_wrap_Band_GetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15035              19 :   PyObject *resultobj = 0;
   15036              19 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15037              19 :   void *argp1 = 0 ;
   15038              19 :   int res1 = 0 ;
   15039              19 :   PyObject * obj0 = 0 ;
   15040              19 :   GDALColorTableShadow *result = 0 ;
   15041                 :   
   15042              19 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetColorTable",&obj0)) SWIG_fail;
   15043              19 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15044              19 :   if (!SWIG_IsOK(res1)) {
   15045               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15046                 :   }
   15047              19 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15048                 :   {
   15049              19 :     if ( bUseExceptions ) {
   15050               0 :       CPLErrorReset();
   15051                 :     }
   15052              19 :     result = (GDALColorTableShadow *)GDALRasterBandShadow_GetColorTable(arg1);
   15053              19 :     if ( bUseExceptions ) {
   15054               0 :       CPLErr eclass = CPLGetLastErrorType();
   15055               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15056               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15057                 :       }
   15058                 :     }
   15059                 :   }
   15060              19 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   15061              19 :   return resultobj;
   15062                 : fail:
   15063               0 :   return NULL;
   15064                 : }
   15065                 : 
   15066                 : 
   15067              17 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15068              17 :   PyObject *resultobj = 0;
   15069              17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15070              17 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   15071              17 :   void *argp1 = 0 ;
   15072              17 :   int res1 = 0 ;
   15073              17 :   void *argp2 = 0 ;
   15074              17 :   int res2 = 0 ;
   15075              17 :   PyObject * obj0 = 0 ;
   15076              17 :   PyObject * obj1 = 0 ;
   15077                 :   int result;
   15078                 :   
   15079              17 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetRasterColorTable",&obj0,&obj1)) SWIG_fail;
   15080              17 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15081              17 :   if (!SWIG_IsOK(res1)) {
   15082               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15083                 :   }
   15084              17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15085              17 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   15086              17 :   if (!SWIG_IsOK(res2)) {
   15087               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetRasterColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   15088                 :   }
   15089              17 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   15090                 :   {
   15091              17 :     if ( bUseExceptions ) {
   15092               0 :       CPLErrorReset();
   15093                 :     }
   15094              17 :     result = (int)GDALRasterBandShadow_SetRasterColorTable(arg1,arg2);
   15095              17 :     if ( bUseExceptions ) {
   15096               0 :       CPLErr eclass = CPLGetLastErrorType();
   15097               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15098               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15099                 :       }
   15100                 :     }
   15101                 :   }
   15102              17 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15103              17 :   return resultobj;
   15104                 : fail:
   15105               0 :   return NULL;
   15106                 : }
   15107                 : 
   15108                 : 
   15109               7 : SWIGINTERN PyObject *_wrap_Band_SetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15110               7 :   PyObject *resultobj = 0;
   15111               7 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15112               7 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   15113               7 :   void *argp1 = 0 ;
   15114               7 :   int res1 = 0 ;
   15115               7 :   void *argp2 = 0 ;
   15116               7 :   int res2 = 0 ;
   15117               7 :   PyObject * obj0 = 0 ;
   15118               7 :   PyObject * obj1 = 0 ;
   15119                 :   int result;
   15120                 :   
   15121               7 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetColorTable",&obj0,&obj1)) SWIG_fail;
   15122               7 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15123               7 :   if (!SWIG_IsOK(res1)) {
   15124               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15125                 :   }
   15126               7 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15127               7 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   15128               7 :   if (!SWIG_IsOK(res2)) {
   15129               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   15130                 :   }
   15131               7 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   15132                 :   {
   15133               7 :     if ( bUseExceptions ) {
   15134               0 :       CPLErrorReset();
   15135                 :     }
   15136               7 :     result = (int)GDALRasterBandShadow_SetColorTable(arg1,arg2);
   15137               7 :     if ( bUseExceptions ) {
   15138               0 :       CPLErr eclass = CPLGetLastErrorType();
   15139               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15140               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15141                 :       }
   15142                 :     }
   15143                 :   }
   15144               7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15145               7 :   return resultobj;
   15146                 : fail:
   15147               0 :   return NULL;
   15148                 : }
   15149                 : 
   15150                 : 
   15151              25 : SWIGINTERN PyObject *_wrap_Band_GetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15152              25 :   PyObject *resultobj = 0;
   15153              25 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15154              25 :   void *argp1 = 0 ;
   15155              25 :   int res1 = 0 ;
   15156              25 :   PyObject * obj0 = 0 ;
   15157              25 :   GDALRasterAttributeTableShadow *result = 0 ;
   15158                 :   
   15159              25 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetDefaultRAT",&obj0)) SWIG_fail;
   15160              25 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15161              25 :   if (!SWIG_IsOK(res1)) {
   15162               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15163                 :   }
   15164              25 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15165                 :   {
   15166              25 :     if ( bUseExceptions ) {
   15167               0 :       CPLErrorReset();
   15168                 :     }
   15169              25 :     result = (GDALRasterAttributeTableShadow *)GDALRasterBandShadow_GetDefaultRAT(arg1);
   15170              25 :     if ( bUseExceptions ) {
   15171               0 :       CPLErr eclass = CPLGetLastErrorType();
   15172               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15173               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15174                 :       }
   15175                 :     }
   15176                 :   }
   15177              25 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   15178              25 :   return resultobj;
   15179                 : fail:
   15180               0 :   return NULL;
   15181                 : }
   15182                 : 
   15183                 : 
   15184               2 : SWIGINTERN PyObject *_wrap_Band_SetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15185               2 :   PyObject *resultobj = 0;
   15186               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15187               2 :   GDALRasterAttributeTableShadow *arg2 = (GDALRasterAttributeTableShadow *) 0 ;
   15188               2 :   void *argp1 = 0 ;
   15189               2 :   int res1 = 0 ;
   15190               2 :   void *argp2 = 0 ;
   15191               2 :   int res2 = 0 ;
   15192               2 :   PyObject * obj0 = 0 ;
   15193               2 :   PyObject * obj1 = 0 ;
   15194                 :   int result;
   15195                 :   
   15196               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetDefaultRAT",&obj0,&obj1)) SWIG_fail;
   15197               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15198               2 :   if (!SWIG_IsOK(res1)) {
   15199               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15200                 :   }
   15201               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15202               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   15203               2 :   if (!SWIG_IsOK(res2)) {
   15204               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetDefaultRAT" "', argument " "2"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   15205                 :   }
   15206               2 :   arg2 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp2);
   15207                 :   {
   15208               2 :     if ( bUseExceptions ) {
   15209               0 :       CPLErrorReset();
   15210                 :     }
   15211               2 :     result = (int)GDALRasterBandShadow_SetDefaultRAT(arg1,arg2);
   15212               2 :     if ( bUseExceptions ) {
   15213               0 :       CPLErr eclass = CPLGetLastErrorType();
   15214               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15215               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15216                 :       }
   15217                 :     }
   15218                 :   }
   15219               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15220               2 :   return resultobj;
   15221                 : fail:
   15222               0 :   return NULL;
   15223                 : }
   15224                 : 
   15225                 : 
   15226             132 : SWIGINTERN PyObject *_wrap_Band_GetMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15227             132 :   PyObject *resultobj = 0;
   15228             132 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15229             132 :   void *argp1 = 0 ;
   15230             132 :   int res1 = 0 ;
   15231             132 :   PyObject * obj0 = 0 ;
   15232             132 :   GDALRasterBandShadow *result = 0 ;
   15233                 :   
   15234             132 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMaskBand",&obj0)) SWIG_fail;
   15235             132 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15236             132 :   if (!SWIG_IsOK(res1)) {
   15237               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15238                 :   }
   15239             132 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15240                 :   {
   15241             132 :     if ( bUseExceptions ) {
   15242               0 :       CPLErrorReset();
   15243                 :     }
   15244             132 :     result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetMaskBand(arg1);
   15245             132 :     if ( bUseExceptions ) {
   15246               0 :       CPLErr eclass = CPLGetLastErrorType();
   15247               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15248               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15249                 :       }
   15250                 :     }
   15251                 :   }
   15252             132 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15253             132 :   return resultobj;
   15254                 : fail:
   15255               0 :   return NULL;
   15256                 : }
   15257                 : 
   15258                 : 
   15259              90 : SWIGINTERN PyObject *_wrap_Band_GetMaskFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15260              90 :   PyObject *resultobj = 0;
   15261              90 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15262              90 :   void *argp1 = 0 ;
   15263              90 :   int res1 = 0 ;
   15264              90 :   PyObject * obj0 = 0 ;
   15265                 :   int result;
   15266                 :   
   15267              90 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMaskFlags",&obj0)) SWIG_fail;
   15268              90 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15269              90 :   if (!SWIG_IsOK(res1)) {
   15270               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskFlags" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15271                 :   }
   15272              90 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15273                 :   {
   15274              90 :     if ( bUseExceptions ) {
   15275               0 :       CPLErrorReset();
   15276                 :     }
   15277              90 :     result = (int)GDALRasterBandShadow_GetMaskFlags(arg1);
   15278              90 :     if ( bUseExceptions ) {
   15279               0 :       CPLErr eclass = CPLGetLastErrorType();
   15280               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15281               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15282                 :       }
   15283                 :     }
   15284                 :   }
   15285              90 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15286              90 :   return resultobj;
   15287                 : fail:
   15288               0 :   return NULL;
   15289                 : }
   15290                 : 
   15291                 : 
   15292              12 : SWIGINTERN PyObject *_wrap_Band_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15293              12 :   PyObject *resultobj = 0;
   15294              12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15295                 :   int arg2 ;
   15296              12 :   void *argp1 = 0 ;
   15297              12 :   int res1 = 0 ;
   15298                 :   int val2 ;
   15299              12 :   int ecode2 = 0 ;
   15300              12 :   PyObject * obj0 = 0 ;
   15301              12 :   PyObject * obj1 = 0 ;
   15302                 :   CPLErr result;
   15303                 :   
   15304              12 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_CreateMaskBand",&obj0,&obj1)) SWIG_fail;
   15305              12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15306              12 :   if (!SWIG_IsOK(res1)) {
   15307               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_CreateMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15308                 :   }
   15309              12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15310              12 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   15311              12 :   if (!SWIG_IsOK(ecode2)) {
   15312               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   15313                 :   } 
   15314              12 :   arg2 = static_cast< int >(val2);
   15315                 :   {
   15316              12 :     if ( bUseExceptions ) {
   15317               0 :       CPLErrorReset();
   15318                 :     }
   15319              12 :     result = (CPLErr)GDALRasterBandShadow_CreateMaskBand(arg1,arg2);
   15320              12 :     if ( bUseExceptions ) {
   15321               0 :       CPLErr eclass = CPLGetLastErrorType();
   15322               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15323               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15324                 :       }
   15325                 :     }
   15326                 :   }
   15327              24 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15328              12 :   return resultobj;
   15329                 : fail:
   15330               0 :   return NULL;
   15331                 : }
   15332                 : 
   15333                 : 
   15334               9 : SWIGINTERN PyObject *_wrap_Band_GetHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15335               9 :   PyObject *resultobj = 0;
   15336               9 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15337               9 :   double arg2 = (double) -0.5 ;
   15338               9 :   double arg3 = (double) 255.5 ;
   15339               9 :   int arg4 = (int) 256 ;
   15340               9 :   int *arg5 = (int *) NULL ;
   15341               9 :   int arg6 = (int) 0 ;
   15342               9 :   int arg7 = (int) 1 ;
   15343               9 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   15344               9 :   void *arg9 = (void *) NULL ;
   15345               9 :   void *argp1 = 0 ;
   15346               9 :   int res1 = 0 ;
   15347                 :   double val2 ;
   15348               9 :   int ecode2 = 0 ;
   15349                 :   double val3 ;
   15350               9 :   int ecode3 = 0 ;
   15351                 :   int val6 ;
   15352               9 :   int ecode6 = 0 ;
   15353                 :   int val7 ;
   15354               9 :   int ecode7 = 0 ;
   15355               9 :   PyObject * obj0 = 0 ;
   15356               9 :   PyObject * obj1 = 0 ;
   15357               9 :   PyObject * obj2 = 0 ;
   15358               9 :   PyObject * obj3 = 0 ;
   15359               9 :   PyObject * obj4 = 0 ;
   15360               9 :   PyObject * obj5 = 0 ;
   15361               9 :   PyObject * obj6 = 0 ;
   15362               9 :   PyObject * obj7 = 0 ;
   15363                 :   char *  kwnames[] = {
   15364                 :     (char *) "self",(char *) "min",(char *) "max",(char *) "buckets",(char *) "include_out_of_range",(char *) "approx_ok",(char *) "callback",(char *) "callback_data", NULL 
   15365               9 :   };
   15366                 :   CPLErr result;
   15367                 :   
   15368                 :   {
   15369                 :     /* %typemap(in) int buckets, int* panHistogram -> list */
   15370               9 :     arg5 = (int *) VSICalloc(sizeof(int),arg4);
   15371                 :   }
   15372                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   15373                 :   PyProgressData *psProgressInfo;
   15374               9 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   15375               9 :   psProgressInfo->nLastReported = -1;
   15376               9 :   psProgressInfo->psPyCallback = NULL;
   15377               9 :   psProgressInfo->psPyCallbackData = NULL;
   15378               9 :   arg9 = psProgressInfo;
   15379               9 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:Band_GetHistogram",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   15380               9 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15381               9 :   if (!SWIG_IsOK(res1)) {
   15382               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15383                 :   }
   15384               9 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15385               9 :   if (obj1) {
   15386               3 :     ecode2 = SWIG_AsVal_double(obj1, &val2);
   15387               3 :     if (!SWIG_IsOK(ecode2)) {
   15388               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetHistogram" "', argument " "2"" of type '" "double""'");
   15389                 :     } 
   15390               3 :     arg2 = static_cast< double >(val2);
   15391                 :   }
   15392               9 :   if (obj2) {
   15393               3 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
   15394               3 :     if (!SWIG_IsOK(ecode3)) {
   15395               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetHistogram" "', argument " "3"" of type '" "double""'");
   15396                 :     } 
   15397               3 :     arg3 = static_cast< double >(val3);
   15398                 :   }
   15399               9 :   if (obj3) {
   15400                 :     {
   15401                 :       /* %typemap(in) int buckets, int* panHistogram -> list */
   15402               3 :       int requested_buckets = 0;
   15403               3 :       SWIG_AsVal_int(obj3, &requested_buckets);
   15404               3 :       if( requested_buckets != arg4 )
   15405                 :       {
   15406               3 :         arg4 = requested_buckets;
   15407               3 :         if (requested_buckets <= 0 || requested_buckets > (int)(INT_MAX / sizeof(int)))
   15408                 :         {
   15409               0 :           PyErr_SetString( PyExc_RuntimeError, "Bad value for buckets" );
   15410               0 :           SWIG_fail;
   15411                 :         }
   15412               3 :         arg5 = (int *) VSIRealloc(arg5, sizeof(int) * requested_buckets);
   15413                 :       }
   15414               3 :       if (arg5 == NULL)
   15415                 :       {
   15416               0 :         PyErr_SetString( PyExc_RuntimeError, "Cannot allocate buckets" );
   15417               0 :         SWIG_fail;
   15418                 :       }
   15419                 :     }
   15420                 :   }
   15421               9 :   if (obj4) {
   15422               2 :     ecode6 = SWIG_AsVal_int(obj4, &val6);
   15423               2 :     if (!SWIG_IsOK(ecode6)) {
   15424               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetHistogram" "', argument " "6"" of type '" "int""'");
   15425                 :     } 
   15426               2 :     arg6 = static_cast< int >(val6);
   15427                 :   }
   15428               9 :   if (obj5) {
   15429               2 :     ecode7 = SWIG_AsVal_int(obj5, &val7);
   15430               2 :     if (!SWIG_IsOK(ecode7)) {
   15431               0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetHistogram" "', argument " "7"" of type '" "int""'");
   15432                 :     } 
   15433               2 :     arg7 = static_cast< int >(val7);
   15434                 :   }
   15435               9 :   if (obj6) {
   15436                 :     {
   15437                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   15438                 :       /* callback_func typemap */
   15439               0 :       if (obj6 && obj6 != Py_None ) {
   15440               0 :         void* cbfunction = NULL;
   15441                 :         SWIG_ConvertPtr( obj6, 
   15442                 :           (void**)&cbfunction,
   15443                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   15444               0 :           SWIG_POINTER_EXCEPTION | 0 );
   15445                 :         
   15446               0 :         if ( cbfunction == GDALTermProgress ) {
   15447               0 :           arg8 = GDALTermProgress;
   15448                 :         } else {
   15449               0 :           if (!PyCallable_Check(obj6)) {
   15450                 :             PyErr_SetString( PyExc_RuntimeError, 
   15451               0 :               "Object given is not a Python function" );
   15452               0 :             SWIG_fail;
   15453                 :           }
   15454               0 :           psProgressInfo->psPyCallback = obj6;
   15455               0 :           arg8 = PyProgressProxy;
   15456                 :         }
   15457                 :         
   15458                 :       }
   15459                 :       
   15460                 :     }
   15461                 :   }
   15462               9 :   if (obj7) {
   15463                 :     {
   15464                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   15465               0 :       psProgressInfo->psPyCallbackData = obj7 ;
   15466                 :     }
   15467                 :   }
   15468                 :   {
   15469               9 :     if ( bUseExceptions ) {
   15470               0 :       CPLErrorReset();
   15471                 :     }
   15472               9 :     result = (CPLErr)GDALRasterBandShadow_GetHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   15473               9 :     if ( bUseExceptions ) {
   15474               0 :       CPLErr eclass = CPLGetLastErrorType();
   15475               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15476               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15477                 :       }
   15478                 :     }
   15479                 :   }
   15480              18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15481                 :   {
   15482                 :     /* %typemap(out) int buckets, int* panHistogram -> list */
   15483               9 :     int *integerarray = arg5;
   15484               9 :     if ( integerarray == NULL ) {
   15485               0 :       resultobj = Py_None;
   15486               0 :       Py_INCREF( resultobj );
   15487                 :     }
   15488                 :     else {
   15489               9 :       resultobj = PyList_New( arg4 );
   15490            1603 :       for ( int i = 0; i < arg4; ++i ) {
   15491            1594 :         PyObject *o =  PyInt_FromLong( integerarray[i] );
   15492            1594 :         PyList_SetItem(resultobj, i, o );
   15493                 :       }
   15494                 :     }
   15495                 :   }
   15496                 :   {
   15497                 :     /* %typemap(freearg) (int buckets, int* panHistogram)*/
   15498               9 :     if ( arg5 ) {
   15499               9 :       VSIFree( arg5 );
   15500                 :     }
   15501                 :   }
   15502                 :   {
   15503                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15504                 :     
   15505               9 :     CPLFree(psProgressInfo);
   15506                 :     
   15507                 :   }
   15508               9 :   return resultobj;
   15509                 : fail:
   15510                 :   {
   15511                 :     /* %typemap(freearg) (int buckets, int* panHistogram)*/
   15512               0 :     if ( arg5 ) {
   15513               0 :       VSIFree( arg5 );
   15514                 :     }
   15515                 :   }
   15516                 :   {
   15517                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15518                 :     
   15519               0 :     CPLFree(psProgressInfo);
   15520                 :     
   15521                 :   }
   15522               0 :   return NULL;
   15523                 : }
   15524                 : 
   15525                 : 
   15526              10 : SWIGINTERN PyObject *_wrap_Band_GetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15527              10 :   PyObject *resultobj = 0;
   15528              10 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15529              10 :   double *arg2 = (double *) NULL ;
   15530              10 :   double *arg3 = (double *) NULL ;
   15531              10 :   int *arg4 = (int *) NULL ;
   15532              10 :   int **arg5 = (int **) NULL ;
   15533              10 :   int arg6 = (int) 1 ;
   15534              10 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   15535              10 :   void *arg8 = (void *) NULL ;
   15536              10 :   void *argp1 = 0 ;
   15537              10 :   int res1 = 0 ;
   15538              10 :   void *argp2 = 0 ;
   15539              10 :   int res2 = 0 ;
   15540              10 :   void *argp3 = 0 ;
   15541              10 :   int res3 = 0 ;
   15542              10 :   void *argp4 = 0 ;
   15543              10 :   int res4 = 0 ;
   15544              10 :   void *argp5 = 0 ;
   15545              10 :   int res5 = 0 ;
   15546                 :   int val6 ;
   15547              10 :   int ecode6 = 0 ;
   15548              10 :   PyObject * obj0 = 0 ;
   15549              10 :   PyObject * obj1 = 0 ;
   15550              10 :   PyObject * obj2 = 0 ;
   15551              10 :   PyObject * obj3 = 0 ;
   15552              10 :   PyObject * obj4 = 0 ;
   15553              10 :   PyObject * obj5 = 0 ;
   15554              10 :   PyObject * obj6 = 0 ;
   15555              10 :   PyObject * obj7 = 0 ;
   15556                 :   char *  kwnames[] = {
   15557                 :     (char *) "self",(char *) "min_ret",(char *) "max_ret",(char *) "buckets_ret",(char *) "ppanHistogram",(char *) "force",(char *) "callback",(char *) "callback_data", NULL 
   15558              10 :   };
   15559                 :   CPLErr result;
   15560                 :   
   15561                 :   double min_val, max_val;
   15562                 :   int buckets_val;
   15563                 :   int *panHistogram;
   15564                 :   
   15565              10 :   arg2 = &min_val;
   15566              10 :   arg3 = &max_val;
   15567              10 :   arg4 = &buckets_val;
   15568              10 :   arg5 = &panHistogram;
   15569                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   15570                 :   PyProgressData *psProgressInfo;
   15571              10 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   15572              10 :   psProgressInfo->nLastReported = -1;
   15573              10 :   psProgressInfo->psPyCallback = NULL;
   15574              10 :   psProgressInfo->psPyCallbackData = NULL;
   15575              10 :   arg8 = psProgressInfo;
   15576              10 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:Band_GetDefaultHistogram",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   15577              10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15578              10 :   if (!SWIG_IsOK(res1)) {
   15579               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15580                 :   }
   15581              10 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15582              10 :   if (obj1) {
   15583               0 :     res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
   15584               0 :     if (!SWIG_IsOK(res2)) {
   15585               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_GetDefaultHistogram" "', argument " "2"" of type '" "double *""'"); 
   15586                 :     }
   15587               0 :     arg2 = reinterpret_cast< double * >(argp2);
   15588                 :   }
   15589              10 :   if (obj2) {
   15590               0 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
   15591               0 :     if (!SWIG_IsOK(res3)) {
   15592               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_GetDefaultHistogram" "', argument " "3"" of type '" "double *""'"); 
   15593                 :     }
   15594               0 :     arg3 = reinterpret_cast< double * >(argp3);
   15595                 :   }
   15596              10 :   if (obj3) {
   15597               0 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
   15598               0 :     if (!SWIG_IsOK(res4)) {
   15599               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_GetDefaultHistogram" "', argument " "4"" of type '" "int *""'"); 
   15600                 :     }
   15601               0 :     arg4 = reinterpret_cast< int * >(argp4);
   15602                 :   }
   15603              10 :   if (obj4) {
   15604               0 :     res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_int, 0 |  0 );
   15605               0 :     if (!SWIG_IsOK(res5)) {
   15606               0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Band_GetDefaultHistogram" "', argument " "5"" of type '" "int **""'"); 
   15607                 :     }
   15608               0 :     arg5 = reinterpret_cast< int ** >(argp5);
   15609                 :   }
   15610              10 :   if (obj5) {
   15611               4 :     ecode6 = SWIG_AsVal_int(obj5, &val6);
   15612               4 :     if (!SWIG_IsOK(ecode6)) {
   15613               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDefaultHistogram" "', argument " "6"" of type '" "int""'");
   15614                 :     } 
   15615               4 :     arg6 = static_cast< int >(val6);
   15616                 :   }
   15617              10 :   if (obj6) {
   15618                 :     {
   15619                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   15620                 :       /* callback_func typemap */
   15621               1 :       if (obj6 && obj6 != Py_None ) {
   15622               1 :         void* cbfunction = NULL;
   15623                 :         SWIG_ConvertPtr( obj6, 
   15624                 :           (void**)&cbfunction,
   15625                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   15626               1 :           SWIG_POINTER_EXCEPTION | 0 );
   15627                 :         
   15628               1 :         if ( cbfunction == GDALTermProgress ) {
   15629               1 :           arg7 = GDALTermProgress;
   15630                 :         } else {
   15631               0 :           if (!PyCallable_Check(obj6)) {
   15632                 :             PyErr_SetString( PyExc_RuntimeError, 
   15633               0 :               "Object given is not a Python function" );
   15634               0 :             SWIG_fail;
   15635                 :           }
   15636               0 :           psProgressInfo->psPyCallback = obj6;
   15637               0 :           arg7 = PyProgressProxy;
   15638                 :         }
   15639                 :         
   15640                 :       }
   15641                 :       
   15642                 :     }
   15643                 :   }
   15644              10 :   if (obj7) {
   15645                 :     {
   15646                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   15647               0 :       psProgressInfo->psPyCallbackData = obj7 ;
   15648                 :     }
   15649                 :   }
   15650                 :   {
   15651              10 :     if ( bUseExceptions ) {
   15652               0 :       CPLErrorReset();
   15653                 :     }
   15654              10 :     result = (CPLErr)GDALRasterBandShadow_GetDefaultHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   15655              10 :     if ( bUseExceptions ) {
   15656               0 :       CPLErr eclass = CPLGetLastErrorType();
   15657               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15658               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15659                 :       }
   15660                 :     }
   15661                 :   }
   15662              20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15663                 :   {
   15664                 :     int i;
   15665              10 :     PyObject *psList = NULL;
   15666                 :     
   15667              10 :     Py_XDECREF(resultobj);
   15668                 :     
   15669              10 :     if (panHistogram)
   15670                 :     {
   15671               9 :       psList = PyList_New(buckets_val);
   15672            1294 :       for( i = 0; i < buckets_val; i++ )
   15673            1285 :       PyList_SetItem(psList, i, Py_BuildValue("i", panHistogram[i] ));
   15674                 :       
   15675               9 :       CPLFree( panHistogram );
   15676                 :       
   15677               9 :       resultobj = Py_BuildValue( "(ddiO)", min_val, max_val, buckets_val, psList );
   15678               9 :       Py_XDECREF(psList);
   15679                 :     }
   15680                 :     else
   15681                 :     {
   15682               1 :       resultobj = Py_None;
   15683               1 :       Py_INCREF(resultobj);
   15684                 :     }
   15685                 :   }
   15686                 :   {
   15687                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15688                 :     
   15689              10 :     CPLFree(psProgressInfo);
   15690                 :     
   15691                 :   }
   15692              10 :   return resultobj;
   15693                 : fail:
   15694                 :   {
   15695                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15696                 :     
   15697               0 :     CPLFree(psProgressInfo);
   15698                 :     
   15699                 :   }
   15700               0 :   return NULL;
   15701                 : }
   15702                 : 
   15703                 : 
   15704               6 : SWIGINTERN PyObject *_wrap_Band_SetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15705               6 :   PyObject *resultobj = 0;
   15706               6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15707                 :   double arg2 ;
   15708                 :   double arg3 ;
   15709                 :   int arg4 ;
   15710               6 :   int *arg5 = (int *) 0 ;
   15711               6 :   void *argp1 = 0 ;
   15712               6 :   int res1 = 0 ;
   15713                 :   double val2 ;
   15714               6 :   int ecode2 = 0 ;
   15715                 :   double val3 ;
   15716               6 :   int ecode3 = 0 ;
   15717               6 :   PyObject * obj0 = 0 ;
   15718               6 :   PyObject * obj1 = 0 ;
   15719               6 :   PyObject * obj2 = 0 ;
   15720               6 :   PyObject * obj3 = 0 ;
   15721                 :   CPLErr result;
   15722                 :   
   15723               6 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:Band_SetDefaultHistogram",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   15724               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15725               6 :   if (!SWIG_IsOK(res1)) {
   15726               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15727                 :   }
   15728               6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15729               6 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   15730               6 :   if (!SWIG_IsOK(ecode2)) {
   15731               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetDefaultHistogram" "', argument " "2"" of type '" "double""'");
   15732                 :   } 
   15733               6 :   arg2 = static_cast< double >(val2);
   15734               6 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   15735               6 :   if (!SWIG_IsOK(ecode3)) {
   15736               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetDefaultHistogram" "', argument " "3"" of type '" "double""'");
   15737                 :   } 
   15738               6 :   arg3 = static_cast< double >(val3);
   15739                 :   {
   15740                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   15741                 :     /* check if is List */
   15742               6 :     if ( !PySequence_Check(obj3) ) {
   15743               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   15744               0 :       SWIG_fail;
   15745                 :     }
   15746               6 :     arg4 = PySequence_Size(obj3);
   15747               6 :     arg5 = (int*) malloc(arg4*sizeof(int));
   15748              13 :     for( int i = 0; i<arg4; i++ ) {
   15749               7 :       PyObject *o = PySequence_GetItem(obj3,i);
   15750               7 :       if ( !PyArg_Parse(o,"i",&arg5[i]) ) {
   15751               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
   15752               0 :         Py_DECREF(o);
   15753                 :         SWIG_fail;
   15754                 :       }
   15755               7 :       Py_DECREF(o);
   15756                 :     }
   15757                 :   }
   15758                 :   {
   15759               6 :     if ( bUseExceptions ) {
   15760               0 :       CPLErrorReset();
   15761                 :     }
   15762               6 :     result = (CPLErr)GDALRasterBandShadow_SetDefaultHistogram(arg1,arg2,arg3,arg4,arg5);
   15763               6 :     if ( bUseExceptions ) {
   15764               0 :       CPLErr eclass = CPLGetLastErrorType();
   15765               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15766               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15767                 :       }
   15768                 :     }
   15769                 :   }
   15770              12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15771                 :   {
   15772                 :     /* %typemap(freearg) (int nList, int* pList) */
   15773               6 :     if (arg5) {
   15774               6 :       free((void*) arg5);
   15775                 :     }
   15776                 :   }
   15777               6 :   return resultobj;
   15778                 : fail:
   15779                 :   {
   15780                 :     /* %typemap(freearg) (int nList, int* pList) */
   15781               0 :     if (arg5) {
   15782               0 :       free((void*) arg5);
   15783                 :     }
   15784                 :   }
   15785               0 :   return NULL;
   15786                 : }
   15787                 : 
   15788                 : 
   15789              20 : SWIGINTERN PyObject *_wrap_Band_HasArbitraryOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15790              20 :   PyObject *resultobj = 0;
   15791              20 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15792              20 :   void *argp1 = 0 ;
   15793              20 :   int res1 = 0 ;
   15794              20 :   PyObject * obj0 = 0 ;
   15795                 :   bool result;
   15796                 :   
   15797              20 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_HasArbitraryOverviews",&obj0)) SWIG_fail;
   15798              20 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15799              20 :   if (!SWIG_IsOK(res1)) {
   15800               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_HasArbitraryOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15801                 :   }
   15802              20 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15803                 :   {
   15804              20 :     if ( bUseExceptions ) {
   15805               0 :       CPLErrorReset();
   15806                 :     }
   15807              20 :     result = (bool)GDALRasterBandShadow_HasArbitraryOverviews(arg1);
   15808              20 :     if ( bUseExceptions ) {
   15809               0 :       CPLErr eclass = CPLGetLastErrorType();
   15810               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15811               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15812                 :       }
   15813                 :     }
   15814                 :   }
   15815              40 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   15816              20 :   return resultobj;
   15817                 : fail:
   15818               0 :   return NULL;
   15819                 : }
   15820                 : 
   15821                 : 
   15822              12 : SWIGINTERN PyObject *_wrap_Band_GetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15823              12 :   PyObject *resultobj = 0;
   15824              12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15825              12 :   void *argp1 = 0 ;
   15826              12 :   int res1 = 0 ;
   15827              12 :   PyObject * obj0 = 0 ;
   15828              12 :   char **result = 0 ;
   15829                 :   
   15830              12 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetCategoryNames",&obj0)) SWIG_fail;
   15831              12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15832              12 :   if (!SWIG_IsOK(res1)) {
   15833               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15834                 :   }
   15835              12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15836                 :   {
   15837              12 :     if ( bUseExceptions ) {
   15838               0 :       CPLErrorReset();
   15839                 :     }
   15840              12 :     result = (char **)GDALRasterBandShadow_GetCategoryNames(arg1);
   15841              12 :     if ( bUseExceptions ) {
   15842               0 :       CPLErr eclass = CPLGetLastErrorType();
   15843               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15844               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15845                 :       }
   15846                 :     }
   15847                 :   }
   15848                 :   {
   15849                 :     /* %typemap(out) char **options -> ( string ) */
   15850              12 :     char **stringarray = result;
   15851              12 :     if ( stringarray == NULL ) {
   15852               4 :       resultobj = Py_None;
   15853               4 :       Py_INCREF( resultobj );
   15854                 :     }
   15855                 :     else {
   15856               8 :       int len = CSLCount( stringarray );
   15857               8 :       resultobj = PyList_New( len );
   15858             112 :       for ( int i = 0; i < len; ++i ) {
   15859             104 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   15860             104 :         PyList_SetItem(resultobj, i, o );
   15861                 :       }
   15862                 :     }
   15863                 :   }
   15864              12 :   return resultobj;
   15865                 : fail:
   15866               0 :   return NULL;
   15867                 : }
   15868                 : 
   15869                 : 
   15870               4 : SWIGINTERN PyObject *_wrap_Band_SetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15871               4 :   PyObject *resultobj = 0;
   15872               4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15873               4 :   char **arg2 = (char **) 0 ;
   15874               4 :   void *argp1 = 0 ;
   15875               4 :   int res1 = 0 ;
   15876               4 :   PyObject * obj0 = 0 ;
   15877               4 :   PyObject * obj1 = 0 ;
   15878                 :   CPLErr result;
   15879                 :   
   15880               4 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetCategoryNames",&obj0,&obj1)) SWIG_fail;
   15881               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15882               4 :   if (!SWIG_IsOK(res1)) {
   15883               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15884                 :   }
   15885               4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15886                 :   {
   15887                 :     /* %typemap(in) char **options */
   15888                 :     /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   15889               4 :     if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
   15890                 :   #if PY_VERSION_HEX < 0x03000000
   15891                 :       || PyString_Check(obj1)
   15892                 :   #endif
   15893                 :       ) {
   15894               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   15895               0 :       SWIG_fail;
   15896                 :     }
   15897                 :     
   15898               4 :     int size = PySequence_Size(obj1);
   15899               9 :     for (int i = 0; i < size; i++) {
   15900               5 :       PyObject* pyObj = PySequence_GetItem(obj1,i);
   15901               5 :       if (PyUnicode_Check(pyObj))
   15902                 :       {
   15903                 :         char *pszStr;
   15904                 :         Py_ssize_t nLen;
   15905               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   15906                 : #if PY_VERSION_HEX >= 0x03000000
   15907                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   15908                 : #else
   15909               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   15910                 : #endif
   15911               0 :         arg2 = CSLAddString( arg2, pszStr );
   15912               0 :         Py_XDECREF(pyUTF8Str);
   15913                 :       }
   15914                 : #if PY_VERSION_HEX >= 0x03000000
   15915                 :       else if (PyBytes_Check(pyObj))
   15916                 :       arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   15917                 : #else
   15918               5 :       else if (PyString_Check(pyObj))
   15919               5 :       arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   15920                 : #endif
   15921                 :       else
   15922                 :       {
   15923               0 :         Py_DECREF(pyObj);
   15924               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   15925               0 :         SWIG_fail;
   15926                 :       }
   15927               5 :       Py_DECREF(pyObj);
   15928                 :     }
   15929                 :   }
   15930                 :   {
   15931               4 :     if ( bUseExceptions ) {
   15932               0 :       CPLErrorReset();
   15933                 :     }
   15934               4 :     result = (CPLErr)GDALRasterBandShadow_SetCategoryNames(arg1,arg2);
   15935               4 :     if ( bUseExceptions ) {
   15936               0 :       CPLErr eclass = CPLGetLastErrorType();
   15937               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15938               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15939                 :       }
   15940                 :     }
   15941                 :   }
   15942               8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15943                 :   {
   15944                 :     /* %typemap(freearg) char **options */
   15945               4 :     CSLDestroy( arg2 );
   15946                 :   }
   15947               4 :   return resultobj;
   15948                 : fail:
   15949                 :   {
   15950                 :     /* %typemap(freearg) char **options */
   15951               0 :     CSLDestroy( arg2 );
   15952                 :   }
   15953               0 :   return NULL;
   15954                 : }
   15955                 : 
   15956                 : 
   15957             398 : SWIGINTERN PyObject *_wrap_Band_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15958             398 :   PyObject *resultobj = 0;
   15959             398 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15960                 :   int arg2 ;
   15961                 :   int arg3 ;
   15962                 :   int arg4 ;
   15963                 :   int arg5 ;
   15964             398 :   void **arg6 = (void **) 0 ;
   15965             398 :   int *arg7 = (int *) 0 ;
   15966             398 :   int *arg8 = (int *) 0 ;
   15967             398 :   int *arg9 = (int *) 0 ;
   15968             398 :   int *arg10 = (int *) 0 ;
   15969             398 :   int *arg11 = (int *) 0 ;
   15970             398 :   void *argp1 = 0 ;
   15971             398 :   int res1 = 0 ;
   15972                 :   int val2 ;
   15973             398 :   int ecode2 = 0 ;
   15974                 :   int val3 ;
   15975             398 :   int ecode3 = 0 ;
   15976                 :   int val4 ;
   15977             398 :   int ecode4 = 0 ;
   15978                 :   int val5 ;
   15979             398 :   int ecode5 = 0 ;
   15980             398 :   void *pyObject6 = NULL ;
   15981                 :   int val7 ;
   15982                 :   int val8 ;
   15983                 :   int val9 ;
   15984                 :   int val10 ;
   15985                 :   int val11 ;
   15986             398 :   PyObject * obj0 = 0 ;
   15987             398 :   PyObject * obj1 = 0 ;
   15988             398 :   PyObject * obj2 = 0 ;
   15989             398 :   PyObject * obj3 = 0 ;
   15990             398 :   PyObject * obj4 = 0 ;
   15991             398 :   PyObject * obj5 = 0 ;
   15992             398 :   PyObject * obj6 = 0 ;
   15993             398 :   PyObject * obj7 = 0 ;
   15994             398 :   PyObject * obj8 = 0 ;
   15995             398 :   PyObject * obj9 = 0 ;
   15996                 :   char *  kwnames[] = {
   15997                 :     (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 
   15998             398 :   };
   15999                 :   CPLErr result;
   16000                 :   
   16001                 :   {
   16002                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   16003             398 :     arg6 = &pyObject6;
   16004                 :   }
   16005             398 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OOOOO:Band_ReadRaster1",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
   16006             398 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   16007             398 :   if (!SWIG_IsOK(res1)) {
   16008               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadRaster1" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   16009                 :   }
   16010             398 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   16011             398 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16012             398 :   if (!SWIG_IsOK(ecode2)) {
   16013               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadRaster1" "', argument " "2"" of type '" "int""'");
   16014                 :   } 
   16015             398 :   arg2 = static_cast< int >(val2);
   16016             398 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16017             398 :   if (!SWIG_IsOK(ecode3)) {
   16018               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadRaster1" "', argument " "3"" of type '" "int""'");
   16019                 :   } 
   16020             398 :   arg3 = static_cast< int >(val3);
   16021             398 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   16022             398 :   if (!SWIG_IsOK(ecode4)) {
   16023               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ReadRaster1" "', argument " "4"" of type '" "int""'");
   16024                 :   } 
   16025             398 :   arg4 = static_cast< int >(val4);
   16026             398 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   16027             398 :   if (!SWIG_IsOK(ecode5)) {
   16028               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ReadRaster1" "', argument " "5"" of type '" "int""'");
   16029                 :   } 
   16030             398 :   arg5 = static_cast< int >(val5);
   16031             398 :   if (obj5) {
   16032                 :     {
   16033                 :       /* %typemap(in) (int *optional_##int) */
   16034             398 :       if ( obj5 == Py_None ) {
   16035             339 :         arg7 = 0;
   16036                 :       }
   16037              59 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   16038              59 :         arg7 = (int *) &val7;
   16039                 :       }
   16040                 :       else {
   16041               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   16042               0 :         SWIG_fail;
   16043                 :       }
   16044                 :     }
   16045                 :   }
   16046             398 :   if (obj6) {
   16047                 :     {
   16048                 :       /* %typemap(in) (int *optional_##int) */
   16049             398 :       if ( obj6 == Py_None ) {
   16050             339 :         arg8 = 0;
   16051                 :       }
   16052              59 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   16053              59 :         arg8 = (int *) &val8;
   16054                 :       }
   16055                 :       else {
   16056               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   16057               0 :         SWIG_fail;
   16058                 :       }
   16059                 :     }
   16060                 :   }
   16061             398 :   if (obj7) {
   16062                 :     {
   16063                 :       /* %typemap(in) (int *optional_##int) */
   16064             398 :       if ( obj7 == Py_None ) {
   16065             350 :         arg9 = 0;
   16066                 :       }
   16067              48 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   16068              48 :         arg9 = (int *) &val9;
   16069                 :       }
   16070                 :       else {
   16071               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   16072               0 :         SWIG_fail;
   16073                 :       }
   16074                 :     }
   16075                 :   }
   16076             398 :   if (obj8) {
   16077                 :     {
   16078                 :       /* %typemap(in) (int *optional_##int) */
   16079             398 :       if ( obj8 == Py_None ) {
   16080             398 :         arg10 = 0;
   16081                 :       }
   16082               0 :       else if ( PyArg_Parse( obj8,"i" ,&val10 ) ) {
   16083               0 :         arg10 = (int *) &val10;
   16084                 :       }
   16085                 :       else {
   16086               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   16087               0 :         SWIG_fail;
   16088                 :       }
   16089                 :     }
   16090                 :   }
   16091             398 :   if (obj9) {
   16092                 :     {
   16093                 :       /* %typemap(in) (int *optional_##int) */
   16094             398 :       if ( obj9 == Py_None ) {
   16095             398 :         arg11 = 0;
   16096                 :       }
   16097               0 :       else if ( PyArg_Parse( obj9,"i" ,&val11 ) ) {
   16098               0 :         arg11 = (int *) &val11;
   16099                 :       }
   16100                 :       else {
   16101               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   16102               0 :         SWIG_fail;
   16103                 :       }
   16104                 :     }
   16105                 :   }
   16106                 :   {
   16107             398 :     if ( bUseExceptions ) {
   16108               0 :       CPLErrorReset();
   16109                 :     }
   16110             398 :     result = (CPLErr)GDALRasterBandShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   16111             398 :     if ( bUseExceptions ) {
   16112               0 :       CPLErr eclass = CPLGetLastErrorType();
   16113               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16114               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16115                 :       }
   16116                 :     }
   16117                 :   }
   16118             796 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16119                 :   {
   16120                 :     /* %typemap(argout) ( void **outPythonObject ) */
   16121             398 :     Py_XDECREF(resultobj);
   16122             398 :     if (*arg6)
   16123                 :     {
   16124             396 :       resultobj = (PyObject*)*arg6;
   16125                 :     }
   16126                 :     else
   16127                 :     {
   16128               2 :       resultobj = Py_None;
   16129               2 :       Py_INCREF(resultobj);
   16130                 :     }
   16131                 :   }
   16132             398 :   return resultobj;
   16133                 : fail:
   16134               0 :   return NULL;
   16135                 : }
   16136                 : 
   16137                 : 
   16138               1 : SWIGINTERN PyObject *_wrap_Band_ReadBlock(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   16139               1 :   PyObject *resultobj = 0;
   16140               1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   16141                 :   int arg2 ;
   16142                 :   int arg3 ;
   16143               1 :   void **arg4 = (void **) 0 ;
   16144               1 :   void *argp1 = 0 ;
   16145               1 :   int res1 = 0 ;
   16146                 :   int val2 ;
   16147               1 :   int ecode2 = 0 ;
   16148                 :   int val3 ;
   16149               1 :   int ecode3 = 0 ;
   16150               1 :   void *pyObject4 = NULL ;
   16151               1 :   PyObject * obj0 = 0 ;
   16152               1 :   PyObject * obj1 = 0 ;
   16153               1 :   PyObject * obj2 = 0 ;
   16154                 :   char *  kwnames[] = {
   16155                 :     (char *) "self",(char *) "xoff",(char *) "yoff", NULL 
   16156               1 :   };
   16157                 :   CPLErr result;
   16158                 :   
   16159                 :   {
   16160                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject4 = NULL ) */
   16161               1 :     arg4 = &pyObject4;
   16162                 :   }
   16163               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Band_ReadBlock",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   16164               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   16165               1 :   if (!SWIG_IsOK(res1)) {
   16166               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadBlock" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   16167                 :   }
   16168               1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   16169               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16170               1 :   if (!SWIG_IsOK(ecode2)) {
   16171               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadBlock" "', argument " "2"" of type '" "int""'");
   16172                 :   } 
   16173               1 :   arg2 = static_cast< int >(val2);
   16174               1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16175               1 :   if (!SWIG_IsOK(ecode3)) {
   16176               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadBlock" "', argument " "3"" of type '" "int""'");
   16177                 :   } 
   16178               1 :   arg3 = static_cast< int >(val3);
   16179                 :   {
   16180               1 :     if ( bUseExceptions ) {
   16181               0 :       CPLErrorReset();
   16182                 :     }
   16183               1 :     result = (CPLErr)GDALRasterBandShadow_ReadBlock(arg1,arg2,arg3,arg4);
   16184               1 :     if ( bUseExceptions ) {
   16185               0 :       CPLErr eclass = CPLGetLastErrorType();
   16186               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16187               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16188                 :       }
   16189                 :     }
   16190                 :   }
   16191               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16192                 :   {
   16193                 :     /* %typemap(argout) ( void **outPythonObject ) */
   16194               1 :     Py_XDECREF(resultobj);
   16195               1 :     if (*arg4)
   16196                 :     {
   16197               1 :       resultobj = (PyObject*)*arg4;
   16198                 :     }
   16199                 :     else
   16200                 :     {
   16201               0 :       resultobj = Py_None;
   16202               0 :       Py_INCREF(resultobj);
   16203                 :     }
   16204                 :   }
   16205               1 :   return resultobj;
   16206                 : fail:
   16207               0 :   return NULL;
   16208                 : }
   16209                 : 
   16210                 : 
   16211              12 : SWIGINTERN PyObject *Band_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16212                 :   PyObject *obj;
   16213              12 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   16214              12 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterBandShadow, SWIG_NewClientData(obj));
   16215              12 :   return SWIG_Py_Void();
   16216                 : }
   16217                 : 
   16218              24 : SWIGINTERN PyObject *_wrap_new_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   16219              24 :   PyObject *resultobj = 0;
   16220              24 :   GDALPaletteInterp arg1 = (GDALPaletteInterp) GPI_RGB ;
   16221                 :   int val1 ;
   16222              24 :   int ecode1 = 0 ;
   16223              24 :   PyObject * obj0 = 0 ;
   16224                 :   char *  kwnames[] = {
   16225                 :     (char *) "palette", NULL 
   16226              24 :   };
   16227              24 :   GDALColorTableShadow *result = 0 ;
   16228                 :   
   16229              24 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_ColorTable",kwnames,&obj0)) SWIG_fail;
   16230              24 :   if (obj0) {
   16231               0 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
   16232               0 :     if (!SWIG_IsOK(ecode1)) {
   16233               0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ColorTable" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   16234                 :     } 
   16235               0 :     arg1 = static_cast< GDALPaletteInterp >(val1);
   16236                 :   }
   16237                 :   {
   16238              24 :     if ( bUseExceptions ) {
   16239               0 :       CPLErrorReset();
   16240                 :     }
   16241              24 :     result = (GDALColorTableShadow *)new_GDALColorTableShadow(arg1);
   16242              24 :     if ( bUseExceptions ) {
   16243               0 :       CPLErr eclass = CPLGetLastErrorType();
   16244               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16245               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16246                 :       }
   16247                 :     }
   16248                 :   }
   16249              24 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_NEW |  0 );
   16250              24 :   return resultobj;
   16251                 : fail:
   16252               0 :   return NULL;
   16253                 : }
   16254                 : 
   16255                 : 
   16256              25 : SWIGINTERN PyObject *_wrap_delete_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16257              25 :   PyObject *resultobj = 0;
   16258              25 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16259              25 :   void *argp1 = 0 ;
   16260              25 :   int res1 = 0 ;
   16261              25 :   PyObject * obj0 = 0 ;
   16262                 :   
   16263              25 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_ColorTable",&obj0)) SWIG_fail;
   16264              25 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_DISOWN |  0 );
   16265              25 :   if (!SWIG_IsOK(res1)) {
   16266               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ColorTable" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16267                 :   }
   16268              25 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16269                 :   {
   16270              25 :     if ( bUseExceptions ) {
   16271               0 :       CPLErrorReset();
   16272                 :     }
   16273                 :     delete_GDALColorTableShadow(arg1);
   16274              25 :     if ( bUseExceptions ) {
   16275               0 :       CPLErr eclass = CPLGetLastErrorType();
   16276               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16277               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16278                 :       }
   16279                 :     }
   16280                 :   }
   16281              25 :   resultobj = SWIG_Py_Void();
   16282              25 :   return resultobj;
   16283                 : fail:
   16284               0 :   return NULL;
   16285                 : }
   16286                 : 
   16287                 : 
   16288               1 : SWIGINTERN PyObject *_wrap_ColorTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16289               1 :   PyObject *resultobj = 0;
   16290               1 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16291               1 :   void *argp1 = 0 ;
   16292               1 :   int res1 = 0 ;
   16293               1 :   PyObject * obj0 = 0 ;
   16294               1 :   GDALColorTableShadow *result = 0 ;
   16295                 :   
   16296               1 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorTable_Clone",&obj0)) SWIG_fail;
   16297               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16298               1 :   if (!SWIG_IsOK(res1)) {
   16299               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_Clone" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16300                 :   }
   16301               1 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16302                 :   {
   16303               1 :     if ( bUseExceptions ) {
   16304               0 :       CPLErrorReset();
   16305                 :     }
   16306               1 :     result = (GDALColorTableShadow *)GDALColorTableShadow_Clone(arg1);
   16307               1 :     if ( bUseExceptions ) {
   16308               0 :       CPLErr eclass = CPLGetLastErrorType();
   16309               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16310               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16311                 :       }
   16312                 :     }
   16313                 :   }
   16314               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_OWN |  0 );
   16315               1 :   return resultobj;
   16316                 : fail:
   16317               0 :   return NULL;
   16318                 : }
   16319                 : 
   16320                 : 
   16321               2 : SWIGINTERN PyObject *_wrap_ColorTable_GetPaletteInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16322               2 :   PyObject *resultobj = 0;
   16323               2 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16324               2 :   void *argp1 = 0 ;
   16325               2 :   int res1 = 0 ;
   16326               2 :   PyObject * obj0 = 0 ;
   16327                 :   GDALPaletteInterp result;
   16328                 :   
   16329               2 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorTable_GetPaletteInterpretation",&obj0)) SWIG_fail;
   16330               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16331               2 :   if (!SWIG_IsOK(res1)) {
   16332               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetPaletteInterpretation" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16333                 :   }
   16334               2 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16335                 :   {
   16336               2 :     if ( bUseExceptions ) {
   16337               0 :       CPLErrorReset();
   16338                 :     }
   16339               2 :     result = (GDALPaletteInterp)GDALColorTableShadow_GetPaletteInterpretation(arg1);
   16340               2 :     if ( bUseExceptions ) {
   16341               0 :       CPLErr eclass = CPLGetLastErrorType();
   16342               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16343               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16344                 :       }
   16345                 :     }
   16346                 :   }
   16347               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16348               2 :   return resultobj;
   16349                 : fail:
   16350               0 :   return NULL;
   16351                 : }
   16352                 : 
   16353                 : 
   16354              23 : SWIGINTERN PyObject *_wrap_ColorTable_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16355              23 :   PyObject *resultobj = 0;
   16356              23 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16357              23 :   void *argp1 = 0 ;
   16358              23 :   int res1 = 0 ;
   16359              23 :   PyObject * obj0 = 0 ;
   16360                 :   int result;
   16361                 :   
   16362              23 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorTable_GetCount",&obj0)) SWIG_fail;
   16363              23 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16364              23 :   if (!SWIG_IsOK(res1)) {
   16365               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetCount" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16366                 :   }
   16367              23 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16368                 :   {
   16369              23 :     if ( bUseExceptions ) {
   16370               0 :       CPLErrorReset();
   16371                 :     }
   16372              23 :     result = (int)GDALColorTableShadow_GetColorEntryCount(arg1);
   16373              23 :     if ( bUseExceptions ) {
   16374               0 :       CPLErr eclass = CPLGetLastErrorType();
   16375               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16376               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16377                 :       }
   16378                 :     }
   16379                 :   }
   16380              23 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16381              23 :   return resultobj;
   16382                 : fail:
   16383               0 :   return NULL;
   16384                 : }
   16385                 : 
   16386                 : 
   16387            1525 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16388            1525 :   PyObject *resultobj = 0;
   16389            1525 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16390                 :   int arg2 ;
   16391            1525 :   void *argp1 = 0 ;
   16392            1525 :   int res1 = 0 ;
   16393                 :   int val2 ;
   16394            1525 :   int ecode2 = 0 ;
   16395            1525 :   PyObject * obj0 = 0 ;
   16396            1525 :   PyObject * obj1 = 0 ;
   16397            1525 :   GDALColorEntry *result = 0 ;
   16398                 :   
   16399            1525 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorTable_GetColorEntry",&obj0,&obj1)) SWIG_fail;
   16400            1525 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16401            1525 :   if (!SWIG_IsOK(res1)) {
   16402               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16403                 :   }
   16404            1525 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16405            1525 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16406            1525 :   if (!SWIG_IsOK(ecode2)) {
   16407               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntry" "', argument " "2"" of type '" "int""'");
   16408                 :   } 
   16409            1525 :   arg2 = static_cast< int >(val2);
   16410                 :   {
   16411            1525 :     if ( bUseExceptions ) {
   16412               0 :       CPLErrorReset();
   16413                 :     }
   16414            1525 :     result = (GDALColorEntry *)GDALColorTableShadow_GetColorEntry(arg1,arg2);
   16415            1525 :     if ( bUseExceptions ) {
   16416               0 :       CPLErr eclass = CPLGetLastErrorType();
   16417               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16418               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16419                 :       }
   16420                 :     }
   16421                 :   }
   16422                 :   {
   16423                 :     /* %typemap(out) GDALColorEntry* */
   16424            1525 :     if ( result != NULL )
   16425            1525 :     resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
   16426                 :     else
   16427               0 :     resultobj = NULL;
   16428                 :   }
   16429            1525 :   return resultobj;
   16430                 : fail:
   16431               0 :   return NULL;
   16432                 : }
   16433                 : 
   16434                 : 
   16435               0 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntryAsRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16436               0 :   PyObject *resultobj = 0;
   16437               0 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16438                 :   int arg2 ;
   16439               0 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   16440               0 :   void *argp1 = 0 ;
   16441               0 :   int res1 = 0 ;
   16442                 :   int val2 ;
   16443               0 :   int ecode2 = 0 ;
   16444                 :   GDALColorEntry ce3 ;
   16445               0 :   PyObject * obj0 = 0 ;
   16446               0 :   PyObject * obj1 = 0 ;
   16447               0 :   PyObject * obj2 = 0 ;
   16448                 :   int result;
   16449                 :   
   16450               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:ColorTable_GetColorEntryAsRGB",&obj0,&obj1,&obj2)) SWIG_fail;
   16451               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16452               0 :   if (!SWIG_IsOK(res1)) {
   16453               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16454                 :   }
   16455               0 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16456               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16457               0 :   if (!SWIG_IsOK(ecode2)) {
   16458               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "2"" of type '" "int""'");
   16459                 :   } 
   16460               0 :   arg2 = static_cast< int >(val2);
   16461                 :   {
   16462                 :     /* %typemap(in) GDALColorEntry* */
   16463               0 :     ce3.c4 = 255;
   16464               0 :     if (! PySequence_Check(obj2) ) {
   16465               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16466               0 :       SWIG_fail;
   16467                 :     }
   16468               0 :     int size = PySequence_Size(obj2);
   16469               0 :     if ( size > 4 ) {
   16470               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16471               0 :       SWIG_fail;
   16472                 :     }
   16473               0 :     if ( size < 3 ) {
   16474               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16475               0 :       SWIG_fail;
   16476                 :     }
   16477               0 :     if ( !PyArg_ParseTuple( obj2,"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   16478               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16479               0 :       SWIG_fail;
   16480                 :     }
   16481               0 :     arg3 = &ce3;
   16482                 :   }
   16483                 :   {
   16484               0 :     if ( bUseExceptions ) {
   16485               0 :       CPLErrorReset();
   16486                 :     }
   16487               0 :     result = (int)GDALColorTableShadow_GetColorEntryAsRGB(arg1,arg2,arg3);
   16488               0 :     if ( bUseExceptions ) {
   16489               0 :       CPLErr eclass = CPLGetLastErrorType();
   16490               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16491               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16492                 :       }
   16493                 :     }
   16494                 :   }
   16495               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16496               0 :   return resultobj;
   16497                 : fail:
   16498               0 :   return NULL;
   16499                 : }
   16500                 : 
   16501                 : 
   16502              56 : SWIGINTERN PyObject *_wrap_ColorTable_SetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16503              56 :   PyObject *resultobj = 0;
   16504              56 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16505                 :   int arg2 ;
   16506              56 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   16507              56 :   void *argp1 = 0 ;
   16508              56 :   int res1 = 0 ;
   16509                 :   int val2 ;
   16510              56 :   int ecode2 = 0 ;
   16511                 :   GDALColorEntry ce3 ;
   16512              56 :   PyObject * obj0 = 0 ;
   16513              56 :   PyObject * obj1 = 0 ;
   16514              56 :   PyObject * obj2 = 0 ;
   16515                 :   
   16516              56 :   if (!PyArg_ParseTuple(args,(char *)"OOO:ColorTable_SetColorEntry",&obj0,&obj1,&obj2)) SWIG_fail;
   16517              56 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16518              56 :   if (!SWIG_IsOK(res1)) {
   16519               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_SetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16520                 :   }
   16521              56 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16522              56 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16523              56 :   if (!SWIG_IsOK(ecode2)) {
   16524               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_SetColorEntry" "', argument " "2"" of type '" "int""'");
   16525                 :   } 
   16526              56 :   arg2 = static_cast< int >(val2);
   16527                 :   {
   16528                 :     /* %typemap(in) GDALColorEntry* */
   16529              56 :     ce3.c4 = 255;
   16530              56 :     if (! PySequence_Check(obj2) ) {
   16531               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16532               0 :       SWIG_fail;
   16533                 :     }
   16534              56 :     int size = PySequence_Size(obj2);
   16535              56 :     if ( size > 4 ) {
   16536               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16537               0 :       SWIG_fail;
   16538                 :     }
   16539              56 :     if ( size < 3 ) {
   16540               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16541               0 :       SWIG_fail;
   16542                 :     }
   16543              56 :     if ( !PyArg_ParseTuple( obj2,"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   16544               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16545               0 :       SWIG_fail;
   16546                 :     }
   16547              56 :     arg3 = &ce3;
   16548                 :   }
   16549                 :   {
   16550              56 :     if ( bUseExceptions ) {
   16551               0 :       CPLErrorReset();
   16552                 :     }
   16553                 :     GDALColorTableShadow_SetColorEntry(arg1,arg2,(GDALColorEntry const *)arg3);
   16554              56 :     if ( bUseExceptions ) {
   16555               0 :       CPLErr eclass = CPLGetLastErrorType();
   16556               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16557               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16558                 :       }
   16559                 :     }
   16560                 :   }
   16561              56 :   resultobj = SWIG_Py_Void();
   16562              56 :   return resultobj;
   16563                 : fail:
   16564               0 :   return NULL;
   16565                 : }
   16566                 : 
   16567                 : 
   16568               1 : SWIGINTERN PyObject *_wrap_ColorTable_CreateColorRamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16569               1 :   PyObject *resultobj = 0;
   16570               1 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16571                 :   int arg2 ;
   16572               1 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   16573                 :   int arg4 ;
   16574               1 :   GDALColorEntry *arg5 = (GDALColorEntry *) 0 ;
   16575               1 :   void *argp1 = 0 ;
   16576               1 :   int res1 = 0 ;
   16577                 :   int val2 ;
   16578               1 :   int ecode2 = 0 ;
   16579                 :   GDALColorEntry ce3 ;
   16580                 :   int val4 ;
   16581               1 :   int ecode4 = 0 ;
   16582                 :   GDALColorEntry ce5 ;
   16583               1 :   PyObject * obj0 = 0 ;
   16584               1 :   PyObject * obj1 = 0 ;
   16585               1 :   PyObject * obj2 = 0 ;
   16586               1 :   PyObject * obj3 = 0 ;
   16587               1 :   PyObject * obj4 = 0 ;
   16588                 :   
   16589               1 :   if (!PyArg_ParseTuple(args,(char *)"OOOOO:ColorTable_CreateColorRamp",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   16590               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16591               1 :   if (!SWIG_IsOK(res1)) {
   16592               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_CreateColorRamp" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16593                 :   }
   16594               1 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16595               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16596               1 :   if (!SWIG_IsOK(ecode2)) {
   16597               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_CreateColorRamp" "', argument " "2"" of type '" "int""'");
   16598                 :   } 
   16599               1 :   arg2 = static_cast< int >(val2);
   16600                 :   {
   16601                 :     /* %typemap(in) GDALColorEntry* */
   16602               1 :     ce3.c4 = 255;
   16603               1 :     if (! PySequence_Check(obj2) ) {
   16604               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16605               0 :       SWIG_fail;
   16606                 :     }
   16607               1 :     int size = PySequence_Size(obj2);
   16608               1 :     if ( size > 4 ) {
   16609               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16610               0 :       SWIG_fail;
   16611                 :     }
   16612               1 :     if ( size < 3 ) {
   16613               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16614               0 :       SWIG_fail;
   16615                 :     }
   16616               1 :     if ( !PyArg_ParseTuple( obj2,"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   16617               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16618               0 :       SWIG_fail;
   16619                 :     }
   16620               1 :     arg3 = &ce3;
   16621                 :   }
   16622               1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   16623               1 :   if (!SWIG_IsOK(ecode4)) {
   16624               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ColorTable_CreateColorRamp" "', argument " "4"" of type '" "int""'");
   16625                 :   } 
   16626               1 :   arg4 = static_cast< int >(val4);
   16627                 :   {
   16628                 :     /* %typemap(in) GDALColorEntry* */
   16629               1 :     ce5.c4 = 255;
   16630               1 :     if (! PySequence_Check(obj4) ) {
   16631               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16632               0 :       SWIG_fail;
   16633                 :     }
   16634               1 :     int size = PySequence_Size(obj4);
   16635               1 :     if ( size > 4 ) {
   16636               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16637               0 :       SWIG_fail;
   16638                 :     }
   16639               1 :     if ( size < 3 ) {
   16640               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16641               0 :       SWIG_fail;
   16642                 :     }
   16643               1 :     if ( !PyArg_ParseTuple( obj4,"hhh|h", &ce5.c1, &ce5.c2, &ce5.c3, &ce5.c4 ) ) {
   16644               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16645               0 :       SWIG_fail;
   16646                 :     }
   16647               1 :     arg5 = &ce5;
   16648                 :   }
   16649                 :   {
   16650               1 :     if ( bUseExceptions ) {
   16651               0 :       CPLErrorReset();
   16652                 :     }
   16653                 :     GDALColorTableShadow_CreateColorRamp(arg1,arg2,(GDALColorEntry const *)arg3,arg4,(GDALColorEntry const *)arg5);
   16654               1 :     if ( bUseExceptions ) {
   16655               0 :       CPLErr eclass = CPLGetLastErrorType();
   16656               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16657               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16658                 :       }
   16659                 :     }
   16660                 :   }
   16661               1 :   resultobj = SWIG_Py_Void();
   16662               1 :   return resultobj;
   16663                 : fail:
   16664               0 :   return NULL;
   16665                 : }
   16666                 : 
   16667                 : 
   16668              12 : SWIGINTERN PyObject *ColorTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16669                 :   PyObject *obj;
   16670              12 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   16671              12 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorTableShadow, SWIG_NewClientData(obj));
   16672              12 :   return SWIG_Py_Void();
   16673                 : }
   16674                 : 
   16675               2 : SWIGINTERN PyObject *_wrap_new_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16676               2 :   PyObject *resultobj = 0;
   16677               2 :   GDALRasterAttributeTableShadow *result = 0 ;
   16678                 :   
   16679               2 :   if (!PyArg_ParseTuple(args,(char *)":new_RasterAttributeTable")) SWIG_fail;
   16680                 :   {
   16681               2 :     if ( bUseExceptions ) {
   16682               0 :       CPLErrorReset();
   16683                 :     }
   16684               2 :     result = (GDALRasterAttributeTableShadow *)new_GDALRasterAttributeTableShadow();
   16685               2 :     if ( bUseExceptions ) {
   16686               0 :       CPLErr eclass = CPLGetLastErrorType();
   16687               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16688               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16689                 :       }
   16690                 :     }
   16691                 :   }
   16692               2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_NEW |  0 );
   16693               2 :   return resultobj;
   16694                 : fail:
   16695               0 :   return NULL;
   16696                 : }
   16697                 : 
   16698                 : 
   16699               3 : SWIGINTERN PyObject *_wrap_delete_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16700               3 :   PyObject *resultobj = 0;
   16701               3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16702               3 :   void *argp1 = 0 ;
   16703               3 :   int res1 = 0 ;
   16704               3 :   PyObject * obj0 = 0 ;
   16705                 :   
   16706               3 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_RasterAttributeTable",&obj0)) SWIG_fail;
   16707               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_DISOWN |  0 );
   16708               3 :   if (!SWIG_IsOK(res1)) {
   16709               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RasterAttributeTable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16710                 :   }
   16711               3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16712                 :   {
   16713               3 :     if ( bUseExceptions ) {
   16714               0 :       CPLErrorReset();
   16715                 :     }
   16716                 :     delete_GDALRasterAttributeTableShadow(arg1);
   16717               3 :     if ( bUseExceptions ) {
   16718               0 :       CPLErr eclass = CPLGetLastErrorType();
   16719               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16720               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16721                 :       }
   16722                 :     }
   16723                 :   }
   16724               3 :   resultobj = SWIG_Py_Void();
   16725               3 :   return resultobj;
   16726                 : fail:
   16727               0 :   return NULL;
   16728                 : }
   16729                 : 
   16730                 : 
   16731               1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16732               1 :   PyObject *resultobj = 0;
   16733               1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16734               1 :   void *argp1 = 0 ;
   16735               1 :   int res1 = 0 ;
   16736               1 :   PyObject * obj0 = 0 ;
   16737               1 :   GDALRasterAttributeTableShadow *result = 0 ;
   16738                 :   
   16739               1 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_Clone",&obj0)) SWIG_fail;
   16740               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16741               1 :   if (!SWIG_IsOK(res1)) {
   16742               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_Clone" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16743                 :   }
   16744               1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16745                 :   {
   16746               1 :     if ( bUseExceptions ) {
   16747               0 :       CPLErrorReset();
   16748                 :     }
   16749               1 :     result = (GDALRasterAttributeTableShadow *)GDALRasterAttributeTableShadow_Clone(arg1);
   16750               1 :     if ( bUseExceptions ) {
   16751               0 :       CPLErr eclass = CPLGetLastErrorType();
   16752               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16753               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16754                 :       }
   16755                 :     }
   16756                 :   }
   16757               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   16758               1 :   return resultobj;
   16759                 : fail:
   16760               0 :   return NULL;
   16761                 : }
   16762                 : 
   16763                 : 
   16764               5 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16765               5 :   PyObject *resultobj = 0;
   16766               5 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16767               5 :   void *argp1 = 0 ;
   16768               5 :   int res1 = 0 ;
   16769               5 :   PyObject * obj0 = 0 ;
   16770                 :   int result;
   16771                 :   
   16772               5 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_GetColumnCount",&obj0)) SWIG_fail;
   16773               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16774               5 :   if (!SWIG_IsOK(res1)) {
   16775               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColumnCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16776                 :   }
   16777               5 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16778                 :   {
   16779               5 :     if ( bUseExceptions ) {
   16780               0 :       CPLErrorReset();
   16781                 :     }
   16782               5 :     result = (int)GDALRasterAttributeTableShadow_GetColumnCount(arg1);
   16783               5 :     if ( bUseExceptions ) {
   16784               0 :       CPLErr eclass = CPLGetLastErrorType();
   16785               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16786               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16787                 :       }
   16788                 :     }
   16789                 :   }
   16790               5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16791               5 :   return resultobj;
   16792                 : fail:
   16793               0 :   return NULL;
   16794                 : }
   16795                 : 
   16796                 : 
   16797               4 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetNameOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16798               4 :   PyObject *resultobj = 0;
   16799               4 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16800                 :   int arg2 ;
   16801               4 :   void *argp1 = 0 ;
   16802               4 :   int res1 = 0 ;
   16803                 :   int val2 ;
   16804               4 :   int ecode2 = 0 ;
   16805               4 :   PyObject * obj0 = 0 ;
   16806               4 :   PyObject * obj1 = 0 ;
   16807               4 :   char *result = 0 ;
   16808                 :   
   16809               4 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetNameOfCol",&obj0,&obj1)) SWIG_fail;
   16810               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16811               4 :   if (!SWIG_IsOK(res1)) {
   16812               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16813                 :   }
   16814               4 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16815               4 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16816               4 :   if (!SWIG_IsOK(ecode2)) {
   16817               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "2"" of type '" "int""'");
   16818                 :   } 
   16819               4 :   arg2 = static_cast< int >(val2);
   16820                 :   {
   16821               4 :     if ( bUseExceptions ) {
   16822               0 :       CPLErrorReset();
   16823                 :     }
   16824               4 :     result = (char *)GDALRasterAttributeTableShadow_GetNameOfCol(arg1,arg2);
   16825               4 :     if ( bUseExceptions ) {
   16826               0 :       CPLErr eclass = CPLGetLastErrorType();
   16827               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16828               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16829                 :       }
   16830                 :     }
   16831                 :   }
   16832               4 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16833               4 :   return resultobj;
   16834                 : fail:
   16835               0 :   return NULL;
   16836                 : }
   16837                 : 
   16838                 : 
   16839               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetUsageOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16840               6 :   PyObject *resultobj = 0;
   16841               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16842                 :   int arg2 ;
   16843               6 :   void *argp1 = 0 ;
   16844               6 :   int res1 = 0 ;
   16845                 :   int val2 ;
   16846               6 :   int ecode2 = 0 ;
   16847               6 :   PyObject * obj0 = 0 ;
   16848               6 :   PyObject * obj1 = 0 ;
   16849                 :   GDALRATFieldUsage result;
   16850                 :   
   16851               6 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetUsageOfCol",&obj0,&obj1)) SWIG_fail;
   16852               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16853               6 :   if (!SWIG_IsOK(res1)) {
   16854               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16855                 :   }
   16856               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16857               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16858               6 :   if (!SWIG_IsOK(ecode2)) {
   16859               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "2"" of type '" "int""'");
   16860                 :   } 
   16861               6 :   arg2 = static_cast< int >(val2);
   16862                 :   {
   16863               6 :     if ( bUseExceptions ) {
   16864               0 :       CPLErrorReset();
   16865                 :     }
   16866               6 :     result = (GDALRATFieldUsage)GDALRasterAttributeTableShadow_GetUsageOfCol(arg1,arg2);
   16867               6 :     if ( bUseExceptions ) {
   16868               0 :       CPLErr eclass = CPLGetLastErrorType();
   16869               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16870               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16871                 :       }
   16872                 :     }
   16873                 :   }
   16874              12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16875               6 :   return resultobj;
   16876                 : fail:
   16877               0 :   return NULL;
   16878                 : }
   16879                 : 
   16880                 : 
   16881               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTypeOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16882               6 :   PyObject *resultobj = 0;
   16883               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16884                 :   int arg2 ;
   16885               6 :   void *argp1 = 0 ;
   16886               6 :   int res1 = 0 ;
   16887                 :   int val2 ;
   16888               6 :   int ecode2 = 0 ;
   16889               6 :   PyObject * obj0 = 0 ;
   16890               6 :   PyObject * obj1 = 0 ;
   16891                 :   GDALRATFieldType result;
   16892                 :   
   16893               6 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetTypeOfCol",&obj0,&obj1)) SWIG_fail;
   16894               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16895               6 :   if (!SWIG_IsOK(res1)) {
   16896               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16897                 :   }
   16898               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16899               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16900               6 :   if (!SWIG_IsOK(ecode2)) {
   16901               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "2"" of type '" "int""'");
   16902                 :   } 
   16903               6 :   arg2 = static_cast< int >(val2);
   16904                 :   {
   16905               6 :     if ( bUseExceptions ) {
   16906               0 :       CPLErrorReset();
   16907                 :     }
   16908               6 :     result = (GDALRATFieldType)GDALRasterAttributeTableShadow_GetTypeOfCol(arg1,arg2);
   16909               6 :     if ( bUseExceptions ) {
   16910               0 :       CPLErr eclass = CPLGetLastErrorType();
   16911               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16912               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16913                 :       }
   16914                 :     }
   16915                 :   }
   16916              12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16917               6 :   return resultobj;
   16918                 : fail:
   16919               0 :   return NULL;
   16920                 : }
   16921                 : 
   16922                 : 
   16923               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColOfUsage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16924               0 :   PyObject *resultobj = 0;
   16925               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16926                 :   GDALRATFieldUsage arg2 ;
   16927               0 :   void *argp1 = 0 ;
   16928               0 :   int res1 = 0 ;
   16929                 :   int val2 ;
   16930               0 :   int ecode2 = 0 ;
   16931               0 :   PyObject * obj0 = 0 ;
   16932               0 :   PyObject * obj1 = 0 ;
   16933                 :   int result;
   16934                 :   
   16935               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetColOfUsage",&obj0,&obj1)) SWIG_fail;
   16936               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16937               0 :   if (!SWIG_IsOK(res1)) {
   16938               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16939                 :   }
   16940               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16941               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16942               0 :   if (!SWIG_IsOK(ecode2)) {
   16943               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "2"" of type '" "GDALRATFieldUsage""'");
   16944                 :   } 
   16945               0 :   arg2 = static_cast< GDALRATFieldUsage >(val2);
   16946                 :   {
   16947               0 :     if ( bUseExceptions ) {
   16948               0 :       CPLErrorReset();
   16949                 :     }
   16950               0 :     result = (int)GDALRasterAttributeTableShadow_GetColOfUsage(arg1,arg2);
   16951               0 :     if ( bUseExceptions ) {
   16952               0 :       CPLErr eclass = CPLGetLastErrorType();
   16953               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16954               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16955                 :       }
   16956                 :     }
   16957                 :   }
   16958               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16959               0 :   return resultobj;
   16960                 : fail:
   16961               0 :   return NULL;
   16962                 : }
   16963                 : 
   16964                 : 
   16965               3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16966               3 :   PyObject *resultobj = 0;
   16967               3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16968               3 :   void *argp1 = 0 ;
   16969               3 :   int res1 = 0 ;
   16970               3 :   PyObject * obj0 = 0 ;
   16971                 :   int result;
   16972                 :   
   16973               3 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_GetRowCount",&obj0)) SWIG_fail;
   16974               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16975               3 :   if (!SWIG_IsOK(res1)) {
   16976               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16977                 :   }
   16978               3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16979                 :   {
   16980               3 :     if ( bUseExceptions ) {
   16981               0 :       CPLErrorReset();
   16982                 :     }
   16983               3 :     result = (int)GDALRasterAttributeTableShadow_GetRowCount(arg1);
   16984               3 :     if ( bUseExceptions ) {
   16985               0 :       CPLErr eclass = CPLGetLastErrorType();
   16986               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16987               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16988                 :       }
   16989                 :     }
   16990                 :   }
   16991               3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16992               3 :   return resultobj;
   16993                 : fail:
   16994               0 :   return NULL;
   16995                 : }
   16996                 : 
   16997                 : 
   16998               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16999               0 :   PyObject *resultobj = 0;
   17000               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17001                 :   int arg2 ;
   17002                 :   int arg3 ;
   17003               0 :   void *argp1 = 0 ;
   17004               0 :   int res1 = 0 ;
   17005                 :   int val2 ;
   17006               0 :   int ecode2 = 0 ;
   17007                 :   int val3 ;
   17008               0 :   int ecode3 = 0 ;
   17009               0 :   PyObject * obj0 = 0 ;
   17010               0 :   PyObject * obj1 = 0 ;
   17011               0 :   PyObject * obj2 = 0 ;
   17012               0 :   char *result = 0 ;
   17013                 :   
   17014               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_GetValueAsString",&obj0,&obj1,&obj2)) SWIG_fail;
   17015               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17016               0 :   if (!SWIG_IsOK(res1)) {
   17017               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17018                 :   }
   17019               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17020               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   17021               0 :   if (!SWIG_IsOK(ecode2)) {
   17022               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "2"" of type '" "int""'");
   17023                 :   } 
   17024               0 :   arg2 = static_cast< int >(val2);
   17025               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17026               0 :   if (!SWIG_IsOK(ecode3)) {
   17027               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "3"" of type '" "int""'");
   17028                 :   } 
   17029               0 :   arg3 = static_cast< int >(val3);
   17030                 :   {
   17031               0 :     if ( bUseExceptions ) {
   17032               0 :       CPLErrorReset();
   17033                 :     }
   17034               0 :     result = (char *)GDALRasterAttributeTableShadow_GetValueAsString(arg1,arg2,arg3);
   17035               0 :     if ( bUseExceptions ) {
   17036               0 :       CPLErr eclass = CPLGetLastErrorType();
   17037               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17038               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17039                 :       }
   17040                 :     }
   17041                 :   }
   17042               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   17043               0 :   return resultobj;
   17044                 : fail:
   17045               0 :   return NULL;
   17046                 : }
   17047                 : 
   17048                 : 
   17049               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17050               6 :   PyObject *resultobj = 0;
   17051               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17052                 :   int arg2 ;
   17053                 :   int arg3 ;
   17054               6 :   void *argp1 = 0 ;
   17055               6 :   int res1 = 0 ;
   17056                 :   int val2 ;
   17057               6 :   int ecode2 = 0 ;
   17058                 :   int val3 ;
   17059               6 :   int ecode3 = 0 ;
   17060               6 :   PyObject * obj0 = 0 ;
   17061               6 :   PyObject * obj1 = 0 ;
   17062               6 :   PyObject * obj2 = 0 ;
   17063                 :   int result;
   17064                 :   
   17065               6 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_GetValueAsInt",&obj0,&obj1,&obj2)) SWIG_fail;
   17066               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17067               6 :   if (!SWIG_IsOK(res1)) {
   17068               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17069                 :   }
   17070               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17071               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   17072               6 :   if (!SWIG_IsOK(ecode2)) {
   17073               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "2"" of type '" "int""'");
   17074                 :   } 
   17075               6 :   arg2 = static_cast< int >(val2);
   17076               6 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17077               6 :   if (!SWIG_IsOK(ecode3)) {
   17078               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "3"" of type '" "int""'");
   17079                 :   } 
   17080               6 :   arg3 = static_cast< int >(val3);
   17081                 :   {
   17082               6 :     if ( bUseExceptions ) {
   17083               0 :       CPLErrorReset();
   17084                 :     }
   17085               6 :     result = (int)GDALRasterAttributeTableShadow_GetValueAsInt(arg1,arg2,arg3);
   17086               6 :     if ( bUseExceptions ) {
   17087               0 :       CPLErr eclass = CPLGetLastErrorType();
   17088               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17089               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17090                 :       }
   17091                 :     }
   17092                 :   }
   17093               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17094               6 :   return resultobj;
   17095                 : fail:
   17096               0 :   return NULL;
   17097                 : }
   17098                 : 
   17099                 : 
   17100               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17101               0 :   PyObject *resultobj = 0;
   17102               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17103                 :   int arg2 ;
   17104                 :   int arg3 ;
   17105               0 :   void *argp1 = 0 ;
   17106               0 :   int res1 = 0 ;
   17107                 :   int val2 ;
   17108               0 :   int ecode2 = 0 ;
   17109                 :   int val3 ;
   17110               0 :   int ecode3 = 0 ;
   17111               0 :   PyObject * obj0 = 0 ;
   17112               0 :   PyObject * obj1 = 0 ;
   17113               0 :   PyObject * obj2 = 0 ;
   17114                 :   double result;
   17115                 :   
   17116               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_GetValueAsDouble",&obj0,&obj1,&obj2)) SWIG_fail;
   17117               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17118               0 :   if (!SWIG_IsOK(res1)) {
   17119               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17120                 :   }
   17121               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17122               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   17123               0 :   if (!SWIG_IsOK(ecode2)) {
   17124               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "2"" of type '" "int""'");
   17125                 :   } 
   17126               0 :   arg2 = static_cast< int >(val2);
   17127               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17128               0 :   if (!SWIG_IsOK(ecode3)) {
   17129               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "3"" of type '" "int""'");
   17130                 :   } 
   17131               0 :   arg3 = static_cast< int >(val3);
   17132                 :   {
   17133               0 :     if ( bUseExceptions ) {
   17134               0 :       CPLErrorReset();
   17135                 :     }
   17136               0 :     result = (double)GDALRasterAttributeTableShadow_GetValueAsDouble(arg1,arg2,arg3);
   17137               0 :     if ( bUseExceptions ) {
   17138               0 :       CPLErr eclass = CPLGetLastErrorType();
   17139               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17140               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17141                 :       }
   17142                 :     }
   17143                 :   }
   17144               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   17145               0 :   return resultobj;
   17146                 : fail:
   17147               0 :   return NULL;
   17148                 : }
   17149                 : 
   17150                 : 
   17151               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17152               0 :   PyObject *resultobj = 0;
   17153               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17154                 :   int arg2 ;
   17155                 :   int arg3 ;
   17156               0 :   char *arg4 = (char *) 0 ;
   17157               0 :   void *argp1 = 0 ;
   17158               0 :   int res1 = 0 ;
   17159                 :   int val2 ;
   17160               0 :   int ecode2 = 0 ;
   17161                 :   int val3 ;
   17162               0 :   int ecode3 = 0 ;
   17163               0 :   PyObject *str4 = 0 ;
   17164               0 :   int bToFree4 = 0 ;
   17165               0 :   PyObject * obj0 = 0 ;
   17166               0 :   PyObject * obj1 = 0 ;
   17167               0 :   PyObject * obj2 = 0 ;
   17168               0 :   PyObject * obj3 = 0 ;
   17169                 :   
   17170               0 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_SetValueAsString",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   17171               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17172               0 :   if (!SWIG_IsOK(res1)) {
   17173               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17174                 :   }
   17175               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17176               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   17177               0 :   if (!SWIG_IsOK(ecode2)) {
   17178               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "2"" of type '" "int""'");
   17179                 :   } 
   17180               0 :   arg2 = static_cast< int >(val2);
   17181               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17182               0 :   if (!SWIG_IsOK(ecode3)) {
   17183               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "3"" of type '" "int""'");
   17184                 :   } 
   17185               0 :   arg3 = static_cast< int >(val3);
   17186                 :   {
   17187                 :     /* %typemap(in) (tostring argin) */
   17188               0 :     str4 = PyObject_Str( obj3 );
   17189               0 :     if ( str4 == 0 ) {
   17190               0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   17191               0 :       SWIG_fail;
   17192                 :     }
   17193                 :     
   17194               0 :     arg4 = GDALPythonObjectToCStr(str4, &bToFree4); 
   17195                 :   }
   17196                 :   {
   17197               0 :     if ( bUseExceptions ) {
   17198               0 :       CPLErrorReset();
   17199                 :     }
   17200                 :     GDALRasterAttributeTableShadow_SetValueAsString(arg1,arg2,arg3,(char const *)arg4);
   17201               0 :     if ( bUseExceptions ) {
   17202               0 :       CPLErr eclass = CPLGetLastErrorType();
   17203               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17204               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17205                 :       }
   17206                 :     }
   17207                 :   }
   17208               0 :   resultobj = SWIG_Py_Void();
   17209                 :   {
   17210                 :     /* %typemap(freearg) (tostring argin) */
   17211               0 :     if ( str4 != NULL)
   17212                 :     {
   17213               0 :       Py_DECREF(str4);
   17214                 :     }
   17215               0 :     GDALPythonFreeCStr(arg4, bToFree4);
   17216                 :   }
   17217               0 :   return resultobj;
   17218                 : fail:
   17219                 :   {
   17220                 :     /* %typemap(freearg) (tostring argin) */
   17221               0 :     if ( str4 != NULL)
   17222                 :     {
   17223               0 :       Py_DECREF(str4);
   17224                 :     }
   17225               0 :     GDALPythonFreeCStr(arg4, bToFree4);
   17226                 :   }
   17227               0 :   return NULL;
   17228                 : }
   17229                 : 
   17230                 : 
   17231               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17232               6 :   PyObject *resultobj = 0;
   17233               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17234                 :   int arg2 ;
   17235                 :   int arg3 ;
   17236                 :   int arg4 ;
   17237               6 :   void *argp1 = 0 ;
   17238               6 :   int res1 = 0 ;
   17239                 :   int val2 ;
   17240               6 :   int ecode2 = 0 ;
   17241                 :   int val3 ;
   17242               6 :   int ecode3 = 0 ;
   17243                 :   int val4 ;
   17244               6 :   int ecode4 = 0 ;
   17245               6 :   PyObject * obj0 = 0 ;
   17246               6 :   PyObject * obj1 = 0 ;
   17247               6 :   PyObject * obj2 = 0 ;
   17248               6 :   PyObject * obj3 = 0 ;
   17249                 :   
   17250               6 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_SetValueAsInt",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   17251               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17252               6 :   if (!SWIG_IsOK(res1)) {
   17253               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17254                 :   }
   17255               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17256               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   17257               6 :   if (!SWIG_IsOK(ecode2)) {
   17258               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "2"" of type '" "int""'");
   17259                 :   } 
   17260               6 :   arg2 = static_cast< int >(val2);
   17261               6 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17262               6 :   if (!SWIG_IsOK(ecode3)) {
   17263               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "3"" of type '" "int""'");
   17264                 :   } 
   17265               6 :   arg3 = static_cast< int >(val3);
   17266               6 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   17267               6 :   if (!SWIG_IsOK(ecode4)) {
   17268               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "4"" of type '" "int""'");
   17269                 :   } 
   17270               6 :   arg4 = static_cast< int >(val4);
   17271                 :   {
   17272               6 :     if ( bUseExceptions ) {
   17273               0 :       CPLErrorReset();
   17274                 :     }
   17275                 :     GDALRasterAttributeTableShadow_SetValueAsInt(arg1,arg2,arg3,arg4);
   17276               6 :     if ( bUseExceptions ) {
   17277               0 :       CPLErr eclass = CPLGetLastErrorType();
   17278               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17279               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17280                 :       }
   17281                 :     }
   17282                 :   }
   17283               6 :   resultobj = SWIG_Py_Void();
   17284               6 :   return resultobj;
   17285                 : fail:
   17286               0 :   return NULL;
   17287                 : }
   17288                 : 
   17289                 : 
   17290               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17291               0 :   PyObject *resultobj = 0;
   17292               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17293                 :   int arg2 ;
   17294                 :   int arg3 ;
   17295                 :   double arg4 ;
   17296               0 :   void *argp1 = 0 ;
   17297               0 :   int res1 = 0 ;
   17298                 :   int val2 ;
   17299               0 :   int ecode2 = 0 ;
   17300                 :   int val3 ;
   17301               0 :   int ecode3 = 0 ;
   17302                 :   double val4 ;
   17303               0 :   int ecode4 = 0 ;
   17304               0 :   PyObject * obj0 = 0 ;
   17305               0 :   PyObject * obj1 = 0 ;
   17306               0 :   PyObject * obj2 = 0 ;
   17307               0 :   PyObject * obj3 = 0 ;
   17308                 :   
   17309               0 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_SetValueAsDouble",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   17310               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17311               0 :   if (!SWIG_IsOK(res1)) {
   17312               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17313                 :   }
   17314               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17315               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   17316               0 :   if (!SWIG_IsOK(ecode2)) {
   17317               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "2"" of type '" "int""'");
   17318                 :   } 
   17319               0 :   arg2 = static_cast< int >(val2);
   17320               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17321               0 :   if (!SWIG_IsOK(ecode3)) {
   17322               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "3"" of type '" "int""'");
   17323                 :   } 
   17324               0 :   arg3 = static_cast< int >(val3);
   17325               0 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   17326               0 :   if (!SWIG_IsOK(ecode4)) {
   17327               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "4"" of type '" "double""'");
   17328                 :   } 
   17329               0 :   arg4 = static_cast< double >(val4);
   17330                 :   {
   17331               0 :     if ( bUseExceptions ) {
   17332               0 :       CPLErrorReset();
   17333                 :     }
   17334                 :     GDALRasterAttributeTableShadow_SetValueAsDouble(arg1,arg2,arg3,arg4);
   17335               0 :     if ( bUseExceptions ) {
   17336               0 :       CPLErr eclass = CPLGetLastErrorType();
   17337               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17338               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17339                 :       }
   17340                 :     }
   17341                 :   }
   17342               0 :   resultobj = SWIG_Py_Void();
   17343               0 :   return resultobj;
   17344                 : fail:
   17345               0 :   return NULL;
   17346                 : }
   17347                 : 
   17348                 : 
   17349               1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17350               1 :   PyObject *resultobj = 0;
   17351               1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17352                 :   int arg2 ;
   17353               1 :   void *argp1 = 0 ;
   17354               1 :   int res1 = 0 ;
   17355                 :   int val2 ;
   17356               1 :   int ecode2 = 0 ;
   17357               1 :   PyObject * obj0 = 0 ;
   17358               1 :   PyObject * obj1 = 0 ;
   17359                 :   
   17360               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_SetRowCount",&obj0,&obj1)) SWIG_fail;
   17361               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17362               1 :   if (!SWIG_IsOK(res1)) {
   17363               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17364                 :   }
   17365               1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17366               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   17367               1 :   if (!SWIG_IsOK(ecode2)) {
   17368               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "2"" of type '" "int""'");
   17369                 :   } 
   17370               1 :   arg2 = static_cast< int >(val2);
   17371                 :   {
   17372               1 :     if ( bUseExceptions ) {
   17373               0 :       CPLErrorReset();
   17374                 :     }
   17375                 :     GDALRasterAttributeTableShadow_SetRowCount(arg1,arg2);
   17376               1 :     if ( bUseExceptions ) {
   17377               0 :       CPLErr eclass = CPLGetLastErrorType();
   17378               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17379               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17380                 :       }
   17381                 :     }
   17382                 :   }
   17383               1 :   resultobj = SWIG_Py_Void();
   17384               1 :   return resultobj;
   17385                 : fail:
   17386               0 :   return NULL;
   17387                 : }
   17388                 : 
   17389                 : 
   17390               2 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_CreateColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17391               2 :   PyObject *resultobj = 0;
   17392               2 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17393               2 :   char *arg2 = (char *) 0 ;
   17394                 :   GDALRATFieldType arg3 ;
   17395                 :   GDALRATFieldUsage arg4 ;
   17396               2 :   void *argp1 = 0 ;
   17397               2 :   int res1 = 0 ;
   17398                 :   int res2 ;
   17399               2 :   char *buf2 = 0 ;
   17400               2 :   int alloc2 = 0 ;
   17401                 :   int val3 ;
   17402               2 :   int ecode3 = 0 ;
   17403                 :   int val4 ;
   17404               2 :   int ecode4 = 0 ;
   17405               2 :   PyObject * obj0 = 0 ;
   17406               2 :   PyObject * obj1 = 0 ;
   17407               2 :   PyObject * obj2 = 0 ;
   17408               2 :   PyObject * obj3 = 0 ;
   17409                 :   int result;
   17410                 :   
   17411               2 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_CreateColumn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   17412               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17413               2 :   if (!SWIG_IsOK(res1)) {
   17414               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17415                 :   }
   17416               2 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17417               2 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   17418               2 :   if (!SWIG_IsOK(res2)) {
   17419               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "2"" of type '" "char const *""'");
   17420                 :   }
   17421               2 :   arg2 = reinterpret_cast< char * >(buf2);
   17422               2 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17423               2 :   if (!SWIG_IsOK(ecode3)) {
   17424               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "3"" of type '" "GDALRATFieldType""'");
   17425                 :   } 
   17426               2 :   arg3 = static_cast< GDALRATFieldType >(val3);
   17427               2 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   17428               2 :   if (!SWIG_IsOK(ecode4)) {
   17429               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "4"" of type '" "GDALRATFieldUsage""'");
   17430                 :   } 
   17431               2 :   arg4 = static_cast< GDALRATFieldUsage >(val4);
   17432                 :   {
   17433               2 :     if ( bUseExceptions ) {
   17434               0 :       CPLErrorReset();
   17435                 :     }
   17436               2 :     result = (int)GDALRasterAttributeTableShadow_CreateColumn(arg1,(char const *)arg2,arg3,arg4);
   17437               2 :     if ( bUseExceptions ) {
   17438               0 :       CPLErr eclass = CPLGetLastErrorType();
   17439               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17440               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17441                 :       }
   17442                 :     }
   17443                 :   }
   17444               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17445               2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17446               2 :   return resultobj;
   17447                 : fail:
   17448               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17449               0 :   return NULL;
   17450                 : }
   17451                 : 
   17452                 : 
   17453               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17454               0 :   PyObject *resultobj = 0;
   17455               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17456               0 :   double *arg2 = (double *) 0 ;
   17457               0 :   double *arg3 = (double *) 0 ;
   17458               0 :   void *argp1 = 0 ;
   17459               0 :   int res1 = 0 ;
   17460                 :   double temp2 ;
   17461               0 :   int res2 = SWIG_TMPOBJ ;
   17462                 :   double temp3 ;
   17463               0 :   int res3 = SWIG_TMPOBJ ;
   17464               0 :   PyObject * obj0 = 0 ;
   17465                 :   bool result;
   17466                 :   
   17467               0 :   arg2 = &temp2;
   17468               0 :   arg3 = &temp3;
   17469               0 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_GetLinearBinning",&obj0)) SWIG_fail;
   17470               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17471               0 :   if (!SWIG_IsOK(res1)) {
   17472               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17473                 :   }
   17474               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17475                 :   {
   17476               0 :     if ( bUseExceptions ) {
   17477               0 :       CPLErrorReset();
   17478                 :     }
   17479               0 :     result = (bool)GDALRasterAttributeTableShadow_GetLinearBinning(arg1,arg2,arg3);
   17480               0 :     if ( bUseExceptions ) {
   17481               0 :       CPLErr eclass = CPLGetLastErrorType();
   17482               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17483               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17484                 :       }
   17485                 :     }
   17486                 :   }
   17487               0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17488               0 :   if (SWIG_IsTmpObj(res2)) {
   17489               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   17490                 :   } else {
   17491               0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   17492               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   17493                 :   }
   17494               0 :   if (SWIG_IsTmpObj(res3)) {
   17495               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   17496                 :   } else {
   17497               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   17498               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   17499                 :   }
   17500               0 :   return resultobj;
   17501                 : fail:
   17502               0 :   return NULL;
   17503                 : }
   17504                 : 
   17505                 : 
   17506               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17507               0 :   PyObject *resultobj = 0;
   17508               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17509                 :   double arg2 ;
   17510                 :   double arg3 ;
   17511               0 :   void *argp1 = 0 ;
   17512               0 :   int res1 = 0 ;
   17513                 :   double val2 ;
   17514               0 :   int ecode2 = 0 ;
   17515                 :   double val3 ;
   17516               0 :   int ecode3 = 0 ;
   17517               0 :   PyObject * obj0 = 0 ;
   17518               0 :   PyObject * obj1 = 0 ;
   17519               0 :   PyObject * obj2 = 0 ;
   17520                 :   int result;
   17521                 :   
   17522               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_SetLinearBinning",&obj0,&obj1,&obj2)) SWIG_fail;
   17523               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17524               0 :   if (!SWIG_IsOK(res1)) {
   17525               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17526                 :   }
   17527               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17528               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   17529               0 :   if (!SWIG_IsOK(ecode2)) {
   17530               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "2"" of type '" "double""'");
   17531                 :   } 
   17532               0 :   arg2 = static_cast< double >(val2);
   17533               0 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   17534               0 :   if (!SWIG_IsOK(ecode3)) {
   17535               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "3"" of type '" "double""'");
   17536                 :   } 
   17537               0 :   arg3 = static_cast< double >(val3);
   17538                 :   {
   17539               0 :     if ( bUseExceptions ) {
   17540               0 :       CPLErrorReset();
   17541                 :     }
   17542               0 :     result = (int)GDALRasterAttributeTableShadow_SetLinearBinning(arg1,arg2,arg3);
   17543               0 :     if ( bUseExceptions ) {
   17544               0 :       CPLErr eclass = CPLGetLastErrorType();
   17545               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17546               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17547                 :       }
   17548                 :     }
   17549                 :   }
   17550               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17551               0 :   return resultobj;
   17552                 : fail:
   17553               0 :   return NULL;
   17554                 : }
   17555                 : 
   17556                 : 
   17557               2 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowOfValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17558               2 :   PyObject *resultobj = 0;
   17559               2 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17560                 :   double arg2 ;
   17561               2 :   void *argp1 = 0 ;
   17562               2 :   int res1 = 0 ;
   17563                 :   double val2 ;
   17564               2 :   int ecode2 = 0 ;
   17565               2 :   PyObject * obj0 = 0 ;
   17566               2 :   PyObject * obj1 = 0 ;
   17567                 :   int result;
   17568                 :   
   17569               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetRowOfValue",&obj0,&obj1)) SWIG_fail;
   17570               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17571               2 :   if (!SWIG_IsOK(res1)) {
   17572               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17573                 :   }
   17574               2 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17575               2 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   17576               2 :   if (!SWIG_IsOK(ecode2)) {
   17577               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "2"" of type '" "double""'");
   17578                 :   } 
   17579               2 :   arg2 = static_cast< double >(val2);
   17580                 :   {
   17581               2 :     if ( bUseExceptions ) {
   17582               0 :       CPLErrorReset();
   17583                 :     }
   17584               2 :     result = (int)GDALRasterAttributeTableShadow_GetRowOfValue(arg1,arg2);
   17585               2 :     if ( bUseExceptions ) {
   17586               0 :       CPLErr eclass = CPLGetLastErrorType();
   17587               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17588               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17589                 :       }
   17590                 :     }
   17591                 :   }
   17592               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17593               2 :   return resultobj;
   17594                 : fail:
   17595               0 :   return NULL;
   17596                 : }
   17597                 : 
   17598                 : 
   17599              12 : SWIGINTERN PyObject *RasterAttributeTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17600                 :   PyObject *obj;
   17601              12 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   17602              12 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_NewClientData(obj));
   17603              12 :   return SWIG_Py_Void();
   17604                 : }
   17605                 : 
   17606            2062 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17607            2062 :   PyObject *resultobj = 0;
   17608                 :   double arg1 ;
   17609            2062 :   char *arg2 = (char *) NULL ;
   17610            2062 :   void *arg3 = (void *) NULL ;
   17611                 :   double val1 ;
   17612            2062 :   int ecode1 = 0 ;
   17613                 :   int res2 ;
   17614            2062 :   char *buf2 = 0 ;
   17615            2062 :   int alloc2 = 0 ;
   17616                 :   int res3 ;
   17617            2062 :   PyObject * obj0 = 0 ;
   17618            2062 :   PyObject * obj1 = 0 ;
   17619            2062 :   PyObject * obj2 = 0 ;
   17620                 :   char *  kwnames[] = {
   17621                 :     (char *) "dfProgress",(char *) "pszMessage",(char *) "pData", NULL 
   17622            2062 :   };
   17623                 :   int result;
   17624                 :   
   17625            2062 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:TermProgress_nocb",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   17626            2062 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   17627            2062 :   if (!SWIG_IsOK(ecode1)) {
   17628               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
   17629                 :   } 
   17630            2062 :   arg1 = static_cast< double >(val1);
   17631            2062 :   if (obj1) {
   17632               0 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   17633               0 :     if (!SWIG_IsOK(res2)) {
   17634               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
   17635                 :     }
   17636               0 :     arg2 = reinterpret_cast< char * >(buf2);
   17637                 :   }
   17638            2062 :   if (obj2) {
   17639               0 :     res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
   17640               0 :     if (!SWIG_IsOK(res3)) {
   17641               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
   17642                 :     }
   17643                 :   }
   17644                 :   {
   17645            2062 :     if ( bUseExceptions ) {
   17646               0 :       CPLErrorReset();
   17647                 :     }
   17648            2062 :     result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
   17649            2062 :     if ( bUseExceptions ) {
   17650               0 :       CPLErr eclass = CPLGetLastErrorType();
   17651               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17652               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17653                 :       }
   17654                 :     }
   17655                 :   }
   17656            2062 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17657            2062 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17658            2062 :   return resultobj;
   17659                 : fail:
   17660               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17661               0 :   return NULL;
   17662                 : }
   17663                 : 
   17664                 : 
   17665               3 : SWIGINTERN PyObject *_wrap_ComputeMedianCutPCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17666               3 :   PyObject *resultobj = 0;
   17667               3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   17668               3 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   17669               3 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   17670                 :   int arg4 ;
   17671               3 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   17672               3 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   17673               3 :   void *arg7 = (void *) NULL ;
   17674               3 :   void *argp1 = 0 ;
   17675               3 :   int res1 = 0 ;
   17676               3 :   void *argp2 = 0 ;
   17677               3 :   int res2 = 0 ;
   17678               3 :   void *argp3 = 0 ;
   17679               3 :   int res3 = 0 ;
   17680                 :   int val4 ;
   17681               3 :   int ecode4 = 0 ;
   17682               3 :   void *argp5 = 0 ;
   17683               3 :   int res5 = 0 ;
   17684               3 :   PyObject * obj0 = 0 ;
   17685               3 :   PyObject * obj1 = 0 ;
   17686               3 :   PyObject * obj2 = 0 ;
   17687               3 :   PyObject * obj3 = 0 ;
   17688               3 :   PyObject * obj4 = 0 ;
   17689               3 :   PyObject * obj5 = 0 ;
   17690               3 :   PyObject * obj6 = 0 ;
   17691                 :   char *  kwnames[] = {
   17692                 :     (char *) "red",(char *) "green",(char *) "blue",(char *) "num_colors",(char *) "colors",(char *) "callback",(char *) "callback_data", NULL 
   17693               3 :   };
   17694                 :   int result;
   17695                 :   
   17696                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   17697                 :   PyProgressData *psProgressInfo;
   17698               3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   17699               3 :   psProgressInfo->nLastReported = -1;
   17700               3 :   psProgressInfo->psPyCallback = NULL;
   17701               3 :   psProgressInfo->psPyCallbackData = NULL;
   17702               3 :   arg7 = psProgressInfo;
   17703               3 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OO:ComputeMedianCutPCT",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   17704               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17705               3 :   if (!SWIG_IsOK(res1)) {
   17706               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeMedianCutPCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   17707                 :   }
   17708               3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   17709               3 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17710               3 :   if (!SWIG_IsOK(res2)) {
   17711               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeMedianCutPCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   17712                 :   }
   17713               3 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   17714               3 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17715               3 :   if (!SWIG_IsOK(res3)) {
   17716               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ComputeMedianCutPCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   17717                 :   }
   17718               3 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   17719               3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   17720               3 :   if (!SWIG_IsOK(ecode4)) {
   17721               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ComputeMedianCutPCT" "', argument " "4"" of type '" "int""'");
   17722                 :   } 
   17723               3 :   arg4 = static_cast< int >(val4);
   17724               3 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   17725               3 :   if (!SWIG_IsOK(res5)) {
   17726               0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ComputeMedianCutPCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   17727                 :   }
   17728               3 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   17729               3 :   if (obj5) {
   17730                 :     {
   17731                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   17732                 :       /* callback_func typemap */
   17733               2 :       if (obj5 && obj5 != Py_None ) {
   17734               2 :         void* cbfunction = NULL;
   17735                 :         SWIG_ConvertPtr( obj5, 
   17736                 :           (void**)&cbfunction,
   17737                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   17738               2 :           SWIG_POINTER_EXCEPTION | 0 );
   17739                 :         
   17740               2 :         if ( cbfunction == GDALTermProgress ) {
   17741               2 :           arg6 = GDALTermProgress;
   17742                 :         } else {
   17743               0 :           if (!PyCallable_Check(obj5)) {
   17744                 :             PyErr_SetString( PyExc_RuntimeError, 
   17745               0 :               "Object given is not a Python function" );
   17746               0 :             SWIG_fail;
   17747                 :           }
   17748               0 :           psProgressInfo->psPyCallback = obj5;
   17749               0 :           arg6 = PyProgressProxy;
   17750                 :         }
   17751                 :         
   17752                 :       }
   17753                 :       
   17754                 :     }
   17755                 :   }
   17756               3 :   if (obj6) {
   17757                 :     {
   17758                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   17759               2 :       psProgressInfo->psPyCallbackData = obj6 ;
   17760                 :     }
   17761                 :   }
   17762                 :   {
   17763               3 :     if (!arg1) {
   17764               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17765                 :     }
   17766                 :   }
   17767                 :   {
   17768               3 :     if (!arg2) {
   17769               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17770                 :     }
   17771                 :   }
   17772                 :   {
   17773               3 :     if (!arg3) {
   17774               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17775                 :     }
   17776                 :   }
   17777                 :   {
   17778               3 :     if (!arg5) {
   17779               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17780                 :     }
   17781                 :   }
   17782                 :   {
   17783               3 :     if ( bUseExceptions ) {
   17784               0 :       CPLErrorReset();
   17785                 :     }
   17786               3 :     result = (int)ComputeMedianCutPCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   17787               3 :     if ( bUseExceptions ) {
   17788               0 :       CPLErr eclass = CPLGetLastErrorType();
   17789               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17790               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17791                 :       }
   17792                 :     }
   17793                 :   }
   17794               3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17795                 :   {
   17796                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17797                 :     
   17798               3 :     CPLFree(psProgressInfo);
   17799                 :     
   17800                 :   }
   17801               3 :   return resultobj;
   17802                 : fail:
   17803                 :   {
   17804                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17805                 :     
   17806               0 :     CPLFree(psProgressInfo);
   17807                 :     
   17808                 :   }
   17809               0 :   return NULL;
   17810                 : }
   17811                 : 
   17812                 : 
   17813               4 : SWIGINTERN PyObject *_wrap_DitherRGB2PCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17814               4 :   PyObject *resultobj = 0;
   17815               4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   17816               4 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   17817               4 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   17818               4 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   17819               4 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   17820               4 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   17821               4 :   void *arg7 = (void *) NULL ;
   17822               4 :   void *argp1 = 0 ;
   17823               4 :   int res1 = 0 ;
   17824               4 :   void *argp2 = 0 ;
   17825               4 :   int res2 = 0 ;
   17826               4 :   void *argp3 = 0 ;
   17827               4 :   int res3 = 0 ;
   17828               4 :   void *argp4 = 0 ;
   17829               4 :   int res4 = 0 ;
   17830               4 :   void *argp5 = 0 ;
   17831               4 :   int res5 = 0 ;
   17832               4 :   PyObject * obj0 = 0 ;
   17833               4 :   PyObject * obj1 = 0 ;
   17834               4 :   PyObject * obj2 = 0 ;
   17835               4 :   PyObject * obj3 = 0 ;
   17836               4 :   PyObject * obj4 = 0 ;
   17837               4 :   PyObject * obj5 = 0 ;
   17838               4 :   PyObject * obj6 = 0 ;
   17839                 :   char *  kwnames[] = {
   17840                 :     (char *) "red",(char *) "green",(char *) "blue",(char *) "target",(char *) "colors",(char *) "callback",(char *) "callback_data", NULL 
   17841               4 :   };
   17842                 :   int result;
   17843                 :   
   17844                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   17845                 :   PyProgressData *psProgressInfo;
   17846               4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   17847               4 :   psProgressInfo->nLastReported = -1;
   17848               4 :   psProgressInfo->psPyCallback = NULL;
   17849               4 :   psProgressInfo->psPyCallbackData = NULL;
   17850               4 :   arg7 = psProgressInfo;
   17851               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OO:DitherRGB2PCT",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   17852               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17853               4 :   if (!SWIG_IsOK(res1)) {
   17854               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DitherRGB2PCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   17855                 :   }
   17856               4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   17857               4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17858               4 :   if (!SWIG_IsOK(res2)) {
   17859               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DitherRGB2PCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   17860                 :   }
   17861               4 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   17862               4 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17863               4 :   if (!SWIG_IsOK(res3)) {
   17864               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DitherRGB2PCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   17865                 :   }
   17866               4 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   17867               4 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17868               4 :   if (!SWIG_IsOK(res4)) {
   17869               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DitherRGB2PCT" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   17870                 :   }
   17871               4 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   17872               4 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   17873               4 :   if (!SWIG_IsOK(res5)) {
   17874               0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DitherRGB2PCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   17875                 :   }
   17876               4 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   17877               4 :   if (obj5) {
   17878                 :     {
   17879                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   17880                 :       /* callback_func typemap */
   17881               3 :       if (obj5 && obj5 != Py_None ) {
   17882               3 :         void* cbfunction = NULL;
   17883                 :         SWIG_ConvertPtr( obj5, 
   17884                 :           (void**)&cbfunction,
   17885                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   17886               3 :           SWIG_POINTER_EXCEPTION | 0 );
   17887                 :         
   17888               3 :         if ( cbfunction == GDALTermProgress ) {
   17889               3 :           arg6 = GDALTermProgress;
   17890                 :         } else {
   17891               0 :           if (!PyCallable_Check(obj5)) {
   17892                 :             PyErr_SetString( PyExc_RuntimeError, 
   17893               0 :               "Object given is not a Python function" );
   17894               0 :             SWIG_fail;
   17895                 :           }
   17896               0 :           psProgressInfo->psPyCallback = obj5;
   17897               0 :           arg6 = PyProgressProxy;
   17898                 :         }
   17899                 :         
   17900                 :       }
   17901                 :       
   17902                 :     }
   17903                 :   }
   17904               4 :   if (obj6) {
   17905                 :     {
   17906                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   17907               3 :       psProgressInfo->psPyCallbackData = obj6 ;
   17908                 :     }
   17909                 :   }
   17910                 :   {
   17911               4 :     if (!arg1) {
   17912               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17913                 :     }
   17914                 :   }
   17915                 :   {
   17916               4 :     if (!arg2) {
   17917               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17918                 :     }
   17919                 :   }
   17920                 :   {
   17921               4 :     if (!arg3) {
   17922               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17923                 :     }
   17924                 :   }
   17925                 :   {
   17926               4 :     if (!arg4) {
   17927               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17928                 :     }
   17929                 :   }
   17930                 :   {
   17931               4 :     if (!arg5) {
   17932               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17933                 :     }
   17934                 :   }
   17935                 :   {
   17936               4 :     if ( bUseExceptions ) {
   17937               0 :       CPLErrorReset();
   17938                 :     }
   17939               4 :     result = (int)DitherRGB2PCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   17940               4 :     if ( bUseExceptions ) {
   17941               0 :       CPLErr eclass = CPLGetLastErrorType();
   17942               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17943               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17944                 :       }
   17945                 :     }
   17946                 :   }
   17947               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17948                 :   {
   17949                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17950                 :     
   17951               4 :     CPLFree(psProgressInfo);
   17952                 :     
   17953                 :   }
   17954               4 :   return resultobj;
   17955                 : fail:
   17956                 :   {
   17957                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17958                 :     
   17959               0 :     CPLFree(psProgressInfo);
   17960                 :     
   17961                 :   }
   17962               0 :   return NULL;
   17963                 : }
   17964                 : 
   17965                 : 
   17966               9 : SWIGINTERN PyObject *_wrap_ReprojectImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17967               9 :   PyObject *resultobj = 0;
   17968               9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   17969               9 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   17970               9 :   char *arg3 = (char *) NULL ;
   17971               9 :   char *arg4 = (char *) NULL ;
   17972               9 :   GDALResampleAlg arg5 = (GDALResampleAlg) GRA_NearestNeighbour ;
   17973               9 :   double arg6 = (double) 0.0 ;
   17974               9 :   double arg7 = (double) 0.0 ;
   17975               9 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   17976               9 :   void *arg9 = (void *) NULL ;
   17977               9 :   void *argp1 = 0 ;
   17978               9 :   int res1 = 0 ;
   17979               9 :   void *argp2 = 0 ;
   17980               9 :   int res2 = 0 ;
   17981                 :   int res3 ;
   17982               9 :   char *buf3 = 0 ;
   17983               9 :   int alloc3 = 0 ;
   17984                 :   int res4 ;
   17985               9 :   char *buf4 = 0 ;
   17986               9 :   int alloc4 = 0 ;
   17987                 :   int val5 ;
   17988               9 :   int ecode5 = 0 ;
   17989                 :   double val6 ;
   17990               9 :   int ecode6 = 0 ;
   17991                 :   double val7 ;
   17992               9 :   int ecode7 = 0 ;
   17993               9 :   PyObject * obj0 = 0 ;
   17994               9 :   PyObject * obj1 = 0 ;
   17995               9 :   PyObject * obj2 = 0 ;
   17996               9 :   PyObject * obj3 = 0 ;
   17997               9 :   PyObject * obj4 = 0 ;
   17998               9 :   PyObject * obj5 = 0 ;
   17999               9 :   PyObject * obj6 = 0 ;
   18000               9 :   PyObject * obj7 = 0 ;
   18001               9 :   PyObject * obj8 = 0 ;
   18002                 :   CPLErr result;
   18003                 :   
   18004                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18005                 :   PyProgressData *psProgressInfo;
   18006               9 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18007               9 :   psProgressInfo->nLastReported = -1;
   18008               9 :   psProgressInfo->psPyCallback = NULL;
   18009               9 :   psProgressInfo->psPyCallbackData = NULL;
   18010               9 :   arg9 = psProgressInfo;
   18011               9 :   if (!PyArg_ParseTuple(args,(char *)"OO|OOOOOOO:ReprojectImage",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
   18012               9 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   18013               9 :   if (!SWIG_IsOK(res1)) {
   18014               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReprojectImage" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   18015                 :   }
   18016               9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   18017               9 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   18018               9 :   if (!SWIG_IsOK(res2)) {
   18019               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReprojectImage" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   18020                 :   }
   18021               9 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   18022               9 :   if (obj2) {
   18023               8 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   18024               8 :     if (!SWIG_IsOK(res3)) {
   18025               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReprojectImage" "', argument " "3"" of type '" "char const *""'");
   18026                 :     }
   18027               8 :     arg3 = reinterpret_cast< char * >(buf3);
   18028                 :   }
   18029               9 :   if (obj3) {
   18030               8 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   18031               8 :     if (!SWIG_IsOK(res4)) {
   18032               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReprojectImage" "', argument " "4"" of type '" "char const *""'");
   18033                 :     }
   18034               8 :     arg4 = reinterpret_cast< char * >(buf4);
   18035                 :   }
   18036               9 :   if (obj4) {
   18037               7 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   18038               7 :     if (!SWIG_IsOK(ecode5)) {
   18039               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ReprojectImage" "', argument " "5"" of type '" "GDALResampleAlg""'");
   18040                 :     } 
   18041               7 :     arg5 = static_cast< GDALResampleAlg >(val5);
   18042                 :   }
   18043               9 :   if (obj5) {
   18044               3 :     ecode6 = SWIG_AsVal_double(obj5, &val6);
   18045               3 :     if (!SWIG_IsOK(ecode6)) {
   18046               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ReprojectImage" "', argument " "6"" of type '" "double""'");
   18047                 :     } 
   18048               3 :     arg6 = static_cast< double >(val6);
   18049                 :   }
   18050               9 :   if (obj6) {
   18051               3 :     ecode7 = SWIG_AsVal_double(obj6, &val7);
   18052               3 :     if (!SWIG_IsOK(ecode7)) {
   18053               0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ReprojectImage" "', argument " "7"" of type '" "double""'");
   18054                 :     } 
   18055               3 :     arg7 = static_cast< double >(val7);
   18056                 :   }
   18057               9 :   if (obj7) {
   18058                 :     {
   18059                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18060                 :       /* callback_func typemap */
   18061               3 :       if (obj7 && obj7 != Py_None ) {
   18062               3 :         void* cbfunction = NULL;
   18063                 :         SWIG_ConvertPtr( obj7, 
   18064                 :           (void**)&cbfunction,
   18065                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18066               3 :           SWIG_POINTER_EXCEPTION | 0 );
   18067                 :         
   18068               3 :         if ( cbfunction == GDALTermProgress ) {
   18069               0 :           arg8 = GDALTermProgress;
   18070                 :         } else {
   18071               3 :           if (!PyCallable_Check(obj7)) {
   18072                 :             PyErr_SetString( PyExc_RuntimeError, 
   18073               0 :               "Object given is not a Python function" );
   18074               0 :             SWIG_fail;
   18075                 :           }
   18076               3 :           psProgressInfo->psPyCallback = obj7;
   18077               3 :           arg8 = PyProgressProxy;
   18078                 :         }
   18079                 :         
   18080                 :       }
   18081                 :       
   18082                 :     }
   18083                 :   }
   18084               9 :   if (obj8) {
   18085                 :     {
   18086                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18087               3 :       psProgressInfo->psPyCallbackData = obj8 ;
   18088                 :     }
   18089                 :   }
   18090                 :   {
   18091               9 :     if (!arg1) {
   18092               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18093                 :     }
   18094                 :   }
   18095                 :   {
   18096               9 :     if (!arg2) {
   18097               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18098                 :     }
   18099                 :   }
   18100                 :   {
   18101               9 :     if ( bUseExceptions ) {
   18102               0 :       CPLErrorReset();
   18103                 :     }
   18104               9 :     result = (CPLErr)ReprojectImage(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7,arg8,arg9);
   18105               9 :     if ( bUseExceptions ) {
   18106               0 :       CPLErr eclass = CPLGetLastErrorType();
   18107               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18108               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18109                 :       }
   18110                 :     }
   18111                 :   }
   18112              18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18113               9 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18114               9 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18115                 :   {
   18116                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18117                 :     
   18118               9 :     CPLFree(psProgressInfo);
   18119                 :     
   18120                 :   }
   18121               9 :   return resultobj;
   18122                 : fail:
   18123               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18124               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18125                 :   {
   18126                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18127                 :     
   18128               0 :     CPLFree(psProgressInfo);
   18129                 :     
   18130                 :   }
   18131               0 :   return NULL;
   18132                 : }
   18133                 : 
   18134                 : 
   18135               4 : SWIGINTERN PyObject *_wrap_ComputeProximity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18136               4 :   PyObject *resultobj = 0;
   18137               4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18138               4 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   18139               4 :   char **arg3 = (char **) NULL ;
   18140               4 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   18141               4 :   void *arg5 = (void *) NULL ;
   18142               4 :   void *argp1 = 0 ;
   18143               4 :   int res1 = 0 ;
   18144               4 :   void *argp2 = 0 ;
   18145               4 :   int res2 = 0 ;
   18146               4 :   PyObject * obj0 = 0 ;
   18147               4 :   PyObject * obj1 = 0 ;
   18148               4 :   PyObject * obj2 = 0 ;
   18149               4 :   PyObject * obj3 = 0 ;
   18150               4 :   PyObject * obj4 = 0 ;
   18151                 :   char *  kwnames[] = {
   18152                 :     (char *) "srcBand",(char *) "proximityBand",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18153               4 :   };
   18154                 :   int result;
   18155                 :   
   18156                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18157                 :   PyProgressData *psProgressInfo;
   18158               4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18159               4 :   psProgressInfo->nLastReported = -1;
   18160               4 :   psProgressInfo->psPyCallback = NULL;
   18161               4 :   psProgressInfo->psPyCallbackData = NULL;
   18162               4 :   arg5 = psProgressInfo;
   18163               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:ComputeProximity",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   18164               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18165               4 :   if (!SWIG_IsOK(res1)) {
   18166               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeProximity" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18167                 :   }
   18168               4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18169               4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18170               4 :   if (!SWIG_IsOK(res2)) {
   18171               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeProximity" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18172                 :   }
   18173               4 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18174               4 :   if (obj2) {
   18175                 :     {
   18176                 :       /* %typemap(in) char **options */
   18177                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   18178               3 :       if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
   18179                 :   #if PY_VERSION_HEX < 0x03000000
   18180                 :         || PyString_Check(obj2)
   18181                 :   #endif
   18182                 :         ) {
   18183               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18184               0 :         SWIG_fail;
   18185                 :       }
   18186                 :       
   18187               3 :       int size = PySequence_Size(obj2);
   18188              11 :       for (int i = 0; i < size; i++) {
   18189               8 :         PyObject* pyObj = PySequence_GetItem(obj2,i);
   18190               8 :         if (PyUnicode_Check(pyObj))
   18191                 :         {
   18192                 :           char *pszStr;
   18193                 :           Py_ssize_t nLen;
   18194               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18195                 : #if PY_VERSION_HEX >= 0x03000000
   18196                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18197                 : #else
   18198               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18199                 : #endif
   18200               0 :           arg3 = CSLAddString( arg3, pszStr );
   18201               0 :           Py_XDECREF(pyUTF8Str);
   18202                 :         }
   18203                 : #if PY_VERSION_HEX >= 0x03000000
   18204                 :         else if (PyBytes_Check(pyObj))
   18205                 :         arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
   18206                 : #else
   18207               8 :         else if (PyString_Check(pyObj))
   18208               8 :         arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
   18209                 : #endif
   18210                 :         else
   18211                 :         {
   18212               0 :           Py_DECREF(pyObj);
   18213               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18214               0 :           SWIG_fail;
   18215                 :         }
   18216               8 :         Py_DECREF(pyObj);
   18217                 :       }
   18218                 :     }
   18219                 :   }
   18220               4 :   if (obj3) {
   18221                 :     {
   18222                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18223                 :       /* callback_func typemap */
   18224               2 :       if (obj3 && obj3 != Py_None ) {
   18225               1 :         void* cbfunction = NULL;
   18226                 :         SWIG_ConvertPtr( obj3, 
   18227                 :           (void**)&cbfunction,
   18228                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18229               1 :           SWIG_POINTER_EXCEPTION | 0 );
   18230                 :         
   18231               1 :         if ( cbfunction == GDALTermProgress ) {
   18232               1 :           arg4 = GDALTermProgress;
   18233                 :         } else {
   18234               0 :           if (!PyCallable_Check(obj3)) {
   18235                 :             PyErr_SetString( PyExc_RuntimeError, 
   18236               0 :               "Object given is not a Python function" );
   18237               0 :             SWIG_fail;
   18238                 :           }
   18239               0 :           psProgressInfo->psPyCallback = obj3;
   18240               0 :           arg4 = PyProgressProxy;
   18241                 :         }
   18242                 :         
   18243                 :       }
   18244                 :       
   18245                 :     }
   18246                 :   }
   18247               4 :   if (obj4) {
   18248                 :     {
   18249                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18250               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   18251                 :     }
   18252                 :   }
   18253                 :   {
   18254               4 :     if (!arg1) {
   18255               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18256                 :     }
   18257                 :   }
   18258                 :   {
   18259               4 :     if (!arg2) {
   18260               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18261                 :     }
   18262                 :   }
   18263                 :   {
   18264               4 :     if ( bUseExceptions ) {
   18265               0 :       CPLErrorReset();
   18266                 :     }
   18267               4 :     result = (int)ComputeProximity(arg1,arg2,arg3,arg4,arg5);
   18268               4 :     if ( bUseExceptions ) {
   18269               0 :       CPLErr eclass = CPLGetLastErrorType();
   18270               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18271               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18272                 :       }
   18273                 :     }
   18274                 :   }
   18275               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18276                 :   {
   18277                 :     /* %typemap(freearg) char **options */
   18278               4 :     CSLDestroy( arg3 );
   18279                 :   }
   18280                 :   {
   18281                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18282                 :     
   18283               4 :     CPLFree(psProgressInfo);
   18284                 :     
   18285                 :   }
   18286               4 :   return resultobj;
   18287                 : fail:
   18288                 :   {
   18289                 :     /* %typemap(freearg) char **options */
   18290               0 :     CSLDestroy( arg3 );
   18291                 :   }
   18292                 :   {
   18293                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18294                 :     
   18295               0 :     CPLFree(psProgressInfo);
   18296                 :     
   18297                 :   }
   18298               0 :   return NULL;
   18299                 : }
   18300                 : 
   18301                 : 
   18302               4 : SWIGINTERN PyObject *_wrap_RasterizeLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18303               4 :   PyObject *resultobj = 0;
   18304               4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   18305                 :   int arg2 ;
   18306               4 :   int *arg3 = (int *) 0 ;
   18307               4 :   OGRLayerShadow *arg4 = (OGRLayerShadow *) 0 ;
   18308               4 :   void *arg5 = (void *) NULL ;
   18309               4 :   void *arg6 = (void *) NULL ;
   18310               4 :   int arg7 = (int) 0 ;
   18311               4 :   double *arg8 = (double *) NULL ;
   18312               4 :   char **arg9 = (char **) NULL ;
   18313               4 :   GDALProgressFunc arg10 = (GDALProgressFunc) NULL ;
   18314               4 :   void *arg11 = (void *) NULL ;
   18315               4 :   void *argp1 = 0 ;
   18316               4 :   int res1 = 0 ;
   18317               4 :   void *argp4 = 0 ;
   18318               4 :   int res4 = 0 ;
   18319                 :   int res5 ;
   18320                 :   int res6 ;
   18321               4 :   PyObject * obj0 = 0 ;
   18322               4 :   PyObject * obj1 = 0 ;
   18323               4 :   PyObject * obj2 = 0 ;
   18324               4 :   PyObject * obj3 = 0 ;
   18325               4 :   PyObject * obj4 = 0 ;
   18326               4 :   PyObject * obj5 = 0 ;
   18327               4 :   PyObject * obj6 = 0 ;
   18328               4 :   PyObject * obj7 = 0 ;
   18329               4 :   PyObject * obj8 = 0 ;
   18330                 :   char *  kwnames[] = {
   18331                 :     (char *) "dataset",(char *) "bands",(char *) "layer",(char *) "pfnTransformer",(char *) "pTransformArg",(char *) "burn_values",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18332               4 :   };
   18333                 :   int result;
   18334                 :   
   18335                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18336                 :   PyProgressData *psProgressInfo;
   18337               4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18338               4 :   psProgressInfo->nLastReported = -1;
   18339               4 :   psProgressInfo->psPyCallback = NULL;
   18340               4 :   psProgressInfo->psPyCallbackData = NULL;
   18341               4 :   arg11 = psProgressInfo;
   18342               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOO:RasterizeLayer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
   18343               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   18344               4 :   if (!SWIG_IsOK(res1)) {
   18345               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterizeLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   18346                 :   }
   18347               4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   18348                 :   {
   18349                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   18350                 :     /* check if is List */
   18351               4 :     if ( !PySequence_Check(obj1) ) {
   18352               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   18353               0 :       SWIG_fail;
   18354                 :     }
   18355               4 :     arg2 = PySequence_Size(obj1);
   18356               4 :     arg3 = (int*) malloc(arg2*sizeof(int));
   18357              16 :     for( int i = 0; i<arg2; i++ ) {
   18358              12 :       PyObject *o = PySequence_GetItem(obj1,i);
   18359              12 :       if ( !PyArg_Parse(o,"i",&arg3[i]) ) {
   18360               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
   18361               0 :         Py_DECREF(o);
   18362                 :         SWIG_fail;
   18363                 :       }
   18364              12 :       Py_DECREF(o);
   18365                 :     }
   18366                 :   }
   18367               4 :   res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   18368               4 :   if (!SWIG_IsOK(res4)) {
   18369               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RasterizeLayer" "', argument " "4"" of type '" "OGRLayerShadow *""'"); 
   18370                 :   }
   18371               4 :   arg4 = reinterpret_cast< OGRLayerShadow * >(argp4);
   18372               4 :   if (obj3) {
   18373               0 :     res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
   18374               0 :     if (!SWIG_IsOK(res5)) {
   18375               0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "RasterizeLayer" "', argument " "5"" of type '" "void *""'"); 
   18376                 :     }
   18377                 :   }
   18378               4 :   if (obj4) {
   18379               0 :     res6 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg6), 0, 0);
   18380               0 :     if (!SWIG_IsOK(res6)) {
   18381               0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "RasterizeLayer" "', argument " "6"" of type '" "void *""'"); 
   18382                 :     }
   18383                 :   }
   18384               4 :   if (obj5) {
   18385                 :     {
   18386                 :       /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   18387                 :       /* check if is List */
   18388               3 :       if ( !PySequence_Check(obj5) ) {
   18389               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   18390               0 :         SWIG_fail;
   18391                 :       }
   18392               3 :       arg7 = PySequence_Size(obj5);
   18393               3 :       arg8 = (double*) malloc(arg7*sizeof(double));
   18394              12 :       for( int i = 0; i<arg7; i++ ) {
   18395               9 :         PyObject *o = PySequence_GetItem(obj5,i);
   18396               9 :         if ( !PyArg_Parse(o,"d",&arg8[i]) ) {
   18397               0 :           PyErr_SetString(PyExc_TypeError, "not a number");
   18398               0 :           Py_DECREF(o);
   18399                 :           SWIG_fail;
   18400                 :         }
   18401               9 :         Py_DECREF(o);
   18402                 :       }
   18403                 :     }
   18404                 :   }
   18405               4 :   if (obj6) {
   18406                 :     {
   18407                 :       /* %typemap(in) char **options */
   18408                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   18409               3 :       if ( ! PySequence_Check(obj6) || PyUnicode_Check(obj6)
   18410                 :   #if PY_VERSION_HEX < 0x03000000
   18411                 :         || PyString_Check(obj6)
   18412                 :   #endif
   18413                 :         ) {
   18414               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18415               0 :         SWIG_fail;
   18416                 :       }
   18417                 :       
   18418               3 :       int size = PySequence_Size(obj6);
   18419               6 :       for (int i = 0; i < size; i++) {
   18420               3 :         PyObject* pyObj = PySequence_GetItem(obj6,i);
   18421               3 :         if (PyUnicode_Check(pyObj))
   18422                 :         {
   18423                 :           char *pszStr;
   18424                 :           Py_ssize_t nLen;
   18425               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18426                 : #if PY_VERSION_HEX >= 0x03000000
   18427                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18428                 : #else
   18429               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18430                 : #endif
   18431               0 :           arg9 = CSLAddString( arg9, pszStr );
   18432               0 :           Py_XDECREF(pyUTF8Str);
   18433                 :         }
   18434                 : #if PY_VERSION_HEX >= 0x03000000
   18435                 :         else if (PyBytes_Check(pyObj))
   18436                 :         arg9 = CSLAddString( arg9, PyBytes_AsString(pyObj) );
   18437                 : #else
   18438               3 :         else if (PyString_Check(pyObj))
   18439               3 :         arg9 = CSLAddString( arg9, PyString_AsString(pyObj) );
   18440                 : #endif
   18441                 :         else
   18442                 :         {
   18443               0 :           Py_DECREF(pyObj);
   18444               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18445               0 :           SWIG_fail;
   18446                 :         }
   18447               3 :         Py_DECREF(pyObj);
   18448                 :       }
   18449                 :     }
   18450                 :   }
   18451               4 :   if (obj7) {
   18452                 :     {
   18453                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18454                 :       /* callback_func typemap */
   18455               0 :       if (obj7 && obj7 != Py_None ) {
   18456               0 :         void* cbfunction = NULL;
   18457                 :         SWIG_ConvertPtr( obj7, 
   18458                 :           (void**)&cbfunction,
   18459                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18460               0 :           SWIG_POINTER_EXCEPTION | 0 );
   18461                 :         
   18462               0 :         if ( cbfunction == GDALTermProgress ) {
   18463               0 :           arg10 = GDALTermProgress;
   18464                 :         } else {
   18465               0 :           if (!PyCallable_Check(obj7)) {
   18466                 :             PyErr_SetString( PyExc_RuntimeError, 
   18467               0 :               "Object given is not a Python function" );
   18468               0 :             SWIG_fail;
   18469                 :           }
   18470               0 :           psProgressInfo->psPyCallback = obj7;
   18471               0 :           arg10 = PyProgressProxy;
   18472                 :         }
   18473                 :         
   18474                 :       }
   18475                 :       
   18476                 :     }
   18477                 :   }
   18478               4 :   if (obj8) {
   18479                 :     {
   18480                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18481               0 :       psProgressInfo->psPyCallbackData = obj8 ;
   18482                 :     }
   18483                 :   }
   18484                 :   {
   18485               4 :     if (!arg1) {
   18486               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18487                 :     }
   18488                 :   }
   18489                 :   {
   18490               4 :     if (!arg4) {
   18491               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18492                 :     }
   18493                 :   }
   18494                 :   {
   18495               4 :     if ( bUseExceptions ) {
   18496               0 :       CPLErrorReset();
   18497                 :     }
   18498               4 :     result = (int)RasterizeLayer(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   18499               4 :     if ( bUseExceptions ) {
   18500               0 :       CPLErr eclass = CPLGetLastErrorType();
   18501               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18502               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18503                 :       }
   18504                 :     }
   18505                 :   }
   18506               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18507                 :   {
   18508                 :     /* %typemap(freearg) (int nList, int* pList) */
   18509               4 :     if (arg3) {
   18510               4 :       free((void*) arg3);
   18511                 :     }
   18512                 :   }
   18513                 :   {
   18514                 :     /* %typemap(freearg) (int nList, double* pList) */
   18515               4 :     if (arg8) {
   18516               3 :       free((void*) arg8);
   18517                 :     }
   18518                 :   }
   18519                 :   {
   18520                 :     /* %typemap(freearg) char **options */
   18521               4 :     CSLDestroy( arg9 );
   18522                 :   }
   18523                 :   {
   18524                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18525                 :     
   18526               4 :     CPLFree(psProgressInfo);
   18527                 :     
   18528                 :   }
   18529               4 :   return resultobj;
   18530                 : fail:
   18531                 :   {
   18532                 :     /* %typemap(freearg) (int nList, int* pList) */
   18533               0 :     if (arg3) {
   18534               0 :       free((void*) arg3);
   18535                 :     }
   18536                 :   }
   18537                 :   {
   18538                 :     /* %typemap(freearg) (int nList, double* pList) */
   18539               0 :     if (arg8) {
   18540               0 :       free((void*) arg8);
   18541                 :     }
   18542                 :   }
   18543                 :   {
   18544                 :     /* %typemap(freearg) char **options */
   18545               0 :     CSLDestroy( arg9 );
   18546                 :   }
   18547                 :   {
   18548                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18549                 :     
   18550               0 :     CPLFree(psProgressInfo);
   18551                 :     
   18552                 :   }
   18553               0 :   return NULL;
   18554                 : }
   18555                 : 
   18556                 : 
   18557               6 : SWIGINTERN PyObject *_wrap_Polygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18558               6 :   PyObject *resultobj = 0;
   18559               6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18560               6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   18561               6 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   18562                 :   int arg4 ;
   18563               6 :   char **arg5 = (char **) NULL ;
   18564               6 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   18565               6 :   void *arg7 = (void *) NULL ;
   18566               6 :   void *argp1 = 0 ;
   18567               6 :   int res1 = 0 ;
   18568               6 :   void *argp2 = 0 ;
   18569               6 :   int res2 = 0 ;
   18570               6 :   void *argp3 = 0 ;
   18571               6 :   int res3 = 0 ;
   18572                 :   int val4 ;
   18573               6 :   int ecode4 = 0 ;
   18574               6 :   PyObject * obj0 = 0 ;
   18575               6 :   PyObject * obj1 = 0 ;
   18576               6 :   PyObject * obj2 = 0 ;
   18577               6 :   PyObject * obj3 = 0 ;
   18578               6 :   PyObject * obj4 = 0 ;
   18579               6 :   PyObject * obj5 = 0 ;
   18580               6 :   PyObject * obj6 = 0 ;
   18581                 :   char *  kwnames[] = {
   18582                 :     (char *) "srcBand",(char *) "maskBand",(char *) "outLayer",(char *) "iPixValField",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18583               6 :   };
   18584                 :   int result;
   18585                 :   
   18586                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18587                 :   PyProgressData *psProgressInfo;
   18588               6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18589               6 :   psProgressInfo->nLastReported = -1;
   18590               6 :   psProgressInfo->psPyCallback = NULL;
   18591               6 :   psProgressInfo->psPyCallbackData = NULL;
   18592               6 :   arg7 = psProgressInfo;
   18593               6 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:Polygonize",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   18594               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18595               6 :   if (!SWIG_IsOK(res1)) {
   18596               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18597                 :   }
   18598               6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18599               6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18600               6 :   if (!SWIG_IsOK(res2)) {
   18601               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Polygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18602                 :   }
   18603               6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18604               6 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   18605               6 :   if (!SWIG_IsOK(res3)) {
   18606               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Polygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   18607                 :   }
   18608               6 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   18609               6 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18610               6 :   if (!SWIG_IsOK(ecode4)) {
   18611               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Polygonize" "', argument " "4"" of type '" "int""'");
   18612                 :   } 
   18613               6 :   arg4 = static_cast< int >(val4);
   18614               6 :   if (obj4) {
   18615                 :     {
   18616                 :       /* %typemap(in) char **options */
   18617                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   18618               3 :       if ( ! PySequence_Check(obj4) || PyUnicode_Check(obj4)
   18619                 :   #if PY_VERSION_HEX < 0x03000000
   18620                 :         || PyString_Check(obj4)
   18621                 :   #endif
   18622                 :         ) {
   18623               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18624               0 :         SWIG_fail;
   18625                 :       }
   18626                 :       
   18627               3 :       int size = PySequence_Size(obj4);
   18628               4 :       for (int i = 0; i < size; i++) {
   18629               1 :         PyObject* pyObj = PySequence_GetItem(obj4,i);
   18630               1 :         if (PyUnicode_Check(pyObj))
   18631                 :         {
   18632                 :           char *pszStr;
   18633                 :           Py_ssize_t nLen;
   18634               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18635                 : #if PY_VERSION_HEX >= 0x03000000
   18636                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18637                 : #else
   18638               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18639                 : #endif
   18640               0 :           arg5 = CSLAddString( arg5, pszStr );
   18641               0 :           Py_XDECREF(pyUTF8Str);
   18642                 :         }
   18643                 : #if PY_VERSION_HEX >= 0x03000000
   18644                 :         else if (PyBytes_Check(pyObj))
   18645                 :         arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
   18646                 : #else
   18647               1 :         else if (PyString_Check(pyObj))
   18648               1 :         arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
   18649                 : #endif
   18650                 :         else
   18651                 :         {
   18652               0 :           Py_DECREF(pyObj);
   18653               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18654               0 :           SWIG_fail;
   18655                 :         }
   18656               1 :         Py_DECREF(pyObj);
   18657                 :       }
   18658                 :     }
   18659                 :   }
   18660               6 :   if (obj5) {
   18661                 :     {
   18662                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18663                 :       /* callback_func typemap */
   18664               2 :       if (obj5 && obj5 != Py_None ) {
   18665               1 :         void* cbfunction = NULL;
   18666                 :         SWIG_ConvertPtr( obj5, 
   18667                 :           (void**)&cbfunction,
   18668                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18669               1 :           SWIG_POINTER_EXCEPTION | 0 );
   18670                 :         
   18671               1 :         if ( cbfunction == GDALTermProgress ) {
   18672               1 :           arg6 = GDALTermProgress;
   18673                 :         } else {
   18674               0 :           if (!PyCallable_Check(obj5)) {
   18675                 :             PyErr_SetString( PyExc_RuntimeError, 
   18676               0 :               "Object given is not a Python function" );
   18677               0 :             SWIG_fail;
   18678                 :           }
   18679               0 :           psProgressInfo->psPyCallback = obj5;
   18680               0 :           arg6 = PyProgressProxy;
   18681                 :         }
   18682                 :         
   18683                 :       }
   18684                 :       
   18685                 :     }
   18686                 :   }
   18687               6 :   if (obj6) {
   18688                 :     {
   18689                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18690               0 :       psProgressInfo->psPyCallbackData = obj6 ;
   18691                 :     }
   18692                 :   }
   18693                 :   {
   18694               6 :     if (!arg1) {
   18695               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18696                 :     }
   18697                 :   }
   18698                 :   {
   18699               6 :     if (!arg3) {
   18700               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18701                 :     }
   18702                 :   }
   18703                 :   {
   18704               6 :     if ( bUseExceptions ) {
   18705               0 :       CPLErrorReset();
   18706                 :     }
   18707               6 :     result = (int)Polygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   18708               6 :     if ( bUseExceptions ) {
   18709               0 :       CPLErr eclass = CPLGetLastErrorType();
   18710               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18711               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18712                 :       }
   18713                 :     }
   18714                 :   }
   18715               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18716                 :   {
   18717                 :     /* %typemap(freearg) char **options */
   18718               6 :     CSLDestroy( arg5 );
   18719                 :   }
   18720                 :   {
   18721                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18722                 :     
   18723               6 :     CPLFree(psProgressInfo);
   18724                 :     
   18725                 :   }
   18726               6 :   return resultobj;
   18727                 : fail:
   18728                 :   {
   18729                 :     /* %typemap(freearg) char **options */
   18730               0 :     CSLDestroy( arg5 );
   18731                 :   }
   18732                 :   {
   18733                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18734                 :     
   18735               0 :     CPLFree(psProgressInfo);
   18736                 :     
   18737                 :   }
   18738               0 :   return NULL;
   18739                 : }
   18740                 : 
   18741                 : 
   18742               1 : SWIGINTERN PyObject *_wrap_FillNodata(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18743               1 :   PyObject *resultobj = 0;
   18744               1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18745               1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   18746                 :   double arg3 ;
   18747                 :   int arg4 ;
   18748               1 :   char **arg5 = (char **) NULL ;
   18749               1 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   18750               1 :   void *arg7 = (void *) NULL ;
   18751               1 :   void *argp1 = 0 ;
   18752               1 :   int res1 = 0 ;
   18753               1 :   void *argp2 = 0 ;
   18754               1 :   int res2 = 0 ;
   18755                 :   double val3 ;
   18756               1 :   int ecode3 = 0 ;
   18757                 :   int val4 ;
   18758               1 :   int ecode4 = 0 ;
   18759               1 :   PyObject * obj0 = 0 ;
   18760               1 :   PyObject * obj1 = 0 ;
   18761               1 :   PyObject * obj2 = 0 ;
   18762               1 :   PyObject * obj3 = 0 ;
   18763               1 :   PyObject * obj4 = 0 ;
   18764               1 :   PyObject * obj5 = 0 ;
   18765               1 :   PyObject * obj6 = 0 ;
   18766                 :   char *  kwnames[] = {
   18767                 :     (char *) "targetBand",(char *) "maskBand",(char *) "maxSearchDist",(char *) "smoothingIterations",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18768               1 :   };
   18769                 :   int result;
   18770                 :   
   18771                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18772                 :   PyProgressData *psProgressInfo;
   18773               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18774               1 :   psProgressInfo->nLastReported = -1;
   18775               1 :   psProgressInfo->psPyCallback = NULL;
   18776               1 :   psProgressInfo->psPyCallbackData = NULL;
   18777               1 :   arg7 = psProgressInfo;
   18778               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:FillNodata",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   18779               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18780               1 :   if (!SWIG_IsOK(res1)) {
   18781               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FillNodata" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18782                 :   }
   18783               1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18784               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18785               1 :   if (!SWIG_IsOK(res2)) {
   18786               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FillNodata" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18787                 :   }
   18788               1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18789               1 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   18790               1 :   if (!SWIG_IsOK(ecode3)) {
   18791               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FillNodata" "', argument " "3"" of type '" "double""'");
   18792                 :   } 
   18793               1 :   arg3 = static_cast< double >(val3);
   18794               1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18795               1 :   if (!SWIG_IsOK(ecode4)) {
   18796               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FillNodata" "', argument " "4"" of type '" "int""'");
   18797                 :   } 
   18798               1 :   arg4 = static_cast< int >(val4);
   18799               1 :   if (obj4) {
   18800                 :     {
   18801                 :       /* %typemap(in) char **options */
   18802                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   18803               1 :       if ( ! PySequence_Check(obj4) || PyUnicode_Check(obj4)
   18804                 :   #if PY_VERSION_HEX < 0x03000000
   18805                 :         || PyString_Check(obj4)
   18806                 :   #endif
   18807                 :         ) {
   18808               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18809               0 :         SWIG_fail;
   18810                 :       }
   18811                 :       
   18812               1 :       int size = PySequence_Size(obj4);
   18813               1 :       for (int i = 0; i < size; i++) {
   18814               0 :         PyObject* pyObj = PySequence_GetItem(obj4,i);
   18815               0 :         if (PyUnicode_Check(pyObj))
   18816                 :         {
   18817                 :           char *pszStr;
   18818                 :           Py_ssize_t nLen;
   18819               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18820                 : #if PY_VERSION_HEX >= 0x03000000
   18821                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18822                 : #else
   18823               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18824                 : #endif
   18825               0 :           arg5 = CSLAddString( arg5, pszStr );
   18826               0 :           Py_XDECREF(pyUTF8Str);
   18827                 :         }
   18828                 : #if PY_VERSION_HEX >= 0x03000000
   18829                 :         else if (PyBytes_Check(pyObj))
   18830                 :         arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
   18831                 : #else
   18832               0 :         else if (PyString_Check(pyObj))
   18833               0 :         arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
   18834                 : #endif
   18835                 :         else
   18836                 :         {
   18837               0 :           Py_DECREF(pyObj);
   18838               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18839               0 :           SWIG_fail;
   18840                 :         }
   18841               0 :         Py_DECREF(pyObj);
   18842                 :       }
   18843                 :     }
   18844                 :   }
   18845               1 :   if (obj5) {
   18846                 :     {
   18847                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18848                 :       /* callback_func typemap */
   18849               1 :       if (obj5 && obj5 != Py_None ) {
   18850               1 :         void* cbfunction = NULL;
   18851                 :         SWIG_ConvertPtr( obj5, 
   18852                 :           (void**)&cbfunction,
   18853                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18854               1 :           SWIG_POINTER_EXCEPTION | 0 );
   18855                 :         
   18856               1 :         if ( cbfunction == GDALTermProgress ) {
   18857               1 :           arg6 = GDALTermProgress;
   18858                 :         } else {
   18859               0 :           if (!PyCallable_Check(obj5)) {
   18860                 :             PyErr_SetString( PyExc_RuntimeError, 
   18861               0 :               "Object given is not a Python function" );
   18862               0 :             SWIG_fail;
   18863                 :           }
   18864               0 :           psProgressInfo->psPyCallback = obj5;
   18865               0 :           arg6 = PyProgressProxy;
   18866                 :         }
   18867                 :         
   18868                 :       }
   18869                 :       
   18870                 :     }
   18871                 :   }
   18872               1 :   if (obj6) {
   18873                 :     {
   18874                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18875               0 :       psProgressInfo->psPyCallbackData = obj6 ;
   18876                 :     }
   18877                 :   }
   18878                 :   {
   18879               1 :     if (!arg1) {
   18880               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18881                 :     }
   18882                 :   }
   18883                 :   {
   18884               1 :     if ( bUseExceptions ) {
   18885               0 :       CPLErrorReset();
   18886                 :     }
   18887               1 :     result = (int)FillNodata(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   18888               1 :     if ( bUseExceptions ) {
   18889               0 :       CPLErr eclass = CPLGetLastErrorType();
   18890               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18891               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18892                 :       }
   18893                 :     }
   18894                 :   }
   18895               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18896                 :   {
   18897                 :     /* %typemap(freearg) char **options */
   18898               1 :     CSLDestroy( arg5 );
   18899                 :   }
   18900                 :   {
   18901                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18902                 :     
   18903               1 :     CPLFree(psProgressInfo);
   18904                 :     
   18905                 :   }
   18906               1 :   return resultobj;
   18907                 : fail:
   18908                 :   {
   18909                 :     /* %typemap(freearg) char **options */
   18910               0 :     CSLDestroy( arg5 );
   18911                 :   }
   18912                 :   {
   18913                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18914                 :     
   18915               0 :     CPLFree(psProgressInfo);
   18916                 :     
   18917                 :   }
   18918               0 :   return NULL;
   18919                 : }
   18920                 : 
   18921                 : 
   18922               6 : SWIGINTERN PyObject *_wrap_SieveFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18923               6 :   PyObject *resultobj = 0;
   18924               6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18925               6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   18926               6 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   18927                 :   int arg4 ;
   18928               6 :   int arg5 = (int) 4 ;
   18929               6 :   char **arg6 = (char **) NULL ;
   18930               6 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   18931               6 :   void *arg8 = (void *) NULL ;
   18932               6 :   void *argp1 = 0 ;
   18933               6 :   int res1 = 0 ;
   18934               6 :   void *argp2 = 0 ;
   18935               6 :   int res2 = 0 ;
   18936               6 :   void *argp3 = 0 ;
   18937               6 :   int res3 = 0 ;
   18938                 :   int val4 ;
   18939               6 :   int ecode4 = 0 ;
   18940                 :   int val5 ;
   18941               6 :   int ecode5 = 0 ;
   18942               6 :   PyObject * obj0 = 0 ;
   18943               6 :   PyObject * obj1 = 0 ;
   18944               6 :   PyObject * obj2 = 0 ;
   18945               6 :   PyObject * obj3 = 0 ;
   18946               6 :   PyObject * obj4 = 0 ;
   18947               6 :   PyObject * obj5 = 0 ;
   18948               6 :   PyObject * obj6 = 0 ;
   18949               6 :   PyObject * obj7 = 0 ;
   18950                 :   char *  kwnames[] = {
   18951                 :     (char *) "srcBand",(char *) "maskBand",(char *) "dstBand",(char *) "threshold",(char *) "connectedness",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18952               6 :   };
   18953                 :   int result;
   18954                 :   
   18955                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18956                 :   PyProgressData *psProgressInfo;
   18957               6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18958               6 :   psProgressInfo->nLastReported = -1;
   18959               6 :   psProgressInfo->psPyCallback = NULL;
   18960               6 :   psProgressInfo->psPyCallbackData = NULL;
   18961               6 :   arg8 = psProgressInfo;
   18962               6 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:SieveFilter",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   18963               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18964               6 :   if (!SWIG_IsOK(res1)) {
   18965               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SieveFilter" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18966                 :   }
   18967               6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18968               6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18969               6 :   if (!SWIG_IsOK(res2)) {
   18970               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SieveFilter" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18971                 :   }
   18972               6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18973               6 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18974               6 :   if (!SWIG_IsOK(res3)) {
   18975               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SieveFilter" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   18976                 :   }
   18977               6 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   18978               6 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18979               6 :   if (!SWIG_IsOK(ecode4)) {
   18980               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SieveFilter" "', argument " "4"" of type '" "int""'");
   18981                 :   } 
   18982               6 :   arg4 = static_cast< int >(val4);
   18983               6 :   if (obj4) {
   18984               6 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   18985               6 :     if (!SWIG_IsOK(ecode5)) {
   18986               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SieveFilter" "', argument " "5"" of type '" "int""'");
   18987                 :     } 
   18988               6 :     arg5 = static_cast< int >(val5);
   18989                 :   }
   18990               6 :   if (obj5) {
   18991                 :     {
   18992                 :       /* %typemap(in) char **options */
   18993                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   18994               0 :       if ( ! PySequence_Check(obj5) || PyUnicode_Check(obj5)
   18995                 :   #if PY_VERSION_HEX < 0x03000000
   18996                 :         || PyString_Check(obj5)
   18997                 :   #endif
   18998                 :         ) {
   18999               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   19000               0 :         SWIG_fail;
   19001                 :       }
   19002                 :       
   19003               0 :       int size = PySequence_Size(obj5);
   19004               0 :       for (int i = 0; i < size; i++) {
   19005               0 :         PyObject* pyObj = PySequence_GetItem(obj5,i);
   19006               0 :         if (PyUnicode_Check(pyObj))
   19007                 :         {
   19008                 :           char *pszStr;
   19009                 :           Py_ssize_t nLen;
   19010               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   19011                 : #if PY_VERSION_HEX >= 0x03000000
   19012                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   19013                 : #else
   19014               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   19015                 : #endif
   19016               0 :           arg6 = CSLAddString( arg6, pszStr );
   19017               0 :           Py_XDECREF(pyUTF8Str);
   19018                 :         }
   19019                 : #if PY_VERSION_HEX >= 0x03000000
   19020                 :         else if (PyBytes_Check(pyObj))
   19021                 :         arg6 = CSLAddString( arg6, PyBytes_AsString(pyObj) );
   19022                 : #else
   19023               0 :         else if (PyString_Check(pyObj))
   19024               0 :         arg6 = CSLAddString( arg6, PyString_AsString(pyObj) );
   19025                 : #endif
   19026                 :         else
   19027                 :         {
   19028               0 :           Py_DECREF(pyObj);
   19029               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   19030               0 :           SWIG_fail;
   19031                 :         }
   19032               0 :         Py_DECREF(pyObj);
   19033                 :       }
   19034                 :     }
   19035                 :   }
   19036               6 :   if (obj6) {
   19037                 :     {
   19038                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   19039                 :       /* callback_func typemap */
   19040               1 :       if (obj6 && obj6 != Py_None ) {
   19041               1 :         void* cbfunction = NULL;
   19042                 :         SWIG_ConvertPtr( obj6, 
   19043                 :           (void**)&cbfunction,
   19044                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   19045               1 :           SWIG_POINTER_EXCEPTION | 0 );
   19046                 :         
   19047               1 :         if ( cbfunction == GDALTermProgress ) {
   19048               1 :           arg7 = GDALTermProgress;
   19049                 :         } else {
   19050               0 :           if (!PyCallable_Check(obj6)) {
   19051                 :             PyErr_SetString( PyExc_RuntimeError, 
   19052               0 :               "Object given is not a Python function" );
   19053               0 :             SWIG_fail;
   19054                 :           }
   19055               0 :           psProgressInfo->psPyCallback = obj6;
   19056               0 :           arg7 = PyProgressProxy;
   19057                 :         }
   19058                 :         
   19059                 :       }
   19060                 :       
   19061                 :     }
   19062                 :   }
   19063               6 :   if (obj7) {
   19064                 :     {
   19065                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   19066               0 :       psProgressInfo->psPyCallbackData = obj7 ;
   19067                 :     }
   19068                 :   }
   19069                 :   {
   19070               6 :     if (!arg1) {
   19071               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19072                 :     }
   19073                 :   }
   19074                 :   {
   19075               6 :     if (!arg3) {
   19076               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19077                 :     }
   19078                 :   }
   19079                 :   {
   19080               6 :     if ( bUseExceptions ) {
   19081               0 :       CPLErrorReset();
   19082                 :     }
   19083               6 :     result = (int)SieveFilter(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   19084               6 :     if ( bUseExceptions ) {
   19085               0 :       CPLErr eclass = CPLGetLastErrorType();
   19086               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19087               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19088                 :       }
   19089                 :     }
   19090                 :   }
   19091               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19092                 :   {
   19093                 :     /* %typemap(freearg) char **options */
   19094               6 :     CSLDestroy( arg6 );
   19095                 :   }
   19096                 :   {
   19097                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19098                 :     
   19099               6 :     CPLFree(psProgressInfo);
   19100                 :     
   19101                 :   }
   19102               6 :   return resultobj;
   19103                 : fail:
   19104                 :   {
   19105                 :     /* %typemap(freearg) char **options */
   19106               0 :     CSLDestroy( arg6 );
   19107                 :   }
   19108                 :   {
   19109                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19110                 :     
   19111               0 :     CPLFree(psProgressInfo);
   19112                 :     
   19113                 :   }
   19114               0 :   return NULL;
   19115                 : }
   19116                 : 
   19117                 : 
   19118               2 : SWIGINTERN PyObject *_wrap_RegenerateOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   19119               2 :   PyObject *resultobj = 0;
   19120               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   19121                 :   int arg2 ;
   19122               2 :   GDALRasterBandShadow **arg3 = (GDALRasterBandShadow **) 0 ;
   19123               2 :   char *arg4 = (char *) "average" ;
   19124               2 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   19125               2 :   void *arg6 = (void *) NULL ;
   19126               2 :   void *argp1 = 0 ;
   19127               2 :   int res1 = 0 ;
   19128                 :   int res4 ;
   19129               2 :   char *buf4 = 0 ;
   19130               2 :   int alloc4 = 0 ;
   19131               2 :   PyObject * obj0 = 0 ;
   19132               2 :   PyObject * obj1 = 0 ;
   19133               2 :   PyObject * obj2 = 0 ;
   19134               2 :   PyObject * obj3 = 0 ;
   19135               2 :   PyObject * obj4 = 0 ;
   19136                 :   char *  kwnames[] = {
   19137                 :     (char *) "srcBand",(char *) "overviewBandCount",(char *) "resampling",(char *) "callback",(char *) "callback_data", NULL 
   19138               2 :   };
   19139                 :   int result;
   19140                 :   
   19141                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   19142                 :   PyProgressData *psProgressInfo;
   19143               2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   19144               2 :   psProgressInfo->nLastReported = -1;
   19145               2 :   psProgressInfo->psPyCallback = NULL;
   19146               2 :   psProgressInfo->psPyCallbackData = NULL;
   19147               2 :   arg6 = psProgressInfo;
   19148               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:RegenerateOverviews",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   19149               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   19150               2 :   if (!SWIG_IsOK(res1)) {
   19151               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   19152                 :   }
   19153               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   19154                 :   {
   19155                 :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   19156               2 :     if ( !PySequence_Check(obj1) ) {
   19157               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19158               0 :       SWIG_fail;
   19159                 :     }
   19160               2 :     arg2 = PySequence_Size(obj1);
   19161               2 :     arg3 = (GDALRasterBandShadow**) CPLMalloc(arg2*sizeof(GDALRasterBandShadow*));
   19162                 :     
   19163               6 :     for( int i = 0; i<arg2; i++ ) {
   19164               4 :       PyObject *o = PySequence_GetItem(obj1,i);
   19165                 : #if 0x010340 <= 0x010337
   19166                 :       PySwigObject *sobj = SWIG_Python_GetSwigThis(o);
   19167                 : #else
   19168               4 :       SwigPyObject *sobj = SWIG_Python_GetSwigThis(o);
   19169                 : #endif
   19170               4 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   19171               4 :       if (!sobj) {
   19172               0 :         Py_DECREF(o);
   19173                 :         SWIG_fail;
   19174                 :       }
   19175               4 :       rawobjectpointer = (GDALRasterBandShadow*) sobj->ptr;
   19176               4 :       arg3[i] = rawobjectpointer;
   19177               4 :       Py_DECREF(o);
   19178                 :       
   19179                 :     }
   19180                 :   }
   19181               2 :   if (obj2) {
   19182               2 :     res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
   19183               2 :     if (!SWIG_IsOK(res4)) {
   19184               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RegenerateOverviews" "', argument " "4"" of type '" "char const *""'");
   19185                 :     }
   19186               2 :     arg4 = reinterpret_cast< char * >(buf4);
   19187                 :   }
   19188               2 :   if (obj3) {
   19189                 :     {
   19190                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   19191                 :       /* callback_func typemap */
   19192               0 :       if (obj3 && obj3 != Py_None ) {
   19193               0 :         void* cbfunction = NULL;
   19194                 :         SWIG_ConvertPtr( obj3, 
   19195                 :           (void**)&cbfunction,
   19196                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   19197               0 :           SWIG_POINTER_EXCEPTION | 0 );
   19198                 :         
   19199               0 :         if ( cbfunction == GDALTermProgress ) {
   19200               0 :           arg5 = GDALTermProgress;
   19201                 :         } else {
   19202               0 :           if (!PyCallable_Check(obj3)) {
   19203                 :             PyErr_SetString( PyExc_RuntimeError, 
   19204               0 :               "Object given is not a Python function" );
   19205               0 :             SWIG_fail;
   19206                 :           }
   19207               0 :           psProgressInfo->psPyCallback = obj3;
   19208               0 :           arg5 = PyProgressProxy;
   19209                 :         }
   19210                 :         
   19211                 :       }
   19212                 :       
   19213                 :     }
   19214                 :   }
   19215               2 :   if (obj4) {
   19216                 :     {
   19217                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   19218               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   19219                 :     }
   19220                 :   }
   19221                 :   {
   19222               2 :     if (!arg1) {
   19223               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19224                 :     }
   19225                 :   }
   19226                 :   {
   19227               2 :     if ( bUseExceptions ) {
   19228               0 :       CPLErrorReset();
   19229                 :     }
   19230               2 :     result = (int)RegenerateOverviews(arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
   19231               2 :     if ( bUseExceptions ) {
   19232               0 :       CPLErr eclass = CPLGetLastErrorType();
   19233               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19234               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19235                 :       }
   19236                 :     }
   19237                 :   }
   19238               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19239                 :   {
   19240                 :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   19241               2 :     CPLFree( arg3 );
   19242                 :   }
   19243               2 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   19244                 :   {
   19245                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19246                 :     
   19247               2 :     CPLFree(psProgressInfo);
   19248                 :     
   19249                 :   }
   19250               2 :   return resultobj;
   19251                 : fail:
   19252                 :   {
   19253                 :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   19254               0 :     CPLFree( arg3 );
   19255                 :   }
   19256               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   19257                 :   {
   19258                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19259                 :     
   19260               0 :     CPLFree(psProgressInfo);
   19261                 :     
   19262                 :   }
   19263               0 :   return NULL;
   19264                 : }
   19265                 : 
   19266                 : 
   19267               2 : SWIGINTERN PyObject *_wrap_RegenerateOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   19268               2 :   PyObject *resultobj = 0;
   19269               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   19270               2 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   19271               2 :   char *arg3 = (char *) "average" ;
   19272               2 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   19273               2 :   void *arg5 = (void *) NULL ;
   19274               2 :   void *argp1 = 0 ;
   19275               2 :   int res1 = 0 ;
   19276               2 :   void *argp2 = 0 ;
   19277               2 :   int res2 = 0 ;
   19278                 :   int res3 ;
   19279               2 :   char *buf3 = 0 ;
   19280               2 :   int alloc3 = 0 ;
   19281               2 :   PyObject * obj0 = 0 ;
   19282               2 :   PyObject * obj1 = 0 ;
   19283               2 :   PyObject * obj2 = 0 ;
   19284               2 :   PyObject * obj3 = 0 ;
   19285               2 :   PyObject * obj4 = 0 ;
   19286                 :   char *  kwnames[] = {
   19287                 :     (char *) "srcBand",(char *) "overviewBand",(char *) "resampling",(char *) "callback",(char *) "callback_data", NULL 
   19288               2 :   };
   19289                 :   int result;
   19290                 :   
   19291                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   19292                 :   PyProgressData *psProgressInfo;
   19293               2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   19294               2 :   psProgressInfo->nLastReported = -1;
   19295               2 :   psProgressInfo->psPyCallback = NULL;
   19296               2 :   psProgressInfo->psPyCallbackData = NULL;
   19297               2 :   arg5 = psProgressInfo;
   19298               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:RegenerateOverview",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   19299               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   19300               2 :   if (!SWIG_IsOK(res1)) {
   19301               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   19302                 :   }
   19303               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   19304               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   19305               2 :   if (!SWIG_IsOK(res2)) {
   19306               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RegenerateOverview" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   19307                 :   }
   19308               2 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   19309               2 :   if (obj2) {
   19310               2 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   19311               2 :     if (!SWIG_IsOK(res3)) {
   19312               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RegenerateOverview" "', argument " "3"" of type '" "char const *""'");
   19313                 :     }
   19314               2 :     arg3 = reinterpret_cast< char * >(buf3);
   19315                 :   }
   19316               2 :   if (obj3) {
   19317                 :     {
   19318                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   19319                 :       /* callback_func typemap */
   19320               0 :       if (obj3 && obj3 != Py_None ) {
   19321               0 :         void* cbfunction = NULL;
   19322                 :         SWIG_ConvertPtr( obj3, 
   19323                 :           (void**)&cbfunction,
   19324                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   19325               0 :           SWIG_POINTER_EXCEPTION | 0 );
   19326                 :         
   19327               0 :         if ( cbfunction == GDALTermProgress ) {
   19328               0 :           arg4 = GDALTermProgress;
   19329                 :         } else {
   19330               0 :           if (!PyCallable_Check(obj3)) {
   19331                 :             PyErr_SetString( PyExc_RuntimeError, 
   19332               0 :               "Object given is not a Python function" );
   19333               0 :             SWIG_fail;
   19334                 :           }
   19335               0 :           psProgressInfo->psPyCallback = obj3;
   19336               0 :           arg4 = PyProgressProxy;
   19337                 :         }
   19338                 :         
   19339                 :       }
   19340                 :       
   19341                 :     }
   19342                 :   }
   19343               2 :   if (obj4) {
   19344                 :     {
   19345                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   19346               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   19347                 :     }
   19348                 :   }
   19349                 :   {
   19350               2 :     if (!arg1) {
   19351               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19352                 :     }
   19353                 :   }
   19354                 :   {
   19355               2 :     if (!arg2) {
   19356               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19357                 :     }
   19358                 :   }
   19359                 :   {
   19360               2 :     if ( bUseExceptions ) {
   19361               0 :       CPLErrorReset();
   19362                 :     }
   19363               2 :     result = (int)RegenerateOverview(arg1,arg2,(char const *)arg3,arg4,arg5);
   19364               2 :     if ( bUseExceptions ) {
   19365               0 :       CPLErr eclass = CPLGetLastErrorType();
   19366               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19367               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19368                 :       }
   19369                 :     }
   19370                 :   }
   19371               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19372               2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   19373                 :   {
   19374                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19375                 :     
   19376               2 :     CPLFree(psProgressInfo);
   19377                 :     
   19378                 :   }
   19379               2 :   return resultobj;
   19380                 : fail:
   19381               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   19382                 :   {
   19383                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19384                 :     
   19385               0 :     CPLFree(psProgressInfo);
   19386                 :     
   19387                 :   }
   19388               0 :   return NULL;
   19389                 : }
   19390                 : 
   19391                 : 
   19392               2 : SWIGINTERN PyObject *_wrap_ContourGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   19393               2 :   PyObject *resultobj = 0;
   19394               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   19395                 :   double arg2 ;
   19396                 :   double arg3 ;
   19397                 :   int arg4 ;
   19398               2 :   double *arg5 = (double *) 0 ;
   19399                 :   int arg6 ;
   19400                 :   double arg7 ;
   19401               2 :   OGRLayerShadow *arg8 = (OGRLayerShadow *) 0 ;
   19402                 :   int arg9 ;
   19403                 :   int arg10 ;
   19404               2 :   GDALProgressFunc arg11 = (GDALProgressFunc) NULL ;
   19405               2 :   void *arg12 = (void *) NULL ;
   19406               2 :   void *argp1 = 0 ;
   19407               2 :   int res1 = 0 ;
   19408                 :   double val2 ;
   19409               2 :   int ecode2 = 0 ;
   19410                 :   double val3 ;
   19411               2 :   int ecode3 = 0 ;
   19412                 :   int val6 ;
   19413               2 :   int ecode6 = 0 ;
   19414                 :   double val7 ;
   19415               2 :   int ecode7 = 0 ;
   19416               2 :   void *argp8 = 0 ;
   19417               2 :   int res8 = 0 ;
   19418                 :   int val9 ;
   19419               2 :   int ecode9 = 0 ;
   19420                 :   int val10 ;
   19421               2 :   int ecode10 = 0 ;
   19422               2 :   PyObject * obj0 = 0 ;
   19423               2 :   PyObject * obj1 = 0 ;
   19424               2 :   PyObject * obj2 = 0 ;
   19425               2 :   PyObject * obj3 = 0 ;
   19426               2 :   PyObject * obj4 = 0 ;
   19427               2 :   PyObject * obj5 = 0 ;
   19428               2 :   PyObject * obj6 = 0 ;
   19429               2 :   PyObject * obj7 = 0 ;
   19430               2 :   PyObject * obj8 = 0 ;
   19431               2 :   PyObject * obj9 = 0 ;
   19432               2 :   PyObject * obj10 = 0 ;
   19433                 :   char *  kwnames[] = {
   19434                 :     (char *) "srcBand",(char *) "contourInterval",(char *) "contourBase",(char *) "fixedLevelCount",(char *) "useNoData",(char *) "noDataValue",(char *) "dstLayer",(char *) "idField",(char *) "elevField",(char *) "callback",(char *) "callback_data", NULL 
   19435               2 :   };
   19436                 :   int result;
   19437                 :   
   19438                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   19439                 :   PyProgressData *psProgressInfo;
   19440               2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   19441               2 :   psProgressInfo->nLastReported = -1;
   19442               2 :   psProgressInfo->psPyCallback = NULL;
   19443               2 :   psProgressInfo->psPyCallbackData = NULL;
   19444               2 :   arg12 = psProgressInfo;
   19445               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOO|OO:ContourGenerate",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
   19446               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   19447               2 :   if (!SWIG_IsOK(res1)) {
   19448               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   19449                 :   }
   19450               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   19451               2 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   19452               2 :   if (!SWIG_IsOK(ecode2)) {
   19453               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContourGenerate" "', argument " "2"" of type '" "double""'");
   19454                 :   } 
   19455               2 :   arg2 = static_cast< double >(val2);
   19456               2 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   19457               2 :   if (!SWIG_IsOK(ecode3)) {
   19458               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContourGenerate" "', argument " "3"" of type '" "double""'");
   19459                 :   } 
   19460               2 :   arg3 = static_cast< double >(val3);
   19461                 :   {
   19462                 :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   19463                 :     /* check if is List */
   19464               2 :     if ( !PySequence_Check(obj3) ) {
   19465               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19466               0 :       SWIG_fail;
   19467                 :     }
   19468               2 :     arg4 = PySequence_Size(obj3);
   19469               2 :     arg5 = (double*) malloc(arg4*sizeof(double));
   19470               5 :     for( int i = 0; i<arg4; i++ ) {
   19471               3 :       PyObject *o = PySequence_GetItem(obj3,i);
   19472               3 :       if ( !PyArg_Parse(o,"d",&arg5[i]) ) {
   19473               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   19474               0 :         Py_DECREF(o);
   19475                 :         SWIG_fail;
   19476                 :       }
   19477               3 :       Py_DECREF(o);
   19478                 :     }
   19479                 :   }
   19480               2 :   ecode6 = SWIG_AsVal_int(obj4, &val6);
   19481               2 :   if (!SWIG_IsOK(ecode6)) {
   19482               0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ContourGenerate" "', argument " "6"" of type '" "int""'");
   19483                 :   } 
   19484               2 :   arg6 = static_cast< int >(val6);
   19485               2 :   ecode7 = SWIG_AsVal_double(obj5, &val7);
   19486               2 :   if (!SWIG_IsOK(ecode7)) {
   19487               0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ContourGenerate" "', argument " "7"" of type '" "double""'");
   19488                 :   } 
   19489               2 :   arg7 = static_cast< double >(val7);
   19490               2 :   res8 = SWIG_ConvertPtr(obj6, &argp8,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   19491               2 :   if (!SWIG_IsOK(res8)) {
   19492               0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "ContourGenerate" "', argument " "8"" of type '" "OGRLayerShadow *""'"); 
   19493                 :   }
   19494               2 :   arg8 = reinterpret_cast< OGRLayerShadow * >(argp8);
   19495               2 :   ecode9 = SWIG_AsVal_int(obj7, &val9);
   19496               2 :   if (!SWIG_IsOK(ecode9)) {
   19497               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ContourGenerate" "', argument " "9"" of type '" "int""'");
   19498                 :   } 
   19499               2 :   arg9 = static_cast< int >(val9);
   19500               2 :   ecode10 = SWIG_AsVal_int(obj8, &val10);
   19501               2 :   if (!SWIG_IsOK(ecode10)) {
   19502               0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ContourGenerate" "', argument " "10"" of type '" "int""'");
   19503                 :   } 
   19504               2 :   arg10 = static_cast< int >(val10);
   19505               2 :   if (obj9) {
   19506                 :     {
   19507                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   19508                 :       /* callback_func typemap */
   19509               0 :       if (obj9 && obj9 != Py_None ) {
   19510               0 :         void* cbfunction = NULL;
   19511                 :         SWIG_ConvertPtr( obj9, 
   19512                 :           (void**)&cbfunction,
   19513                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   19514               0 :           SWIG_POINTER_EXCEPTION | 0 );
   19515                 :         
   19516               0 :         if ( cbfunction == GDALTermProgress ) {
   19517               0 :           arg11 = GDALTermProgress;
   19518                 :         } else {
   19519               0 :           if (!PyCallable_Check(obj9)) {
   19520                 :             PyErr_SetString( PyExc_RuntimeError, 
   19521               0 :               "Object given is not a Python function" );
   19522               0 :             SWIG_fail;
   19523                 :           }
   19524               0 :           psProgressInfo->psPyCallback = obj9;
   19525               0 :           arg11 = PyProgressProxy;
   19526                 :         }
   19527                 :         
   19528                 :       }
   19529                 :       
   19530                 :     }
   19531                 :   }
   19532               2 :   if (obj10) {
   19533                 :     {
   19534                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   19535               0 :       psProgressInfo->psPyCallbackData = obj10 ;
   19536                 :     }
   19537                 :   }
   19538                 :   {
   19539               2 :     if (!arg1) {
   19540               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19541                 :     }
   19542                 :   }
   19543                 :   {
   19544               2 :     if (!arg8) {
   19545               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19546                 :     }
   19547                 :   }
   19548                 :   {
   19549               2 :     if ( bUseExceptions ) {
   19550               0 :       CPLErrorReset();
   19551                 :     }
   19552               2 :     result = (int)ContourGenerate(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   19553               2 :     if ( bUseExceptions ) {
   19554               0 :       CPLErr eclass = CPLGetLastErrorType();
   19555               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19556               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19557                 :       }
   19558                 :     }
   19559                 :   }
   19560               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19561                 :   {
   19562                 :     /* %typemap(freearg) (int nList, double* pList) */
   19563               2 :     if (arg5) {
   19564               2 :       free((void*) arg5);
   19565                 :     }
   19566                 :   }
   19567                 :   {
   19568                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19569                 :     
   19570               2 :     CPLFree(psProgressInfo);
   19571                 :     
   19572                 :   }
   19573               2 :   return resultobj;
   19574                 : fail:
   19575                 :   {
   19576                 :     /* %typemap(freearg) (int nList, double* pList) */
   19577               0 :     if (arg5) {
   19578               0 :       free((void*) arg5);
   19579                 :     }
   19580                 :   }
   19581                 :   {
   19582                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19583                 :     
   19584               0 :     CPLFree(psProgressInfo);
   19585                 :     
   19586                 :   }
   19587               0 :   return NULL;
   19588                 : }
   19589                 : 
   19590                 : 
   19591              14 : SWIGINTERN PyObject *_wrap_AutoCreateWarpedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19592              14 :   PyObject *resultobj = 0;
   19593              14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   19594              14 :   char *arg2 = (char *) 0 ;
   19595              14 :   char *arg3 = (char *) 0 ;
   19596              14 :   GDALResampleAlg arg4 = (GDALResampleAlg) GRA_NearestNeighbour ;
   19597              14 :   double arg5 = (double) 0.0 ;
   19598              14 :   void *argp1 = 0 ;
   19599              14 :   int res1 = 0 ;
   19600                 :   int res2 ;
   19601              14 :   char *buf2 = 0 ;
   19602              14 :   int alloc2 = 0 ;
   19603                 :   int res3 ;
   19604              14 :   char *buf3 = 0 ;
   19605              14 :   int alloc3 = 0 ;
   19606                 :   int val4 ;
   19607              14 :   int ecode4 = 0 ;
   19608                 :   double val5 ;
   19609              14 :   int ecode5 = 0 ;
   19610              14 :   PyObject * obj0 = 0 ;
   19611              14 :   PyObject * obj1 = 0 ;
   19612              14 :   PyObject * obj2 = 0 ;
   19613              14 :   PyObject * obj3 = 0 ;
   19614              14 :   PyObject * obj4 = 0 ;
   19615              14 :   GDALDatasetShadow *result = 0 ;
   19616                 :   
   19617              14 :   if (!PyArg_ParseTuple(args,(char *)"O|OOOO:AutoCreateWarpedVRT",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   19618              14 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19619              14 :   if (!SWIG_IsOK(res1)) {
   19620               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoCreateWarpedVRT" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   19621                 :   }
   19622              14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   19623              14 :   if (obj1) {
   19624              13 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   19625              13 :     if (!SWIG_IsOK(res2)) {
   19626               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoCreateWarpedVRT" "', argument " "2"" of type '" "char const *""'");
   19627                 :     }
   19628              13 :     arg2 = reinterpret_cast< char * >(buf2);
   19629                 :   }
   19630              14 :   if (obj2) {
   19631              13 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   19632              13 :     if (!SWIG_IsOK(res3)) {
   19633               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoCreateWarpedVRT" "', argument " "3"" of type '" "char const *""'");
   19634                 :     }
   19635              13 :     arg3 = reinterpret_cast< char * >(buf3);
   19636                 :   }
   19637              14 :   if (obj3) {
   19638              13 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   19639              13 :     if (!SWIG_IsOK(ecode4)) {
   19640               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AutoCreateWarpedVRT" "', argument " "4"" of type '" "GDALResampleAlg""'");
   19641                 :     } 
   19642              13 :     arg4 = static_cast< GDALResampleAlg >(val4);
   19643                 :   }
   19644              14 :   if (obj4) {
   19645              13 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
   19646              13 :     if (!SWIG_IsOK(ecode5)) {
   19647               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AutoCreateWarpedVRT" "', argument " "5"" of type '" "double""'");
   19648                 :     } 
   19649              13 :     arg5 = static_cast< double >(val5);
   19650                 :   }
   19651                 :   {
   19652              14 :     if (!arg1) {
   19653               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19654                 :     }
   19655                 :   }
   19656                 :   {
   19657              14 :     if ( bUseExceptions ) {
   19658               0 :       CPLErrorReset();
   19659                 :     }
   19660              14 :     result = (GDALDatasetShadow *)AutoCreateWarpedVRT(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
   19661              14 :     if ( bUseExceptions ) {
   19662               0 :       CPLErr eclass = CPLGetLastErrorType();
   19663               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19664               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19665                 :       }
   19666                 :     }
   19667                 :   }
   19668              14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   19669              14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19670              14 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   19671              14 :   return resultobj;
   19672                 : fail:
   19673               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19674               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   19675               0 :   return NULL;
   19676                 : }
   19677                 : 
   19678                 : 
   19679               9 : SWIGINTERN PyObject *_wrap_new_Transformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19680               9 :   PyObject *resultobj = 0;
   19681               9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   19682               9 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   19683               9 :   char **arg3 = (char **) 0 ;
   19684               9 :   void *argp1 = 0 ;
   19685               9 :   int res1 = 0 ;
   19686               9 :   void *argp2 = 0 ;
   19687               9 :   int res2 = 0 ;
   19688               9 :   PyObject * obj0 = 0 ;
   19689               9 :   PyObject * obj1 = 0 ;
   19690               9 :   PyObject * obj2 = 0 ;
   19691               9 :   GDALTransformerInfoShadow *result = 0 ;
   19692                 :   
   19693               9 :   if (!PyArg_ParseTuple(args,(char *)"OOO:new_Transformer",&obj0,&obj1,&obj2)) SWIG_fail;
   19694               9 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19695               9 :   if (!SWIG_IsOK(res1)) {
   19696               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Transformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   19697                 :   }
   19698               9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   19699               9 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19700               9 :   if (!SWIG_IsOK(res2)) {
   19701               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Transformer" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   19702                 :   }
   19703               9 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   19704                 :   {
   19705                 :     /* %typemap(in) char **options */
   19706                 :     /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   19707               9 :     if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
   19708                 :   #if PY_VERSION_HEX < 0x03000000
   19709                 :       || PyString_Check(obj2)
   19710                 :   #endif
   19711                 :       ) {
   19712               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   19713               0 :       SWIG_fail;
   19714                 :     }
   19715                 :     
   19716               9 :     int size = PySequence_Size(obj2);
   19717              20 :     for (int i = 0; i < size; i++) {
   19718              11 :       PyObject* pyObj = PySequence_GetItem(obj2,i);
   19719              11 :       if (PyUnicode_Check(pyObj))
   19720                 :       {
   19721                 :         char *pszStr;
   19722                 :         Py_ssize_t nLen;
   19723               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   19724                 : #if PY_VERSION_HEX >= 0x03000000
   19725                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   19726                 : #else
   19727               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   19728                 : #endif
   19729               0 :         arg3 = CSLAddString( arg3, pszStr );
   19730               0 :         Py_XDECREF(pyUTF8Str);
   19731                 :       }
   19732                 : #if PY_VERSION_HEX >= 0x03000000
   19733                 :       else if (PyBytes_Check(pyObj))
   19734                 :       arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
   19735                 : #else
   19736              11 :       else if (PyString_Check(pyObj))
   19737              11 :       arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
   19738                 : #endif
   19739                 :       else
   19740                 :       {
   19741               0 :         Py_DECREF(pyObj);
   19742               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   19743               0 :         SWIG_fail;
   19744                 :       }
   19745              11 :       Py_DECREF(pyObj);
   19746                 :     }
   19747                 :   }
   19748                 :   {
   19749               9 :     if ( bUseExceptions ) {
   19750               0 :       CPLErrorReset();
   19751                 :     }
   19752               9 :     result = (GDALTransformerInfoShadow *)new_GDALTransformerInfoShadow(arg1,arg2,arg3);
   19753               9 :     if ( bUseExceptions ) {
   19754               0 :       CPLErr eclass = CPLGetLastErrorType();
   19755               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19756               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19757                 :       }
   19758                 :     }
   19759                 :   }
   19760               9 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_NEW |  0 );
   19761                 :   {
   19762                 :     /* %typemap(freearg) char **options */
   19763               9 :     CSLDestroy( arg3 );
   19764                 :   }
   19765               9 :   return resultobj;
   19766                 : fail:
   19767                 :   {
   19768                 :     /* %typemap(freearg) char **options */
   19769               0 :     CSLDestroy( arg3 );
   19770                 :   }
   19771               0 :   return NULL;
   19772                 : }
   19773                 : 
   19774                 : 
   19775               9 : SWIGINTERN PyObject *_wrap_delete_Transformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19776               9 :   PyObject *resultobj = 0;
   19777               9 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19778               9 :   void *argp1 = 0 ;
   19779               9 :   int res1 = 0 ;
   19780               9 :   PyObject * obj0 = 0 ;
   19781                 :   
   19782               9 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_Transformer",&obj0)) SWIG_fail;
   19783               9 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_DISOWN |  0 );
   19784               9 :   if (!SWIG_IsOK(res1)) {
   19785               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Transformer" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   19786                 :   }
   19787               9 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   19788                 :   {
   19789               9 :     if ( bUseExceptions ) {
   19790               0 :       CPLErrorReset();
   19791                 :     }
   19792                 :     delete_GDALTransformerInfoShadow(arg1);
   19793               9 :     if ( bUseExceptions ) {
   19794               0 :       CPLErr eclass = CPLGetLastErrorType();
   19795               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19796               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19797                 :       }
   19798                 :     }
   19799                 :   }
   19800               9 :   resultobj = SWIG_Py_Void();
   19801               9 :   return resultobj;
   19802                 : fail:
   19803               0 :   return NULL;
   19804                 : }
   19805                 : 
   19806                 : 
   19807               0 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19808               0 :   PyObject *resultobj = 0;
   19809               0 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19810                 :   int arg2 ;
   19811                 :   double *arg3 ;
   19812               0 :   void *argp1 = 0 ;
   19813               0 :   int res1 = 0 ;
   19814                 :   int val2 ;
   19815               0 :   int ecode2 = 0 ;
   19816                 :   double argin3[3] ;
   19817               0 :   PyObject * obj0 = 0 ;
   19818               0 :   PyObject * obj1 = 0 ;
   19819               0 :   PyObject * obj2 = 0 ;
   19820                 :   int result;
   19821                 :   
   19822               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Transformer_TransformPoint",&obj0,&obj1,&obj2)) SWIG_fail;
   19823               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   19824               0 :   if (!SWIG_IsOK(res1)) {
   19825               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   19826                 :   }
   19827               0 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   19828               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   19829               0 :   if (!SWIG_IsOK(ecode2)) {
   19830               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Transformer_TransformPoint" "', argument " "2"" of type '" "int""'");
   19831                 :   } 
   19832               0 :   arg2 = static_cast< int >(val2);
   19833                 :   {
   19834                 :     /* %typemap(in) (double argin3[ANY]) */
   19835               0 :     arg3 = argin3;
   19836               0 :     if (! PySequence_Check(obj2) ) {
   19837               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19838               0 :       SWIG_fail;
   19839                 :     }
   19840               0 :     int seq_size = PySequence_Size(obj2);
   19841               0 :     if ( seq_size != 3 ) {
   19842               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   19843               0 :       SWIG_fail;
   19844                 :     }
   19845               0 :     for (unsigned int i=0; i<3; i++) {
   19846               0 :       PyObject *o = PySequence_GetItem(obj2,i);
   19847                 :       double val;
   19848               0 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   19849               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   19850               0 :         Py_DECREF(o);
   19851                 :         SWIG_fail;
   19852                 :       }
   19853               0 :       arg3[i] =  val;
   19854               0 :       Py_DECREF(o);
   19855                 :     }
   19856                 :   }
   19857                 :   {
   19858               0 :     if ( bUseExceptions ) {
   19859               0 :       CPLErrorReset();
   19860                 :     }
   19861               0 :     result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_0(arg1,arg2,arg3);
   19862               0 :     if ( bUseExceptions ) {
   19863               0 :       CPLErr eclass = CPLGetLastErrorType();
   19864               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19865               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19866                 :       }
   19867                 :     }
   19868                 :   }
   19869               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19870                 :   {
   19871                 :     /* %typemap(argout) (double argout[ANY]) */
   19872               0 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
   19873               0 :     resultobj = t_output_helper(resultobj,out);
   19874                 :   }
   19875               0 :   return resultobj;
   19876                 : fail:
   19877               0 :   return NULL;
   19878                 : }
   19879                 : 
   19880                 : 
   19881              16 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19882              16 :   PyObject *resultobj = 0;
   19883              16 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19884                 :   double *arg2 ;
   19885                 :   int arg3 ;
   19886                 :   double arg4 ;
   19887                 :   double arg5 ;
   19888              16 :   double arg6 = (double) 0.0 ;
   19889              16 :   void *argp1 = 0 ;
   19890              16 :   int res1 = 0 ;
   19891                 :   double argout2[3] ;
   19892                 :   int val3 ;
   19893              16 :   int ecode3 = 0 ;
   19894                 :   double val4 ;
   19895              16 :   int ecode4 = 0 ;
   19896                 :   double val5 ;
   19897              16 :   int ecode5 = 0 ;
   19898                 :   double val6 ;
   19899              16 :   int ecode6 = 0 ;
   19900              16 :   PyObject * obj0 = 0 ;
   19901              16 :   PyObject * obj1 = 0 ;
   19902              16 :   PyObject * obj2 = 0 ;
   19903              16 :   PyObject * obj3 = 0 ;
   19904              16 :   PyObject * obj4 = 0 ;
   19905                 :   int result;
   19906                 :   
   19907                 :   {
   19908                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   19909              16 :     arg2 = argout2;
   19910                 :   }
   19911              16 :   if (!PyArg_ParseTuple(args,(char *)"OOOO|O:Transformer_TransformPoint",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   19912              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   19913              16 :   if (!SWIG_IsOK(res1)) {
   19914               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   19915                 :   }
   19916              16 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   19917              16 :   ecode3 = SWIG_AsVal_int(obj1, &val3);
   19918              16 :   if (!SWIG_IsOK(ecode3)) {
   19919               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Transformer_TransformPoint" "', argument " "3"" of type '" "int""'");
   19920                 :   } 
   19921              16 :   arg3 = static_cast< int >(val3);
   19922              16 :   ecode4 = SWIG_AsVal_double(obj2, &val4);
   19923              16 :   if (!SWIG_IsOK(ecode4)) {
   19924               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Transformer_TransformPoint" "', argument " "4"" of type '" "double""'");
   19925                 :   } 
   19926              16 :   arg4 = static_cast< double >(val4);
   19927              16 :   ecode5 = SWIG_AsVal_double(obj3, &val5);
   19928              16 :   if (!SWIG_IsOK(ecode5)) {
   19929               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Transformer_TransformPoint" "', argument " "5"" of type '" "double""'");
   19930                 :   } 
   19931              16 :   arg5 = static_cast< double >(val5);
   19932              16 :   if (obj4) {
   19933              10 :     ecode6 = SWIG_AsVal_double(obj4, &val6);
   19934              10 :     if (!SWIG_IsOK(ecode6)) {
   19935               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Transformer_TransformPoint" "', argument " "6"" of type '" "double""'");
   19936                 :     } 
   19937              10 :     arg6 = static_cast< double >(val6);
   19938                 :   }
   19939                 :   {
   19940              16 :     if ( bUseExceptions ) {
   19941               0 :       CPLErrorReset();
   19942                 :     }
   19943              16 :     result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
   19944              16 :     if ( bUseExceptions ) {
   19945               0 :       CPLErr eclass = CPLGetLastErrorType();
   19946               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19947               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19948                 :       }
   19949                 :     }
   19950                 :   }
   19951              16 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19952                 :   {
   19953                 :     /* %typemap(argout) (double argout[ANY]) */
   19954              16 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
   19955              16 :     resultobj = t_output_helper(resultobj,out);
   19956                 :   }
   19957              16 :   return resultobj;
   19958                 : fail:
   19959               0 :   return NULL;
   19960                 : }
   19961                 : 
   19962                 : 
   19963              16 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoint(PyObject *self, PyObject *args) {
   19964                 :   int argc;
   19965                 :   PyObject *argv[6];
   19966                 :   int ii;
   19967                 :   
   19968              16 :   if (!PyTuple_Check(args)) SWIG_fail;
   19969              16 :   argc = (int)PyObject_Length(args);
   19970              90 :   for (ii = 0; (ii < argc) && (ii < 5); ii++) {
   19971              74 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
   19972                 :   }
   19973              16 :   if (argc == 3) {
   19974                 :     int _v;
   19975               0 :     void *vptr = 0;
   19976               0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   19977               0 :     _v = SWIG_CheckState(res);
   19978               0 :     if (_v) {
   19979                 :       {
   19980               0 :         int res = SWIG_AsVal_int(argv[1], NULL);
   19981               0 :         _v = SWIG_CheckState(res);
   19982                 :       }
   19983               0 :       if (_v) {
   19984               0 :         void *vptr = 0;
   19985               0 :         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
   19986               0 :         _v = SWIG_CheckState(res);
   19987               0 :         if (_v) {
   19988               0 :           return _wrap_Transformer_TransformPoint__SWIG_0(self, args);
   19989                 :         }
   19990                 :       }
   19991                 :     }
   19992                 :   }
   19993              16 :   if ((argc >= 4) && (argc <= 5)) {
   19994                 :     int _v;
   19995              16 :     void *vptr = 0;
   19996              16 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   19997              16 :     _v = SWIG_CheckState(res);
   19998              16 :     if (_v) {
   19999                 :       {
   20000              16 :         int res = SWIG_AsVal_int(argv[1], NULL);
   20001              16 :         _v = SWIG_CheckState(res);
   20002                 :       }
   20003              16 :       if (_v) {
   20004                 :         {
   20005              16 :           int res = SWIG_AsVal_double(argv[2], NULL);
   20006              16 :           _v = SWIG_CheckState(res);
   20007                 :         }
   20008              16 :         if (_v) {
   20009                 :           {
   20010              16 :             int res = SWIG_AsVal_double(argv[3], NULL);
   20011              16 :             _v = SWIG_CheckState(res);
   20012                 :           }
   20013              16 :           if (_v) {
   20014              16 :             if (argc <= 4) {
   20015               6 :               return _wrap_Transformer_TransformPoint__SWIG_1(self, args);
   20016                 :             }
   20017                 :             {
   20018              10 :               int res = SWIG_AsVal_double(argv[4], NULL);
   20019              10 :               _v = SWIG_CheckState(res);
   20020                 :             }
   20021              10 :             if (_v) {
   20022              10 :               return _wrap_Transformer_TransformPoint__SWIG_1(self, args);
   20023                 :             }
   20024                 :           }
   20025                 :         }
   20026                 :       }
   20027                 :     }
   20028                 :   }
   20029                 :   
   20030                 : fail:
   20031                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Transformer_TransformPoint'.\n"
   20032                 :     "  Possible C/C++ prototypes are:\n"
   20033                 :     "    TransformPoint(GDALTransformerInfoShadow *,int,double [3])\n"
   20034               0 :     "    TransformPoint(GDALTransformerInfoShadow *,double [3],int,double,double,double)\n");
   20035               0 :   return NULL;
   20036                 : }
   20037                 : 
   20038                 : 
   20039               1 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20040               1 :   PyObject *resultobj = 0;
   20041               1 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   20042                 :   int arg2 ;
   20043                 :   int arg3 ;
   20044               1 :   double *arg4 = (double *) 0 ;
   20045               1 :   double *arg5 = (double *) 0 ;
   20046               1 :   double *arg6 = (double *) 0 ;
   20047               1 :   int *arg7 = (int *) 0 ;
   20048               1 :   void *argp1 = 0 ;
   20049               1 :   int res1 = 0 ;
   20050                 :   int val2 ;
   20051               1 :   int ecode2 = 0 ;
   20052               1 :   PyObject * obj0 = 0 ;
   20053               1 :   PyObject * obj1 = 0 ;
   20054               1 :   PyObject * obj2 = 0 ;
   20055                 :   int result;
   20056                 :   
   20057               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Transformer_TransformPoints",&obj0,&obj1,&obj2)) SWIG_fail;
   20058               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   20059               1 :   if (!SWIG_IsOK(res1)) {
   20060               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer_TransformPoints" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   20061                 :   }
   20062               1 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   20063               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   20064               1 :   if (!SWIG_IsOK(ecode2)) {
   20065               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Transformer_TransformPoints" "', argument " "2"" of type '" "int""'");
   20066                 :   } 
   20067               1 :   arg2 = static_cast< int >(val2);
   20068                 :   {
   20069                 :     /*  typemap(in,numinputs=1) (int nCount, double *x, double *y, double *z, int* panSuccess) */
   20070               1 :     if ( !PySequence_Check(obj2) ) {
   20071               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   20072               0 :       SWIG_fail;
   20073                 :     }
   20074                 :     
   20075               1 :     arg3 = PySequence_Size(obj2);
   20076               1 :     arg4 = (double*) VSIMalloc(arg3*sizeof(double));
   20077               1 :     arg5 = (double*) VSIMalloc(arg3*sizeof(double));
   20078               1 :     arg6 = (double*) VSIMalloc(arg3*sizeof(double));
   20079               1 :     arg7 = (int*) VSIMalloc(arg3*sizeof(int));
   20080                 :     
   20081               1 :     if (arg4 == NULL || arg5 == NULL || arg6 == NULL || arg7 == NULL)
   20082                 :     {
   20083               0 :       PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
   20084               0 :       SWIG_fail;
   20085                 :     }
   20086                 :     
   20087               1 :     if (!DecomposeSequenceOfCoordinates(obj2,arg3,arg4,arg5,arg6)) {
   20088                 :       SWIG_fail;
   20089                 :     }
   20090                 :   }
   20091                 :   {
   20092               1 :     if ( bUseExceptions ) {
   20093               0 :       CPLErrorReset();
   20094                 :     }
   20095               1 :     result = (int)GDALTransformerInfoShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   20096               1 :     if ( bUseExceptions ) {
   20097               0 :       CPLErr eclass = CPLGetLastErrorType();
   20098               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20099               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20100                 :       }
   20101                 :     }
   20102                 :   }
   20103               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20104                 :   {
   20105                 :     /* %typemap(argout)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   20106               1 :     Py_DECREF(resultobj);
   20107               1 :     PyObject *xyz = PyList_New( arg3 );
   20108               1 :     PyObject *success = PyList_New( arg3 );
   20109               2 :     for( int i=0; i< arg3; i++ ) {
   20110               1 :       PyObject *tuple = PyTuple_New( 3 );
   20111               1 :       PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg4)[i] ) );
   20112               1 :       PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg5)[i] ) );
   20113               1 :       PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg6)[i] ) );
   20114               1 :       PyList_SetItem( xyz, i, tuple );
   20115               1 :       PyList_SetItem( success, i, Py_BuildValue( "i",  (arg7)[i]) );
   20116                 :     }
   20117               1 :     resultobj = PyTuple_New( 2 );
   20118               1 :     PyTuple_SetItem( resultobj, 0, xyz );
   20119               1 :     PyTuple_SetItem( resultobj, 1, success );
   20120                 :   }
   20121                 :   {
   20122                 :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   20123               1 :     VSIFree(arg4);
   20124               1 :     VSIFree(arg5);
   20125               1 :     VSIFree(arg6);
   20126               1 :     VSIFree(arg7);
   20127                 :   }
   20128               1 :   return resultobj;
   20129                 : fail:
   20130                 :   {
   20131                 :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   20132               0 :     VSIFree(arg4);
   20133               0 :     VSIFree(arg5);
   20134               0 :     VSIFree(arg6);
   20135               0 :     VSIFree(arg7);
   20136                 :   }
   20137               0 :   return NULL;
   20138                 : }
   20139                 : 
   20140                 : 
   20141               1 : SWIGINTERN PyObject *_wrap_Transformer_TransformGeolocations(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   20142               1 :   PyObject *resultobj = 0;
   20143               1 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   20144               1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   20145               1 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   20146               1 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   20147               1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   20148               1 :   void *arg6 = (void *) NULL ;
   20149               1 :   char **arg7 = (char **) NULL ;
   20150               1 :   void *argp1 = 0 ;
   20151               1 :   int res1 = 0 ;
   20152               1 :   void *argp2 = 0 ;
   20153               1 :   int res2 = 0 ;
   20154               1 :   void *argp3 = 0 ;
   20155               1 :   int res3 = 0 ;
   20156               1 :   void *argp4 = 0 ;
   20157               1 :   int res4 = 0 ;
   20158               1 :   PyObject * obj0 = 0 ;
   20159               1 :   PyObject * obj1 = 0 ;
   20160               1 :   PyObject * obj2 = 0 ;
   20161               1 :   PyObject * obj3 = 0 ;
   20162               1 :   PyObject * obj4 = 0 ;
   20163               1 :   PyObject * obj5 = 0 ;
   20164               1 :   PyObject * obj6 = 0 ;
   20165                 :   char *  kwnames[] = {
   20166                 :     (char *) "self",(char *) "xBand",(char *) "yBand",(char *) "zBand",(char *) "callback",(char *) "callback_data",(char *) "options", NULL 
   20167               1 :   };
   20168                 :   int result;
   20169                 :   
   20170                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   20171                 :   PyProgressData *psProgressInfo;
   20172               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   20173               1 :   psProgressInfo->nLastReported = -1;
   20174               1 :   psProgressInfo->psPyCallback = NULL;
   20175               1 :   psProgressInfo->psPyCallbackData = NULL;
   20176               1 :   arg6 = psProgressInfo;
   20177               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:Transformer_TransformGeolocations",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   20178               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   20179               1 :   if (!SWIG_IsOK(res1)) {
   20180               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer_TransformGeolocations" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   20181                 :   }
   20182               1 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   20183               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   20184               1 :   if (!SWIG_IsOK(res2)) {
   20185               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Transformer_TransformGeolocations" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   20186                 :   }
   20187               1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   20188               1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   20189               1 :   if (!SWIG_IsOK(res3)) {
   20190               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Transformer_TransformGeolocations" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   20191                 :   }
   20192               1 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   20193               1 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   20194               1 :   if (!SWIG_IsOK(res4)) {
   20195               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Transformer_TransformGeolocations" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   20196                 :   }
   20197               1 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   20198               1 :   if (obj4) {
   20199                 :     {
   20200                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   20201                 :       /* callback_func typemap */
   20202               0 :       if (obj4 && obj4 != Py_None ) {
   20203               0 :         void* cbfunction = NULL;
   20204                 :         SWIG_ConvertPtr( obj4, 
   20205                 :           (void**)&cbfunction,
   20206                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   20207               0 :           SWIG_POINTER_EXCEPTION | 0 );
   20208                 :         
   20209               0 :         if ( cbfunction == GDALTermProgress ) {
   20210               0 :           arg5 = GDALTermProgress;
   20211                 :         } else {
   20212               0 :           if (!PyCallable_Check(obj4)) {
   20213                 :             PyErr_SetString( PyExc_RuntimeError, 
   20214               0 :               "Object given is not a Python function" );
   20215               0 :             SWIG_fail;
   20216                 :           }
   20217               0 :           psProgressInfo->psPyCallback = obj4;
   20218               0 :           arg5 = PyProgressProxy;
   20219                 :         }
   20220                 :         
   20221                 :       }
   20222                 :       
   20223                 :     }
   20224                 :   }
   20225               1 :   if (obj5) {
   20226                 :     {
   20227                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   20228               0 :       psProgressInfo->psPyCallbackData = obj5 ;
   20229                 :     }
   20230                 :   }
   20231               1 :   if (obj6) {
   20232                 :     {
   20233                 :       /* %typemap(in) char **options */
   20234                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   20235               0 :       if ( ! PySequence_Check(obj6) || PyUnicode_Check(obj6)
   20236                 :   #if PY_VERSION_HEX < 0x03000000
   20237                 :         || PyString_Check(obj6)
   20238                 :   #endif
   20239                 :         ) {
   20240               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   20241               0 :         SWIG_fail;
   20242                 :       }
   20243                 :       
   20244               0 :       int size = PySequence_Size(obj6);
   20245               0 :       for (int i = 0; i < size; i++) {
   20246               0 :         PyObject* pyObj = PySequence_GetItem(obj6,i);
   20247               0 :         if (PyUnicode_Check(pyObj))
   20248                 :         {
   20249                 :           char *pszStr;
   20250                 :           Py_ssize_t nLen;
   20251               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   20252                 : #if PY_VERSION_HEX >= 0x03000000
   20253                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   20254                 : #else
   20255               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   20256                 : #endif
   20257               0 :           arg7 = CSLAddString( arg7, pszStr );
   20258               0 :           Py_XDECREF(pyUTF8Str);
   20259                 :         }
   20260                 : #if PY_VERSION_HEX >= 0x03000000
   20261                 :         else if (PyBytes_Check(pyObj))
   20262                 :         arg7 = CSLAddString( arg7, PyBytes_AsString(pyObj) );
   20263                 : #else
   20264               0 :         else if (PyString_Check(pyObj))
   20265               0 :         arg7 = CSLAddString( arg7, PyString_AsString(pyObj) );
   20266                 : #endif
   20267                 :         else
   20268                 :         {
   20269               0 :           Py_DECREF(pyObj);
   20270               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   20271               0 :           SWIG_fail;
   20272                 :         }
   20273               0 :         Py_DECREF(pyObj);
   20274                 :       }
   20275                 :     }
   20276                 :   }
   20277                 :   {
   20278               1 :     if (!arg2) {
   20279               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20280                 :     }
   20281                 :   }
   20282                 :   {
   20283               1 :     if (!arg3) {
   20284               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20285                 :     }
   20286                 :   }
   20287                 :   {
   20288               1 :     if (!arg4) {
   20289               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20290                 :     }
   20291                 :   }
   20292                 :   {
   20293               1 :     if ( bUseExceptions ) {
   20294               0 :       CPLErrorReset();
   20295                 :     }
   20296               1 :     result = (int)GDALTransformerInfoShadow_TransformGeolocations(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   20297               1 :     if ( bUseExceptions ) {
   20298               0 :       CPLErr eclass = CPLGetLastErrorType();
   20299               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20300               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20301                 :       }
   20302                 :     }
   20303                 :   }
   20304               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20305                 :   {
   20306                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   20307                 :     
   20308               1 :     CPLFree(psProgressInfo);
   20309                 :     
   20310                 :   }
   20311                 :   {
   20312                 :     /* %typemap(freearg) char **options */
   20313               1 :     CSLDestroy( arg7 );
   20314                 :   }
   20315               1 :   return resultobj;
   20316                 : fail:
   20317                 :   {
   20318                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   20319                 :     
   20320               0 :     CPLFree(psProgressInfo);
   20321                 :     
   20322                 :   }
   20323                 :   {
   20324                 :     /* %typemap(freearg) char **options */
   20325               0 :     CSLDestroy( arg7 );
   20326                 :   }
   20327               0 :   return NULL;
   20328                 : }
   20329                 : 
   20330                 : 
   20331              12 : SWIGINTERN PyObject *Transformer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20332                 :   PyObject *obj;
   20333              12 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   20334              12 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_NewClientData(obj));
   20335              12 :   return SWIG_Py_Void();
   20336                 : }
   20337                 : 
   20338               1 : SWIGINTERN PyObject *_wrap_ApplyGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20339               1 :   PyObject *resultobj = 0;
   20340                 :   double *arg1 ;
   20341                 :   double arg2 ;
   20342                 :   double arg3 ;
   20343               1 :   double *arg4 = (double *) 0 ;
   20344               1 :   double *arg5 = (double *) 0 ;
   20345                 :   double argin1[6] ;
   20346                 :   double val2 ;
   20347               1 :   int ecode2 = 0 ;
   20348                 :   double val3 ;
   20349               1 :   int ecode3 = 0 ;
   20350                 :   double temp4 ;
   20351               1 :   int res4 = SWIG_TMPOBJ ;
   20352                 :   double temp5 ;
   20353               1 :   int res5 = SWIG_TMPOBJ ;
   20354               1 :   PyObject * obj0 = 0 ;
   20355               1 :   PyObject * obj1 = 0 ;
   20356               1 :   PyObject * obj2 = 0 ;
   20357                 :   
   20358               1 :   arg4 = &temp4;
   20359               1 :   arg5 = &temp5;
   20360               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:ApplyGeoTransform",&obj0,&obj1,&obj2)) SWIG_fail;
   20361                 :   {
   20362                 :     /* %typemap(in) (double argin1[ANY]) */
   20363               1 :     arg1 = argin1;
   20364               1 :     if (! PySequence_Check(obj0) ) {
   20365               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   20366               0 :       SWIG_fail;
   20367                 :     }
   20368               1 :     int seq_size = PySequence_Size(obj0);
   20369               1 :     if ( seq_size != 6 ) {
   20370               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   20371               0 :       SWIG_fail;
   20372                 :     }
   20373               7 :     for (unsigned int i=0; i<6; i++) {
   20374               6 :       PyObject *o = PySequence_GetItem(obj0,i);
   20375                 :       double val;
   20376               6 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   20377               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   20378               0 :         Py_DECREF(o);
   20379                 :         SWIG_fail;
   20380                 :       }
   20381               6 :       arg1[i] =  val;
   20382               6 :       Py_DECREF(o);
   20383                 :     }
   20384                 :   }
   20385               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   20386               1 :   if (!SWIG_IsOK(ecode2)) {
   20387               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyGeoTransform" "', argument " "2"" of type '" "double""'");
   20388                 :   } 
   20389               1 :   arg2 = static_cast< double >(val2);
   20390               1 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   20391               1 :   if (!SWIG_IsOK(ecode3)) {
   20392               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyGeoTransform" "', argument " "3"" of type '" "double""'");
   20393                 :   } 
   20394               1 :   arg3 = static_cast< double >(val3);
   20395                 :   {
   20396               1 :     if ( bUseExceptions ) {
   20397               0 :       CPLErrorReset();
   20398                 :     }
   20399               1 :     GDALApplyGeoTransform(arg1,arg2,arg3,arg4,arg5);
   20400               1 :     if ( bUseExceptions ) {
   20401               0 :       CPLErr eclass = CPLGetLastErrorType();
   20402               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20403               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20404                 :       }
   20405                 :     }
   20406                 :   }
   20407               1 :   resultobj = SWIG_Py_Void();
   20408               2 :   if (SWIG_IsTmpObj(res4)) {
   20409               1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   20410                 :   } else {
   20411               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   20412               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   20413                 :   }
   20414               2 :   if (SWIG_IsTmpObj(res5)) {
   20415               1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   20416                 :   } else {
   20417               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   20418               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   20419                 :   }
   20420               1 :   return resultobj;
   20421                 : fail:
   20422               0 :   return NULL;
   20423                 : }
   20424                 : 
   20425                 : 
   20426               1 : SWIGINTERN PyObject *_wrap_InvGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20427               1 :   PyObject *resultobj = 0;
   20428                 :   double *arg1 ;
   20429                 :   double *arg2 ;
   20430                 :   double argin1[6] ;
   20431                 :   double argout2[6] ;
   20432               1 :   PyObject * obj0 = 0 ;
   20433                 :   int result;
   20434                 :   
   20435                 :   {
   20436                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   20437               1 :     arg2 = argout2;
   20438                 :   }
   20439               1 :   if (!PyArg_ParseTuple(args,(char *)"O:InvGeoTransform",&obj0)) SWIG_fail;
   20440                 :   {
   20441                 :     /* %typemap(in) (double argin1[ANY]) */
   20442               1 :     arg1 = argin1;
   20443               1 :     if (! PySequence_Check(obj0) ) {
   20444               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   20445               0 :       SWIG_fail;
   20446                 :     }
   20447               1 :     int seq_size = PySequence_Size(obj0);
   20448               1 :     if ( seq_size != 6 ) {
   20449               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   20450               0 :       SWIG_fail;
   20451                 :     }
   20452               7 :     for (unsigned int i=0; i<6; i++) {
   20453               6 :       PyObject *o = PySequence_GetItem(obj0,i);
   20454                 :       double val;
   20455               6 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   20456               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   20457               0 :         Py_DECREF(o);
   20458                 :         SWIG_fail;
   20459                 :       }
   20460               6 :       arg1[i] =  val;
   20461               6 :       Py_DECREF(o);
   20462                 :     }
   20463                 :   }
   20464                 :   {
   20465               1 :     if ( bUseExceptions ) {
   20466               0 :       CPLErrorReset();
   20467                 :     }
   20468               1 :     result = (int)GDALInvGeoTransform(arg1,arg2);
   20469               1 :     if ( bUseExceptions ) {
   20470               0 :       CPLErr eclass = CPLGetLastErrorType();
   20471               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20472               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20473                 :       }
   20474                 :     }
   20475                 :   }
   20476               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20477                 :   {
   20478                 :     /* %typemap(argout) (double argout[ANY]) */
   20479               1 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   20480               1 :     resultobj = t_output_helper(resultobj,out);
   20481                 :   }
   20482               1 :   return resultobj;
   20483                 : fail:
   20484               0 :   return NULL;
   20485                 : }
   20486                 : 
   20487                 : 
   20488            2131 : SWIGINTERN PyObject *_wrap_VersionInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20489            2131 :   PyObject *resultobj = 0;
   20490            2131 :   char *arg1 = (char *) "VERSION_NUM" ;
   20491                 :   int res1 ;
   20492            2131 :   char *buf1 = 0 ;
   20493            2131 :   int alloc1 = 0 ;
   20494            2131 :   PyObject * obj0 = 0 ;
   20495            2131 :   char *result = 0 ;
   20496                 :   
   20497            2131 :   if (!PyArg_ParseTuple(args,(char *)"|O:VersionInfo",&obj0)) SWIG_fail;
   20498            2131 :   if (obj0) {
   20499            2131 :     res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   20500            2131 :     if (!SWIG_IsOK(res1)) {
   20501               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VersionInfo" "', argument " "1"" of type '" "char const *""'");
   20502                 :     }
   20503            2131 :     arg1 = reinterpret_cast< char * >(buf1);
   20504                 :   }
   20505                 :   {
   20506            2131 :     if ( bUseExceptions ) {
   20507               0 :       CPLErrorReset();
   20508                 :     }
   20509            2131 :     result = (char *)GDALVersionInfo((char const *)arg1);
   20510            2131 :     if ( bUseExceptions ) {
   20511               0 :       CPLErr eclass = CPLGetLastErrorType();
   20512               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20513               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20514                 :       }
   20515                 :     }
   20516                 :   }
   20517            2131 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20518            2131 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20519            2131 :   return resultobj;
   20520                 : fail:
   20521               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20522               0 :   return NULL;
   20523                 : }
   20524                 : 
   20525                 : 
   20526              21 : SWIGINTERN PyObject *_wrap_AllRegister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20527              21 :   PyObject *resultobj = 0;
   20528                 :   
   20529              21 :   if (!PyArg_ParseTuple(args,(char *)":AllRegister")) SWIG_fail;
   20530                 :   {
   20531              21 :     if ( bUseExceptions ) {
   20532               0 :       CPLErrorReset();
   20533                 :     }
   20534              21 :     GDALAllRegister();
   20535              21 :     if ( bUseExceptions ) {
   20536               0 :       CPLErr eclass = CPLGetLastErrorType();
   20537               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20538               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20539                 :       }
   20540                 :     }
   20541                 :   }
   20542              21 :   resultobj = SWIG_Py_Void();
   20543              21 :   return resultobj;
   20544                 : fail:
   20545               0 :   return NULL;
   20546                 : }
   20547                 : 
   20548                 : 
   20549               0 : SWIGINTERN PyObject *_wrap_GDALDestroyDriverManager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20550               0 :   PyObject *resultobj = 0;
   20551                 :   
   20552               0 :   if (!PyArg_ParseTuple(args,(char *)":GDALDestroyDriverManager")) SWIG_fail;
   20553                 :   {
   20554               0 :     if ( bUseExceptions ) {
   20555               0 :       CPLErrorReset();
   20556                 :     }
   20557               0 :     GDALDestroyDriverManager();
   20558               0 :     if ( bUseExceptions ) {
   20559               0 :       CPLErr eclass = CPLGetLastErrorType();
   20560               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20561               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20562                 :       }
   20563                 :     }
   20564                 :   }
   20565               0 :   resultobj = SWIG_Py_Void();
   20566               0 :   return resultobj;
   20567                 : fail:
   20568               0 :   return NULL;
   20569                 : }
   20570                 : 
   20571                 : 
   20572              11 : SWIGINTERN PyObject *_wrap_GetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20573              11 :   PyObject *resultobj = 0;
   20574                 :   GIntBig result;
   20575                 :   
   20576              11 :   if (!PyArg_ParseTuple(args,(char *)":GetCacheMax")) SWIG_fail;
   20577                 :   {
   20578              11 :     if ( bUseExceptions ) {
   20579               1 :       CPLErrorReset();
   20580                 :     }
   20581              11 :     result = wrapper_GDALGetCacheMax();
   20582              11 :     if ( bUseExceptions ) {
   20583               1 :       CPLErr eclass = CPLGetLastErrorType();
   20584               1 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20585               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20586                 :       }
   20587                 :     }
   20588                 :   }
   20589                 :   {
   20590                 :     char szTmp[32];
   20591                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
   20592                 : #if PY_VERSION_HEX>=0x03000000
   20593                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
   20594                 : #else
   20595              11 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
   20596                 : #endif
   20597                 :   }
   20598              11 :   return resultobj;
   20599                 : fail:
   20600               0 :   return NULL;
   20601                 : }
   20602                 : 
   20603                 : 
   20604               2 : SWIGINTERN PyObject *_wrap_GetCacheUsed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20605               2 :   PyObject *resultobj = 0;
   20606                 :   GIntBig result;
   20607                 :   
   20608               2 :   if (!PyArg_ParseTuple(args,(char *)":GetCacheUsed")) SWIG_fail;
   20609                 :   {
   20610               2 :     if ( bUseExceptions ) {
   20611               0 :       CPLErrorReset();
   20612                 :     }
   20613               2 :     result = wrapper_GDALGetCacheUsed();
   20614               2 :     if ( bUseExceptions ) {
   20615               0 :       CPLErr eclass = CPLGetLastErrorType();
   20616               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20617               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20618                 :       }
   20619                 :     }
   20620                 :   }
   20621                 :   {
   20622                 :     char szTmp[32];
   20623                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
   20624                 : #if PY_VERSION_HEX>=0x03000000
   20625                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
   20626                 : #else
   20627               2 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
   20628                 : #endif
   20629                 :   }
   20630               2 :   return resultobj;
   20631                 : fail:
   20632               0 :   return NULL;
   20633                 : }
   20634                 : 
   20635                 : 
   20636              14 : SWIGINTERN PyObject *_wrap_SetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20637              14 :   PyObject *resultobj = 0;
   20638                 :   GIntBig arg1 ;
   20639              14 :   PyObject * obj0 = 0 ;
   20640                 :   
   20641              14 :   if (!PyArg_ParseTuple(args,(char *)"O:SetCacheMax",&obj0)) SWIG_fail;
   20642                 :   {
   20643                 :     PY_LONG_LONG val;
   20644              14 :     if ( !PyArg_Parse(obj0,"L",&val) ) {
   20645               0 :       PyErr_SetString(PyExc_TypeError, "not an integer");
   20646               0 :       SWIG_fail;
   20647                 :     }
   20648              14 :     arg1 = (GIntBig)val;
   20649                 :   }
   20650                 :   {
   20651              14 :     if ( bUseExceptions ) {
   20652               0 :       CPLErrorReset();
   20653                 :     }
   20654              14 :     wrapper_GDALSetCacheMax(arg1);
   20655              14 :     if ( bUseExceptions ) {
   20656               0 :       CPLErr eclass = CPLGetLastErrorType();
   20657               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20658               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20659                 :       }
   20660                 :     }
   20661                 :   }
   20662              14 :   resultobj = SWIG_Py_Void();
   20663              14 :   return resultobj;
   20664                 : fail:
   20665               0 :   return NULL;
   20666                 : }
   20667                 : 
   20668                 : 
   20669              22 : SWIGINTERN PyObject *_wrap_GetDataTypeSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20670              22 :   PyObject *resultobj = 0;
   20671                 :   GDALDataType arg1 ;
   20672                 :   int val1 ;
   20673              22 :   int ecode1 = 0 ;
   20674              22 :   PyObject * obj0 = 0 ;
   20675                 :   int result;
   20676                 :   
   20677              22 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDataTypeSize",&obj0)) SWIG_fail;
   20678              22 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20679              22 :   if (!SWIG_IsOK(ecode1)) {
   20680               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDataTypeSize" "', argument " "1"" of type '" "GDALDataType""'");
   20681                 :   } 
   20682              22 :   arg1 = static_cast< GDALDataType >(val1);
   20683                 :   {
   20684              22 :     if ( bUseExceptions ) {
   20685               0 :       CPLErrorReset();
   20686                 :     }
   20687              22 :     result = (int)GDALGetDataTypeSize(arg1);
   20688              22 :     if ( bUseExceptions ) {
   20689               0 :       CPLErr eclass = CPLGetLastErrorType();
   20690               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20691               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20692                 :       }
   20693                 :     }
   20694                 :   }
   20695              22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20696              22 :   return resultobj;
   20697                 : fail:
   20698               0 :   return NULL;
   20699                 : }
   20700                 : 
   20701                 : 
   20702              22 : SWIGINTERN PyObject *_wrap_DataTypeIsComplex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20703              22 :   PyObject *resultobj = 0;
   20704                 :   GDALDataType arg1 ;
   20705                 :   int val1 ;
   20706              22 :   int ecode1 = 0 ;
   20707              22 :   PyObject * obj0 = 0 ;
   20708                 :   int result;
   20709                 :   
   20710              22 :   if (!PyArg_ParseTuple(args,(char *)"O:DataTypeIsComplex",&obj0)) SWIG_fail;
   20711              22 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20712              22 :   if (!SWIG_IsOK(ecode1)) {
   20713               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DataTypeIsComplex" "', argument " "1"" of type '" "GDALDataType""'");
   20714                 :   } 
   20715              22 :   arg1 = static_cast< GDALDataType >(val1);
   20716                 :   {
   20717              22 :     if ( bUseExceptions ) {
   20718               0 :       CPLErrorReset();
   20719                 :     }
   20720              22 :     result = (int)GDALDataTypeIsComplex(arg1);
   20721              22 :     if ( bUseExceptions ) {
   20722               0 :       CPLErr eclass = CPLGetLastErrorType();
   20723               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20724               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20725                 :       }
   20726                 :     }
   20727                 :   }
   20728              22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20729              22 :   return resultobj;
   20730                 : fail:
   20731               0 :   return NULL;
   20732                 : }
   20733                 : 
   20734                 : 
   20735            4712 : SWIGINTERN PyObject *_wrap_GetDataTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20736            4712 :   PyObject *resultobj = 0;
   20737                 :   GDALDataType arg1 ;
   20738                 :   int val1 ;
   20739            4712 :   int ecode1 = 0 ;
   20740            4712 :   PyObject * obj0 = 0 ;
   20741            4712 :   char *result = 0 ;
   20742                 :   
   20743            4712 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDataTypeName",&obj0)) SWIG_fail;
   20744            4712 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20745            4712 :   if (!SWIG_IsOK(ecode1)) {
   20746               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDataTypeName" "', argument " "1"" of type '" "GDALDataType""'");
   20747                 :   } 
   20748            4712 :   arg1 = static_cast< GDALDataType >(val1);
   20749                 :   {
   20750            4712 :     if ( bUseExceptions ) {
   20751               0 :       CPLErrorReset();
   20752                 :     }
   20753            4712 :     result = (char *)GDALGetDataTypeName(arg1);
   20754            4712 :     if ( bUseExceptions ) {
   20755               0 :       CPLErr eclass = CPLGetLastErrorType();
   20756               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20757               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20758                 :       }
   20759                 :     }
   20760                 :   }
   20761            4712 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20762            4712 :   return resultobj;
   20763                 : fail:
   20764               0 :   return NULL;
   20765                 : }
   20766                 : 
   20767                 : 
   20768               1 : SWIGINTERN PyObject *_wrap_GetDataTypeByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20769               1 :   PyObject *resultobj = 0;
   20770               1 :   char *arg1 = (char *) 0 ;
   20771                 :   int res1 ;
   20772               1 :   char *buf1 = 0 ;
   20773               1 :   int alloc1 = 0 ;
   20774               1 :   PyObject * obj0 = 0 ;
   20775                 :   GDALDataType result;
   20776                 :   
   20777               1 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDataTypeByName",&obj0)) SWIG_fail;
   20778               1 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   20779               1 :   if (!SWIG_IsOK(res1)) {
   20780               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDataTypeByName" "', argument " "1"" of type '" "char const *""'");
   20781                 :   }
   20782               1 :   arg1 = reinterpret_cast< char * >(buf1);
   20783                 :   {
   20784               1 :     if ( bUseExceptions ) {
   20785               0 :       CPLErrorReset();
   20786                 :     }
   20787               1 :     result = (GDALDataType)GDALGetDataTypeByName((char const *)arg1);
   20788               1 :     if ( bUseExceptions ) {
   20789               0 :       CPLErr eclass = CPLGetLastErrorType();
   20790               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20791               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20792                 :       }
   20793                 :     }
   20794                 :   }
   20795               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20796               1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20797               1 :   return resultobj;
   20798                 : fail:
   20799               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20800               0 :   return NULL;
   20801                 : }
   20802                 : 
   20803                 : 
   20804              17 : SWIGINTERN PyObject *_wrap_GetColorInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20805              17 :   PyObject *resultobj = 0;
   20806                 :   GDALColorInterp arg1 ;
   20807                 :   int val1 ;
   20808              17 :   int ecode1 = 0 ;
   20809              17 :   PyObject * obj0 = 0 ;
   20810              17 :   char *result = 0 ;
   20811                 :   
   20812              17 :   if (!PyArg_ParseTuple(args,(char *)"O:GetColorInterpretationName",&obj0)) SWIG_fail;
   20813              17 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20814              17 :   if (!SWIG_IsOK(ecode1)) {
   20815               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetColorInterpretationName" "', argument " "1"" of type '" "GDALColorInterp""'");
   20816                 :   } 
   20817              17 :   arg1 = static_cast< GDALColorInterp >(val1);
   20818                 :   {
   20819              17 :     if ( bUseExceptions ) {
   20820               0 :       CPLErrorReset();
   20821                 :     }
   20822              17 :     result = (char *)GDALGetColorInterpretationName(arg1);
   20823              17 :     if ( bUseExceptions ) {
   20824               0 :       CPLErr eclass = CPLGetLastErrorType();
   20825               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20826               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20827                 :       }
   20828                 :     }
   20829                 :   }
   20830              17 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20831              17 :   return resultobj;
   20832                 : fail:
   20833               0 :   return NULL;
   20834                 : }
   20835                 : 
   20836                 : 
   20837               2 : SWIGINTERN PyObject *_wrap_GetPaletteInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20838               2 :   PyObject *resultobj = 0;
   20839                 :   GDALPaletteInterp arg1 ;
   20840                 :   int val1 ;
   20841               2 :   int ecode1 = 0 ;
   20842               2 :   PyObject * obj0 = 0 ;
   20843               2 :   char *result = 0 ;
   20844                 :   
   20845               2 :   if (!PyArg_ParseTuple(args,(char *)"O:GetPaletteInterpretationName",&obj0)) SWIG_fail;
   20846               2 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20847               2 :   if (!SWIG_IsOK(ecode1)) {
   20848               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetPaletteInterpretationName" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   20849                 :   } 
   20850               2 :   arg1 = static_cast< GDALPaletteInterp >(val1);
   20851                 :   {
   20852               2 :     if ( bUseExceptions ) {
   20853               0 :       CPLErrorReset();
   20854                 :     }
   20855               2 :     result = (char *)GDALGetPaletteInterpretationName(arg1);
   20856               2 :     if ( bUseExceptions ) {
   20857               0 :       CPLErr eclass = CPLGetLastErrorType();
   20858               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20859               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20860                 :       }
   20861                 :     }
   20862                 :   }
   20863               2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20864               2 :   return resultobj;
   20865                 : fail:
   20866               0 :   return NULL;
   20867                 : }
   20868                 : 
   20869                 : 
   20870             130 : SWIGINTERN PyObject *_wrap_DecToDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20871             130 :   PyObject *resultobj = 0;
   20872                 :   double arg1 ;
   20873             130 :   char *arg2 = (char *) 0 ;
   20874             130 :   int arg3 = (int) 2 ;
   20875                 :   double val1 ;
   20876             130 :   int ecode1 = 0 ;
   20877                 :   int res2 ;
   20878             130 :   char *buf2 = 0 ;
   20879             130 :   int alloc2 = 0 ;
   20880                 :   int val3 ;
   20881             130 :   int ecode3 = 0 ;
   20882             130 :   PyObject * obj0 = 0 ;
   20883             130 :   PyObject * obj1 = 0 ;
   20884             130 :   PyObject * obj2 = 0 ;
   20885             130 :   char *result = 0 ;
   20886                 :   
   20887             130 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:DecToDMS",&obj0,&obj1,&obj2)) SWIG_fail;
   20888             130 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   20889             130 :   if (!SWIG_IsOK(ecode1)) {
   20890               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToDMS" "', argument " "1"" of type '" "double""'");
   20891                 :   } 
   20892             130 :   arg1 = static_cast< double >(val1);
   20893             130 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   20894             130 :   if (!SWIG_IsOK(res2)) {
   20895               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecToDMS" "', argument " "2"" of type '" "char const *""'");
   20896                 :   }
   20897             130 :   arg2 = reinterpret_cast< char * >(buf2);
   20898             130 :   if (obj2) {
   20899             130 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   20900             130 :     if (!SWIG_IsOK(ecode3)) {
   20901               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecToDMS" "', argument " "3"" of type '" "int""'");
   20902                 :     } 
   20903             130 :     arg3 = static_cast< int >(val3);
   20904                 :   }
   20905                 :   {
   20906             130 :     if ( bUseExceptions ) {
   20907               0 :       CPLErrorReset();
   20908                 :     }
   20909             130 :     result = (char *)GDALDecToDMS(arg1,(char const *)arg2,arg3);
   20910             130 :     if ( bUseExceptions ) {
   20911               0 :       CPLErr eclass = CPLGetLastErrorType();
   20912               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20913               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20914                 :       }
   20915                 :     }
   20916                 :   }
   20917             130 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20918             130 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20919             130 :   return resultobj;
   20920                 : fail:
   20921               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20922               0 :   return NULL;
   20923                 : }
   20924                 : 
   20925                 : 
   20926               4 : SWIGINTERN PyObject *_wrap_PackedDMSToDec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20927               4 :   PyObject *resultobj = 0;
   20928                 :   double arg1 ;
   20929                 :   double val1 ;
   20930               4 :   int ecode1 = 0 ;
   20931               4 :   PyObject * obj0 = 0 ;
   20932                 :   double result;
   20933                 :   
   20934               4 :   if (!PyArg_ParseTuple(args,(char *)"O:PackedDMSToDec",&obj0)) SWIG_fail;
   20935               4 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   20936               4 :   if (!SWIG_IsOK(ecode1)) {
   20937               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PackedDMSToDec" "', argument " "1"" of type '" "double""'");
   20938                 :   } 
   20939               4 :   arg1 = static_cast< double >(val1);
   20940                 :   {
   20941               4 :     if ( bUseExceptions ) {
   20942               0 :       CPLErrorReset();
   20943                 :     }
   20944               4 :     result = (double)GDALPackedDMSToDec(arg1);
   20945               4 :     if ( bUseExceptions ) {
   20946               0 :       CPLErr eclass = CPLGetLastErrorType();
   20947               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20948               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20949                 :       }
   20950                 :     }
   20951                 :   }
   20952               4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20953               4 :   return resultobj;
   20954                 : fail:
   20955               0 :   return NULL;
   20956                 : }
   20957                 : 
   20958                 : 
   20959               4 : SWIGINTERN PyObject *_wrap_DecToPackedDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20960               4 :   PyObject *resultobj = 0;
   20961                 :   double arg1 ;
   20962                 :   double val1 ;
   20963               4 :   int ecode1 = 0 ;
   20964               4 :   PyObject * obj0 = 0 ;
   20965                 :   double result;
   20966                 :   
   20967               4 :   if (!PyArg_ParseTuple(args,(char *)"O:DecToPackedDMS",&obj0)) SWIG_fail;
   20968               4 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   20969               4 :   if (!SWIG_IsOK(ecode1)) {
   20970               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToPackedDMS" "', argument " "1"" of type '" "double""'");
   20971                 :   } 
   20972               4 :   arg1 = static_cast< double >(val1);
   20973                 :   {
   20974               4 :     if ( bUseExceptions ) {
   20975               0 :       CPLErrorReset();
   20976                 :     }
   20977               4 :     result = (double)GDALDecToPackedDMS(arg1);
   20978               4 :     if ( bUseExceptions ) {
   20979               0 :       CPLErr eclass = CPLGetLastErrorType();
   20980               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20981               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20982                 :       }
   20983                 :     }
   20984                 :   }
   20985               4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20986               4 :   return resultobj;
   20987                 : fail:
   20988               0 :   return NULL;
   20989                 : }
   20990                 : 
   20991                 : 
   20992               7 : SWIGINTERN PyObject *_wrap_ParseXMLString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20993               7 :   PyObject *resultobj = 0;
   20994               7 :   char *arg1 = (char *) 0 ;
   20995                 :   int res1 ;
   20996               7 :   char *buf1 = 0 ;
   20997               7 :   int alloc1 = 0 ;
   20998               7 :   PyObject * obj0 = 0 ;
   20999               7 :   CPLXMLNode *result = 0 ;
   21000                 :   
   21001               7 :   if (!PyArg_ParseTuple(args,(char *)"O:ParseXMLString",&obj0)) SWIG_fail;
   21002               7 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   21003               7 :   if (!SWIG_IsOK(res1)) {
   21004               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseXMLString" "', argument " "1"" of type '" "char *""'");
   21005                 :   }
   21006               7 :   arg1 = reinterpret_cast< char * >(buf1);
   21007                 :   {
   21008               7 :     if ( bUseExceptions ) {
   21009               0 :       CPLErrorReset();
   21010                 :     }
   21011               7 :     result = (CPLXMLNode *)CPLParseXMLString(arg1);
   21012               7 :     if ( bUseExceptions ) {
   21013               0 :       CPLErr eclass = CPLGetLastErrorType();
   21014               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21015               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21016                 :       }
   21017                 :     }
   21018                 :   }
   21019                 :   {
   21020                 :     /* %typemap(out) (CPLXMLNode*) */
   21021                 :     
   21022               7 :     CPLXMLNode *psXMLTree = result;
   21023               7 :     int         bFakeRoot = FALSE;
   21024                 :     
   21025               7 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   21026                 :     {
   21027               2 :       CPLXMLNode *psFirst = psXMLTree;
   21028                 :       
   21029                 :       /* create a "pseudo" root if we have multiple elements */
   21030               2 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   21031               2 :       psXMLTree->psChild = psFirst;
   21032               2 :       bFakeRoot = TRUE;
   21033                 :     }
   21034                 :     
   21035               7 :     resultobj = XMLTreeToPyList( psXMLTree );
   21036                 :     
   21037               7 :     if( bFakeRoot )
   21038                 :     {
   21039               2 :       psXMLTree->psChild = NULL;
   21040               2 :       CPLDestroyXMLNode( psXMLTree );
   21041                 :     }
   21042                 :   }
   21043               7 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   21044                 :   {
   21045                 :     /* %typemap(ret) (CPLXMLNode*) */
   21046               7 :     if ( result ) CPLDestroyXMLNode( result );
   21047                 :   }
   21048               7 :   return resultobj;
   21049                 : fail:
   21050               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   21051               0 :   return NULL;
   21052                 : }
   21053                 : 
   21054                 : 
   21055               2 : SWIGINTERN PyObject *_wrap_SerializeXMLTree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21056               2 :   PyObject *resultobj = 0;
   21057               2 :   CPLXMLNode *arg1 = (CPLXMLNode *) 0 ;
   21058               2 :   PyObject * obj0 = 0 ;
   21059               2 :   retStringAndCPLFree *result = 0 ;
   21060                 :   
   21061               2 :   if (!PyArg_ParseTuple(args,(char *)"O:SerializeXMLTree",&obj0)) SWIG_fail;
   21062                 :   {
   21063                 :     /* %typemap(python,in) (CPLXMLNode* xmlnode ) */
   21064               2 :     arg1 = PyListToXMLTree( obj0 );
   21065               2 :     if ( !arg1 ) SWIG_fail;
   21066                 :   }
   21067                 :   {
   21068               2 :     if ( bUseExceptions ) {
   21069               0 :       CPLErrorReset();
   21070                 :     }
   21071               2 :     result = (retStringAndCPLFree *)CPLSerializeXMLTree(arg1);
   21072               2 :     if ( bUseExceptions ) {
   21073               0 :       CPLErr eclass = CPLGetLastErrorType();
   21074               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21075               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21076                 :       }
   21077                 :     }
   21078                 :   }
   21079                 :   {
   21080                 :     /* %typemap(out) (retStringAndCPLFree*) */
   21081               2 :     if(result)
   21082                 :     {
   21083               2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   21084               2 :       CPLFree(result);
   21085                 :     }
   21086                 :   }
   21087                 :   {
   21088                 :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   21089               2 :     if ( arg1 ) CPLDestroyXMLNode( arg1 );
   21090                 :   }
   21091               2 :   return resultobj;
   21092                 : fail:
   21093                 :   {
   21094                 :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   21095               0 :     if ( arg1 ) CPLDestroyXMLNode( arg1 );
   21096                 :   }
   21097               0 :   return NULL;
   21098                 : }
   21099                 : 
   21100                 : 
   21101              18 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21102              18 :   PyObject *resultobj = 0;
   21103                 :   int result;
   21104                 :   
   21105              18 :   if (!PyArg_ParseTuple(args,(char *)":GetDriverCount")) SWIG_fail;
   21106                 :   {
   21107              18 :     if ( bUseExceptions ) {
   21108               0 :       CPLErrorReset();
   21109                 :     }
   21110              18 :     result = (int)GetDriverCount();
   21111              18 :     if ( bUseExceptions ) {
   21112               0 :       CPLErr eclass = CPLGetLastErrorType();
   21113               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21114               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21115                 :       }
   21116                 :     }
   21117                 :   }
   21118              18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   21119              18 :   return resultobj;
   21120                 : fail:
   21121               0 :   return NULL;
   21122                 : }
   21123                 : 
   21124                 : 
   21125            2171 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21126            2171 :   PyObject *resultobj = 0;
   21127            2171 :   char *arg1 = (char *) 0 ;
   21128                 :   int res1 ;
   21129            2171 :   char *buf1 = 0 ;
   21130            2171 :   int alloc1 = 0 ;
   21131            2171 :   PyObject * obj0 = 0 ;
   21132            2171 :   GDALDriverShadow *result = 0 ;
   21133                 :   
   21134            2171 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDriverByName",&obj0)) SWIG_fail;
   21135            2171 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   21136            2171 :   if (!SWIG_IsOK(res1)) {
   21137               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
   21138                 :   }
   21139            2171 :   arg1 = reinterpret_cast< char * >(buf1);
   21140                 :   {
   21141            2171 :     if (!arg1) {
   21142               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21143                 :     }
   21144                 :   }
   21145                 :   {
   21146            2171 :     if ( bUseExceptions ) {
   21147               0 :       CPLErrorReset();
   21148                 :     }
   21149            2171 :     result = (GDALDriverShadow *)GetDriverByName((char const *)arg1);
   21150            2171 :     if ( bUseExceptions ) {
   21151               0 :       CPLErr eclass = CPLGetLastErrorType();
   21152               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21153               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21154                 :       }
   21155                 :     }
   21156                 :   }
   21157            2171 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   21158            2171 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   21159            2171 :   return resultobj;
   21160                 : fail:
   21161               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   21162               0 :   return NULL;
   21163                 : }
   21164                 : 
   21165                 : 
   21166            2340 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21167            2340 :   PyObject *resultobj = 0;
   21168                 :   int arg1 ;
   21169                 :   int val1 ;
   21170            2340 :   int ecode1 = 0 ;
   21171            2340 :   PyObject * obj0 = 0 ;
   21172            2340 :   GDALDriverShadow *result = 0 ;
   21173                 :   
   21174            2340 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDriver",&obj0)) SWIG_fail;
   21175            2340 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   21176            2340 :   if (!SWIG_IsOK(ecode1)) {
   21177               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
   21178                 :   } 
   21179            2340 :   arg1 = static_cast< int >(val1);
   21180                 :   {
   21181            2340 :     if ( bUseExceptions ) {
   21182               0 :       CPLErrorReset();
   21183                 :     }
   21184            2340 :     result = (GDALDriverShadow *)GetDriver(arg1);
   21185            2340 :     if ( bUseExceptions ) {
   21186               0 :       CPLErr eclass = CPLGetLastErrorType();
   21187               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21188               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21189                 :       }
   21190                 :     }
   21191                 :   }
   21192            2340 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   21193            2340 :   return resultobj;
   21194                 : fail:
   21195               0 :   return NULL;
   21196                 : }
   21197                 : 
   21198                 : 
   21199            4489 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21200            4489 :   PyObject *resultobj = 0;
   21201            4489 :   char *arg1 = (char *) 0 ;
   21202            4489 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   21203            4489 :   int bToFree1 = 0 ;
   21204                 :   int val2 ;
   21205            4489 :   int ecode2 = 0 ;
   21206            4489 :   PyObject * obj0 = 0 ;
   21207            4489 :   PyObject * obj1 = 0 ;
   21208            4489 :   GDALDatasetShadow *result = 0 ;
   21209                 :   
   21210            4489 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Open",&obj0,&obj1)) SWIG_fail;
   21211                 :   {
   21212                 :     /* %typemap(in) (const char *utf8_path) */
   21213            4489 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   21214            4489 :     if (arg1 == NULL)
   21215                 :     {
   21216               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   21217               0 :       SWIG_fail;
   21218                 :     }
   21219                 :   }
   21220            4489 :   if (obj1) {
   21221             490 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   21222             490 :     if (!SWIG_IsOK(ecode2)) {
   21223               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Open" "', argument " "2"" of type '" "GDALAccess""'");
   21224                 :     } 
   21225             490 :     arg2 = static_cast< GDALAccess >(val2);
   21226                 :   }
   21227                 :   {
   21228            4489 :     if ( bUseExceptions ) {
   21229               1 :       CPLErrorReset();
   21230                 :     }
   21231            4489 :     result = (GDALDatasetShadow *)Open((char const *)arg1,arg2);
   21232            4489 :     if ( bUseExceptions ) {
   21233               1 :       CPLErr eclass = CPLGetLastErrorType();
   21234               1 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21235               1 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21236                 :       }
   21237                 :     }
   21238                 :   }
   21239            4488 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   21240                 :   {
   21241                 :     /* %typemap(freearg) (const char *utf8_path) */
   21242            4488 :     GDALPythonFreeCStr(arg1, bToFree1);
   21243                 :   }
   21244            4488 :   return resultobj;
   21245                 : fail:
   21246                 :   {
   21247                 :     /* %typemap(freearg) (const char *utf8_path) */
   21248               1 :     GDALPythonFreeCStr(arg1, bToFree1);
   21249                 :   }
   21250               1 :   return NULL;
   21251                 : }
   21252                 : 
   21253                 : 
   21254            5004 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21255            5004 :   PyObject *resultobj = 0;
   21256            5004 :   char *arg1 = (char *) 0 ;
   21257            5004 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   21258            5004 :   int bToFree1 = 0 ;
   21259                 :   int val2 ;
   21260            5004 :   int ecode2 = 0 ;
   21261            5004 :   PyObject * obj0 = 0 ;
   21262            5004 :   PyObject * obj1 = 0 ;
   21263            5004 :   GDALDatasetShadow *result = 0 ;
   21264                 :   
   21265            5004 :   if (!PyArg_ParseTuple(args,(char *)"O|O:OpenShared",&obj0,&obj1)) SWIG_fail;
   21266                 :   {
   21267                 :     /* %typemap(in) (const char *utf8_path) */
   21268            5004 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   21269            5004 :     if (arg1 == NULL)
   21270                 :     {
   21271               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   21272               0 :       SWIG_fail;
   21273                 :     }
   21274                 :   }
   21275            5004 :   if (obj1) {
   21276               1 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   21277               1 :     if (!SWIG_IsOK(ecode2)) {
   21278               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenShared" "', argument " "2"" of type '" "GDALAccess""'");
   21279                 :     } 
   21280               1 :     arg2 = static_cast< GDALAccess >(val2);
   21281                 :   }
   21282                 :   {
   21283            5004 :     if ( bUseExceptions ) {
   21284               0 :       CPLErrorReset();
   21285                 :     }
   21286            5004 :     result = (GDALDatasetShadow *)OpenShared((char const *)arg1,arg2);
   21287            5004 :     if ( bUseExceptions ) {
   21288               0 :       CPLErr eclass = CPLGetLastErrorType();
   21289               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21290               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21291                 :       }
   21292                 :     }
   21293                 :   }
   21294            5004 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   21295                 :   {
   21296                 :     /* %typemap(freearg) (const char *utf8_path) */
   21297            5004 :     GDALPythonFreeCStr(arg1, bToFree1);
   21298                 :   }
   21299            5004 :   return resultobj;
   21300                 : fail:
   21301                 :   {
   21302                 :     /* %typemap(freearg) (const char *utf8_path) */
   21303               0 :     GDALPythonFreeCStr(arg1, bToFree1);
   21304                 :   }
   21305               0 :   return NULL;
   21306                 : }
   21307                 : 
   21308                 : 
   21309               9 : SWIGINTERN PyObject *_wrap_IdentifyDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21310               9 :   PyObject *resultobj = 0;
   21311               9 :   char *arg1 = (char *) 0 ;
   21312               9 :   char **arg2 = (char **) NULL ;
   21313               9 :   int bToFree1 = 0 ;
   21314               9 :   PyObject * obj0 = 0 ;
   21315               9 :   PyObject * obj1 = 0 ;
   21316               9 :   GDALDriverShadow *result = 0 ;
   21317                 :   
   21318               9 :   if (!PyArg_ParseTuple(args,(char *)"O|O:IdentifyDriver",&obj0,&obj1)) SWIG_fail;
   21319                 :   {
   21320                 :     /* %typemap(in) (const char *utf8_path) */
   21321               9 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   21322               9 :     if (arg1 == NULL)
   21323                 :     {
   21324               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   21325               0 :       SWIG_fail;
   21326                 :     }
   21327                 :   }
   21328               9 :   if (obj1) {
   21329                 :     {
   21330                 :       /* %typemap(in) char **options */
   21331                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   21332               2 :       if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
   21333                 :   #if PY_VERSION_HEX < 0x03000000
   21334                 :         || PyString_Check(obj1)
   21335                 :   #endif
   21336                 :         ) {
   21337               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   21338               0 :         SWIG_fail;
   21339                 :       }
   21340                 :       
   21341               2 :       int size = PySequence_Size(obj1);
   21342             378 :       for (int i = 0; i < size; i++) {
   21343             376 :         PyObject* pyObj = PySequence_GetItem(obj1,i);
   21344             376 :         if (PyUnicode_Check(pyObj))
   21345                 :         {
   21346                 :           char *pszStr;
   21347                 :           Py_ssize_t nLen;
   21348               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   21349                 : #if PY_VERSION_HEX >= 0x03000000
   21350                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   21351                 : #else
   21352               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   21353                 : #endif
   21354               0 :           arg2 = CSLAddString( arg2, pszStr );
   21355               0 :           Py_XDECREF(pyUTF8Str);
   21356                 :         }
   21357                 : #if PY_VERSION_HEX >= 0x03000000
   21358                 :         else if (PyBytes_Check(pyObj))
   21359                 :         arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   21360                 : #else
   21361             376 :         else if (PyString_Check(pyObj))
   21362             376 :         arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   21363                 : #endif
   21364                 :         else
   21365                 :         {
   21366               0 :           Py_DECREF(pyObj);
   21367               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   21368               0 :           SWIG_fail;
   21369                 :         }
   21370             376 :         Py_DECREF(pyObj);
   21371                 :       }
   21372                 :     }
   21373                 :   }
   21374                 :   {
   21375               9 :     if ( bUseExceptions ) {
   21376               0 :       CPLErrorReset();
   21377                 :     }
   21378               9 :     result = (GDALDriverShadow *)IdentifyDriver((char const *)arg1,arg2);
   21379               9 :     if ( bUseExceptions ) {
   21380               0 :       CPLErr eclass = CPLGetLastErrorType();
   21381               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21382               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21383                 :       }
   21384                 :     }
   21385                 :   }
   21386               9 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   21387                 :   {
   21388                 :     /* %typemap(freearg) (const char *utf8_path) */
   21389               9 :     GDALPythonFreeCStr(arg1, bToFree1);
   21390                 :   }
   21391                 :   {
   21392                 :     /* %typemap(freearg) char **options */
   21393               9 :     CSLDestroy( arg2 );
   21394                 :   }
   21395               9 :   return resultobj;
   21396                 : fail:
   21397                 :   {
   21398                 :     /* %typemap(freearg) (const char *utf8_path) */
   21399               0 :     GDALPythonFreeCStr(arg1, bToFree1);
   21400                 :   }
   21401                 :   {
   21402                 :     /* %typemap(freearg) char **options */
   21403               0 :     CSLDestroy( arg2 );
   21404                 :   }
   21405               0 :   return NULL;
   21406                 : }
   21407                 : 
   21408                 : 
   21409              54 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21410              54 :   PyObject *resultobj = 0;
   21411              54 :   char **arg1 = (char **) 0 ;
   21412              54 :   int arg2 = (int) 0 ;
   21413                 :   int val2 ;
   21414              54 :   int ecode2 = 0 ;
   21415              54 :   PyObject * obj0 = 0 ;
   21416              54 :   PyObject * obj1 = 0 ;
   21417              54 :   char **result = 0 ;
   21418                 :   
   21419              54 :   if (!PyArg_ParseTuple(args,(char *)"O|O:GeneralCmdLineProcessor",&obj0,&obj1)) SWIG_fail;
   21420                 :   {
   21421                 :     /* %typemap(in) char **options */
   21422                 :     /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   21423              54 :     if ( ! PySequence_Check(obj0) || PyUnicode_Check(obj0)
   21424                 :   #if PY_VERSION_HEX < 0x03000000
   21425                 :       || PyString_Check(obj0)
   21426                 :   #endif
   21427                 :       ) {
   21428               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   21429               0 :       SWIG_fail;
   21430                 :     }
   21431                 :     
   21432              54 :     int size = PySequence_Size(obj0);
   21433             264 :     for (int i = 0; i < size; i++) {
   21434             210 :       PyObject* pyObj = PySequence_GetItem(obj0,i);
   21435             210 :       if (PyUnicode_Check(pyObj))
   21436                 :       {
   21437                 :         char *pszStr;
   21438                 :         Py_ssize_t nLen;
   21439               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   21440                 : #if PY_VERSION_HEX >= 0x03000000
   21441                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   21442                 : #else
   21443               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   21444                 : #endif
   21445               0 :         arg1 = CSLAddString( arg1, pszStr );
   21446               0 :         Py_XDECREF(pyUTF8Str);
   21447                 :       }
   21448                 : #if PY_VERSION_HEX >= 0x03000000
   21449                 :       else if (PyBytes_Check(pyObj))
   21450                 :       arg1 = CSLAddString( arg1, PyBytes_AsString(pyObj) );
   21451                 : #else
   21452             210 :       else if (PyString_Check(pyObj))
   21453             210 :       arg1 = CSLAddString( arg1, PyString_AsString(pyObj) );
   21454                 : #endif
   21455                 :       else
   21456                 :       {
   21457               0 :         Py_DECREF(pyObj);
   21458               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   21459               0 :         SWIG_fail;
   21460                 :       }
   21461             210 :       Py_DECREF(pyObj);
   21462                 :     }
   21463                 :   }
   21464              54 :   if (obj1) {
   21465               0 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   21466               0 :     if (!SWIG_IsOK(ecode2)) {
   21467               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
   21468                 :     } 
   21469               0 :     arg2 = static_cast< int >(val2);
   21470                 :   }
   21471                 :   {
   21472              54 :     if ( bUseExceptions ) {
   21473               0 :       CPLErrorReset();
   21474                 :     }
   21475              54 :     result = (char **)GeneralCmdLineProcessor(arg1,arg2);
   21476              54 :     if ( bUseExceptions ) {
   21477               0 :       CPLErr eclass = CPLGetLastErrorType();
   21478               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21479               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21480                 :       }
   21481                 :     }
   21482                 :   }
   21483                 :   {
   21484                 :     /* %typemap(out) char **CSL -> ( string ) */
   21485              54 :     char **stringarray = result;
   21486              54 :     if ( stringarray == NULL ) {
   21487               0 :       resultobj = Py_None;
   21488               0 :       Py_INCREF( resultobj );
   21489                 :     }
   21490                 :     else {
   21491              54 :       int len = CSLCount( stringarray );
   21492              54 :       resultobj = PyList_New( len );
   21493             264 :       for ( int i = 0; i < len; ++i ) {
   21494             210 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   21495             210 :         PyList_SetItem(resultobj, i, o );
   21496                 :       }
   21497                 :     }
   21498              54 :     CSLDestroy(result);
   21499                 :   }
   21500                 :   {
   21501                 :     /* %typemap(freearg) char **options */
   21502              54 :     CSLDestroy( arg1 );
   21503                 :   }
   21504              54 :   return resultobj;
   21505                 : fail:
   21506                 :   {
   21507                 :     /* %typemap(freearg) char **options */
   21508               0 :     CSLDestroy( arg1 );
   21509                 :   }
   21510               0 :   return NULL;
   21511                 : }
   21512                 : 
   21513                 : 
   21514                 : static PyMethodDef SwigMethods[] = {
   21515                 :    { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
   21516                 :    { (char *)"GetUseExceptions", _wrap_GetUseExceptions, METH_VARARGS, (char *)"GetUseExceptions() -> int"},
   21517                 :    { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, (char *)"UseExceptions()"},
   21518                 :    { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, (char *)"DontUseExceptions()"},
   21519                 :    { (char *)"VSIFReadL", _wrap_VSIFReadL, METH_VARARGS, (char *)"VSIFReadL(int nMembSize, int nMembCount, VSILFILE fp) -> int"},
   21520                 :    { (char *)"Debug", _wrap_Debug, METH_VARARGS, (char *)"Debug(char msg_class, char message)"},
   21521                 :    { (char *)"SetErrorHandler", _wrap_SetErrorHandler, METH_VARARGS, (char *)"SetErrorHandler(char pszCallbackName = None) -> CPLErr"},
   21522                 :    { (char *)"PushErrorHandler", _wrap_PushErrorHandler, METH_VARARGS, (char *)"PushErrorHandler(CPLErrorHandler pfnErrorHandler = None) -> CPLErr"},
   21523                 :    { (char *)"Error", _wrap_Error, METH_VARARGS, (char *)"Error(CPLErr msg_class = CE_Failure, int err_code = 0, char msg = \"error\")"},
   21524                 :    { (char *)"GOA2GetAuthorizationURL", _wrap_GOA2GetAuthorizationURL, METH_VARARGS, (char *)"GOA2GetAuthorizationURL(char pszScope) -> retStringAndCPLFree"},
   21525                 :    { (char *)"GOA2GetRefreshToken", _wrap_GOA2GetRefreshToken, METH_VARARGS, (char *)"GOA2GetRefreshToken(char pszAuthToken, char pszScope) -> retStringAndCPLFree"},
   21526                 :    { (char *)"GOA2GetAccessToken", _wrap_GOA2GetAccessToken, METH_VARARGS, (char *)"GOA2GetAccessToken(char pszRefreshToken, char pszScope) -> retStringAndCPLFree"},
   21527                 :    { (char *)"PopErrorHandler", _wrap_PopErrorHandler, METH_VARARGS, (char *)"PopErrorHandler()"},
   21528                 :    { (char *)"ErrorReset", _wrap_ErrorReset, METH_VARARGS, (char *)"ErrorReset()"},
   21529                 :    { (char *)"EscapeString", (PyCFunction) _wrap_EscapeString, METH_VARARGS | METH_KEYWORDS, (char *)"EscapeString(int len, int scheme = CPLES_SQL) -> retStringAndCPLFree"},
   21530                 :    { (char *)"GetLastErrorNo", _wrap_GetLastErrorNo, METH_VARARGS, (char *)"GetLastErrorNo() -> int"},
   21531                 :    { (char *)"GetLastErrorType", _wrap_GetLastErrorType, METH_VARARGS, (char *)"GetLastErrorType() -> int"},
   21532                 :    { (char *)"GetLastErrorMsg", _wrap_GetLastErrorMsg, METH_VARARGS, (char *)"GetLastErrorMsg() -> char"},
   21533                 :    { (char *)"PushFinderLocation", _wrap_PushFinderLocation, METH_VARARGS, (char *)"PushFinderLocation(char utf8_path)"},
   21534                 :    { (char *)"PopFinderLocation", _wrap_PopFinderLocation, METH_VARARGS, (char *)"PopFinderLocation()"},
   21535                 :    { (char *)"FinderClean", _wrap_FinderClean, METH_VARARGS, (char *)"FinderClean()"},
   21536                 :    { (char *)"FindFile", _wrap_FindFile, METH_VARARGS, (char *)"FindFile(char pszClass, char utf8_path) -> char"},
   21537                 :    { (char *)"ReadDir", _wrap_ReadDir, METH_VARARGS, (char *)"ReadDir(char utf8_path) -> char"},
   21538                 :    { (char *)"ReadDirRecursive", _wrap_ReadDirRecursive, METH_VARARGS, (char *)"ReadDirRecursive(char utf8_path) -> char"},
   21539                 :    { (char *)"SetConfigOption", _wrap_SetConfigOption, METH_VARARGS, (char *)"SetConfigOption(char pszKey, char pszValue)"},
   21540                 :    { (char *)"GetConfigOption", _wrap_GetConfigOption, METH_VARARGS, (char *)"GetConfigOption(char pszKey, char pszDefault = None) -> char"},
   21541                 :    { (char *)"CPLBinaryToHex", _wrap_CPLBinaryToHex, METH_VARARGS, (char *)"CPLBinaryToHex(int nBytes) -> retStringAndCPLFree"},
   21542                 :    { (char *)"CPLHexToBinary", _wrap_CPLHexToBinary, METH_VARARGS, (char *)"CPLHexToBinary(char pszHex, int pnBytes) -> GByte"},
   21543                 :    { (char *)"FileFromMemBuffer", _wrap_FileFromMemBuffer, METH_VARARGS, (char *)"FileFromMemBuffer(char utf8_path, int nBytes)"},
   21544                 :    { (char *)"Unlink", _wrap_Unlink, METH_VARARGS, (char *)"Unlink(char utf8_path) -> int"},
   21545                 :    { (char *)"HasThreadSupport", _wrap_HasThreadSupport, METH_VARARGS, (char *)"HasThreadSupport() -> int"},
   21546                 :    { (char *)"Mkdir", _wrap_Mkdir, METH_VARARGS, (char *)"Mkdir(char utf8_path, int mode) -> int"},
   21547                 :    { (char *)"Rmdir", _wrap_Rmdir, METH_VARARGS, (char *)"Rmdir(char utf8_path) -> int"},
   21548                 :    { (char *)"Rename", _wrap_Rename, METH_VARARGS, (char *)"Rename(char pszOld, char pszNew) -> int"},
   21549                 :    { (char *)"StatBuf_mode_get", _wrap_StatBuf_mode_get, METH_VARARGS, (char *)"StatBuf_mode_get(StatBuf self) -> int"},
   21550                 :    { (char *)"StatBuf_size_get", _wrap_StatBuf_size_get, METH_VARARGS, (char *)"StatBuf_size_get(StatBuf self) -> GIntBig"},
   21551                 :    { (char *)"StatBuf_mtime_get", _wrap_StatBuf_mtime_get, METH_VARARGS, (char *)"StatBuf_mtime_get(StatBuf self) -> GIntBig"},
   21552                 :    { (char *)"new_StatBuf", _wrap_new_StatBuf, METH_VARARGS, (char *)"new_StatBuf(StatBuf psStatBuf) -> StatBuf"},
   21553                 :    { (char *)"delete_StatBuf", _wrap_delete_StatBuf, METH_VARARGS, (char *)"delete_StatBuf(StatBuf self)"},
   21554                 :    { (char *)"StatBuf_IsDirectory", _wrap_StatBuf_IsDirectory, METH_VARARGS, (char *)"StatBuf_IsDirectory(StatBuf self) -> int"},
   21555                 :    { (char *)"StatBuf_swigregister", StatBuf_swigregister, METH_VARARGS, NULL},
   21556                 :    { (char *)"VSIStatL", _wrap_VSIStatL, METH_VARARGS, (char *)"VSIStatL(char utf8_path, int nFlags = 0) -> int"},
   21557                 :    { (char *)"VSIFOpenL", _wrap_VSIFOpenL, METH_VARARGS, (char *)"VSIFOpenL(char utf8_path, char pszMode) -> VSILFILE"},
   21558                 :    { (char *)"VSIFCloseL", _wrap_VSIFCloseL, METH_VARARGS, (char *)"VSIFCloseL(VSILFILE arg0)"},
   21559                 :    { (char *)"VSIFSeekL", _wrap_VSIFSeekL, METH_VARARGS, (char *)"VSIFSeekL(VSILFILE arg0, GIntBig arg1, int arg2) -> int"},
   21560                 :    { (char *)"VSIFTellL", _wrap_VSIFTellL, METH_VARARGS, (char *)"VSIFTellL(VSILFILE arg0) -> GIntBig"},
   21561                 :    { (char *)"VSIFTruncateL", _wrap_VSIFTruncateL, METH_VARARGS, (char *)"VSIFTruncateL(VSILFILE arg0, GIntBig arg1) -> int"},
   21562                 :    { (char *)"VSIFWriteL", _wrap_VSIFWriteL, METH_VARARGS, (char *)"VSIFWriteL(int nLen, int size, int memb, VSILFILE f) -> int"},
   21563                 :    { (char *)"MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_VARARGS, (char *)"MajorObject_GetDescription(MajorObject self) -> char"},
   21564                 :    { (char *)"MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, (char *)"MajorObject_SetDescription(MajorObject self, char pszNewDesc)"},
   21565                 :    { (char *)"MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, (char *)"MajorObject_GetMetadata_Dict(MajorObject self, char pszDomain = \"\") -> char"},
   21566                 :    { (char *)"MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, (char *)"MajorObject_GetMetadata_List(MajorObject self, char pszDomain = \"\") -> char"},
   21567                 :    { (char *)"MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, (char *)"\n"
   21568                 :     "SetMetadata(char papszMetadata, char pszDomain = \"\") -> CPLErr\n"
   21569                 :     "MajorObject_SetMetadata(MajorObject self, char pszMetadataString, char pszDomain = \"\") -> CPLErr\n"
   21570                 :     ""},
   21571                 :    { (char *)"MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, (char *)"MajorObject_GetMetadataItem(MajorObject self, char pszName, char pszDomain = \"\") -> char"},
   21572                 :    { (char *)"MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, (char *)"MajorObject_SetMetadataItem(MajorObject self, char pszName, char pszValue, char pszDomain = \"\") -> CPLErr"},
   21573                 :    { (char *)"MajorObject_swigregister", MajorObject_swigregister, METH_VARARGS, NULL},
   21574                 :    { (char *)"Driver_ShortName_get", _wrap_Driver_ShortName_get, METH_VARARGS, (char *)"Driver_ShortName_get(Driver self) -> char"},
   21575                 :    { (char *)"Driver_LongName_get", _wrap_Driver_LongName_get, METH_VARARGS, (char *)"Driver_LongName_get(Driver self) -> char"},
   21576                 :    { (char *)"Driver_HelpTopic_get", _wrap_Driver_HelpTopic_get, METH_VARARGS, (char *)"Driver_HelpTopic_get(Driver self) -> char"},
   21577                 :    { (char *)"Driver_Create", (PyCFunction) _wrap_Driver_Create, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21578                 :     "Driver_Create(Driver self, char utf8_path, int xsize, int ysize, \n"
   21579                 :     "    int bands = 1, GDALDataType eType = GDT_Byte, \n"
   21580                 :     "    char options = None) -> Dataset\n"
   21581                 :     ""},
   21582                 :    { (char *)"Driver_CreateCopy", (PyCFunction) _wrap_Driver_CreateCopy, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21583                 :     "Driver_CreateCopy(Driver self, char utf8_path, Dataset src, int strict = 1, \n"
   21584                 :     "    char options = None, GDALProgressFunc callback = None, \n"
   21585                 :     "    void callback_data = None) -> Dataset\n"
   21586                 :     ""},
   21587                 :    { (char *)"Driver_Delete", _wrap_Driver_Delete, METH_VARARGS, (char *)"Driver_Delete(Driver self, char utf8_path) -> int"},
   21588                 :    { (char *)"Driver_Rename", _wrap_Driver_Rename, METH_VARARGS, (char *)"Driver_Rename(Driver self, char newName, char oldName) -> int"},
   21589                 :    { (char *)"Driver_CopyFiles", _wrap_Driver_CopyFiles, METH_VARARGS, (char *)"Driver_CopyFiles(Driver self, char newName, char oldName) -> int"},
   21590                 :    { (char *)"Driver_Register", _wrap_Driver_Register, METH_VARARGS, (char *)"Driver_Register(Driver self) -> int"},
   21591                 :    { (char *)"Driver_Deregister", _wrap_Driver_Deregister, METH_VARARGS, (char *)"Driver_Deregister(Driver self)"},
   21592                 :    { (char *)"Driver_swigregister", Driver_swigregister, METH_VARARGS, NULL},
   21593                 :    { (char *)"ColorEntry_c1_set", _wrap_ColorEntry_c1_set, METH_VARARGS, (char *)"ColorEntry_c1_set(ColorEntry self, short c1)"},
   21594                 :    { (char *)"ColorEntry_c1_get", _wrap_ColorEntry_c1_get, METH_VARARGS, (char *)"ColorEntry_c1_get(ColorEntry self) -> short"},
   21595                 :    { (char *)"ColorEntry_c2_set", _wrap_ColorEntry_c2_set, METH_VARARGS, (char *)"ColorEntry_c2_set(ColorEntry self, short c2)"},
   21596                 :    { (char *)"ColorEntry_c2_get", _wrap_ColorEntry_c2_get, METH_VARARGS, (char *)"ColorEntry_c2_get(ColorEntry self) -> short"},
   21597                 :    { (char *)"ColorEntry_c3_set", _wrap_ColorEntry_c3_set, METH_VARARGS, (char *)"ColorEntry_c3_set(ColorEntry self, short c3)"},
   21598                 :    { (char *)"ColorEntry_c3_get", _wrap_ColorEntry_c3_get, METH_VARARGS, (char *)"ColorEntry_c3_get(ColorEntry self) -> short"},
   21599                 :    { (char *)"ColorEntry_c4_set", _wrap_ColorEntry_c4_set, METH_VARARGS, (char *)"ColorEntry_c4_set(ColorEntry self, short c4)"},
   21600                 :    { (char *)"ColorEntry_c4_get", _wrap_ColorEntry_c4_get, METH_VARARGS, (char *)"ColorEntry_c4_get(ColorEntry self) -> short"},
   21601                 :    { (char *)"new_ColorEntry", _wrap_new_ColorEntry, METH_VARARGS, (char *)"new_ColorEntry() -> ColorEntry"},
   21602                 :    { (char *)"delete_ColorEntry", _wrap_delete_ColorEntry, METH_VARARGS, (char *)"delete_ColorEntry(ColorEntry self)"},
   21603                 :    { (char *)"ColorEntry_swigregister", ColorEntry_swigregister, METH_VARARGS, NULL},
   21604                 :    { (char *)"GCP_GCPX_set", _wrap_GCP_GCPX_set, METH_VARARGS, (char *)"GCP_GCPX_set(GCP self, double GCPX)"},
   21605                 :    { (char *)"GCP_GCPX_get", _wrap_GCP_GCPX_get, METH_VARARGS, (char *)"GCP_GCPX_get(GCP self) -> double"},
   21606                 :    { (char *)"GCP_GCPY_set", _wrap_GCP_GCPY_set, METH_VARARGS, (char *)"GCP_GCPY_set(GCP self, double GCPY)"},
   21607                 :    { (char *)"GCP_GCPY_get", _wrap_GCP_GCPY_get, METH_VARARGS, (char *)"GCP_GCPY_get(GCP self) -> double"},
   21608                 :    { (char *)"GCP_GCPZ_set", _wrap_GCP_GCPZ_set, METH_VARARGS, (char *)"GCP_GCPZ_set(GCP self, double GCPZ)"},
   21609                 :    { (char *)"GCP_GCPZ_get", _wrap_GCP_GCPZ_get, METH_VARARGS, (char *)"GCP_GCPZ_get(GCP self) -> double"},
   21610                 :    { (char *)"GCP_GCPPixel_set", _wrap_GCP_GCPPixel_set, METH_VARARGS, (char *)"GCP_GCPPixel_set(GCP self, double GCPPixel)"},
   21611                 :    { (char *)"GCP_GCPPixel_get", _wrap_GCP_GCPPixel_get, METH_VARARGS, (char *)"GCP_GCPPixel_get(GCP self) -> double"},
   21612                 :    { (char *)"GCP_GCPLine_set", _wrap_GCP_GCPLine_set, METH_VARARGS, (char *)"GCP_GCPLine_set(GCP self, double GCPLine)"},
   21613                 :    { (char *)"GCP_GCPLine_get", _wrap_GCP_GCPLine_get, METH_VARARGS, (char *)"GCP_GCPLine_get(GCP self) -> double"},
   21614                 :    { (char *)"GCP_Info_set", _wrap_GCP_Info_set, METH_VARARGS, (char *)"GCP_Info_set(GCP self, char Info)"},
   21615                 :    { (char *)"GCP_Info_get", _wrap_GCP_Info_get, METH_VARARGS, (char *)"GCP_Info_get(GCP self) -> char"},
   21616                 :    { (char *)"GCP_Id_set", _wrap_GCP_Id_set, METH_VARARGS, (char *)"GCP_Id_set(GCP self, char Id)"},
   21617                 :    { (char *)"GCP_Id_get", _wrap_GCP_Id_get, METH_VARARGS, (char *)"GCP_Id_get(GCP self) -> char"},
   21618                 :    { (char *)"new_GCP", _wrap_new_GCP, METH_VARARGS, (char *)"\n"
   21619                 :     "new_GCP(double x = 0.0, double y = 0.0, double z = 0.0, double pixel = 0.0, \n"
   21620                 :     "    double line = 0.0, char info = \"\", \n"
   21621                 :     "    char id = \"\") -> GCP\n"
   21622                 :     ""},
   21623                 :    { (char *)"delete_GCP", _wrap_delete_GCP, METH_VARARGS, (char *)"delete_GCP(GCP self)"},
   21624                 :    { (char *)"GCP_swigregister", GCP_swigregister, METH_VARARGS, NULL},
   21625                 :    { (char *)"GDAL_GCP_GCPX_get", _wrap_GDAL_GCP_GCPX_get, METH_VARARGS, (char *)"GDAL_GCP_GCPX_get(GCP gcp) -> double"},
   21626                 :    { (char *)"GDAL_GCP_GCPX_set", _wrap_GDAL_GCP_GCPX_set, METH_VARARGS, (char *)"GDAL_GCP_GCPX_set(GCP gcp, double dfGCPX)"},
   21627                 :    { (char *)"GDAL_GCP_GCPY_get", _wrap_GDAL_GCP_GCPY_get, METH_VARARGS, (char *)"GDAL_GCP_GCPY_get(GCP gcp) -> double"},
   21628                 :    { (char *)"GDAL_GCP_GCPY_set", _wrap_GDAL_GCP_GCPY_set, METH_VARARGS, (char *)"GDAL_GCP_GCPY_set(GCP gcp, double dfGCPY)"},
   21629                 :    { (char *)"GDAL_GCP_GCPZ_get", _wrap_GDAL_GCP_GCPZ_get, METH_VARARGS, (char *)"GDAL_GCP_GCPZ_get(GCP gcp) -> double"},
   21630                 :    { (char *)"GDAL_GCP_GCPZ_set", _wrap_GDAL_GCP_GCPZ_set, METH_VARARGS, (char *)"GDAL_GCP_GCPZ_set(GCP gcp, double dfGCPZ)"},
   21631                 :    { (char *)"GDAL_GCP_GCPPixel_get", _wrap_GDAL_GCP_GCPPixel_get, METH_VARARGS, (char *)"GDAL_GCP_GCPPixel_get(GCP gcp) -> double"},
   21632                 :    { (char *)"GDAL_GCP_GCPPixel_set", _wrap_GDAL_GCP_GCPPixel_set, METH_VARARGS, (char *)"GDAL_GCP_GCPPixel_set(GCP gcp, double dfGCPPixel)"},
   21633                 :    { (char *)"GDAL_GCP_GCPLine_get", _wrap_GDAL_GCP_GCPLine_get, METH_VARARGS, (char *)"GDAL_GCP_GCPLine_get(GCP gcp) -> double"},
   21634                 :    { (char *)"GDAL_GCP_GCPLine_set", _wrap_GDAL_GCP_GCPLine_set, METH_VARARGS, (char *)"GDAL_GCP_GCPLine_set(GCP gcp, double dfGCPLine)"},
   21635                 :    { (char *)"GDAL_GCP_Info_get", _wrap_GDAL_GCP_Info_get, METH_VARARGS, (char *)"GDAL_GCP_Info_get(GCP gcp) -> char"},
   21636                 :    { (char *)"GDAL_GCP_Info_set", _wrap_GDAL_GCP_Info_set, METH_VARARGS, (char *)"GDAL_GCP_Info_set(GCP gcp, char pszInfo)"},
   21637                 :    { (char *)"GDAL_GCP_Id_get", _wrap_GDAL_GCP_Id_get, METH_VARARGS, (char *)"GDAL_GCP_Id_get(GCP gcp) -> char"},
   21638                 :    { (char *)"GDAL_GCP_Id_set", _wrap_GDAL_GCP_Id_set, METH_VARARGS, (char *)"GDAL_GCP_Id_set(GCP gcp, char pszId)"},
   21639                 :    { (char *)"GDAL_GCP_get_GCPX", _wrap_GDAL_GCP_get_GCPX, METH_VARARGS, (char *)"GDAL_GCP_get_GCPX(GCP gcp) -> double"},
   21640                 :    { (char *)"GDAL_GCP_set_GCPX", _wrap_GDAL_GCP_set_GCPX, METH_VARARGS, (char *)"GDAL_GCP_set_GCPX(GCP gcp, double dfGCPX)"},
   21641                 :    { (char *)"GDAL_GCP_get_GCPY", _wrap_GDAL_GCP_get_GCPY, METH_VARARGS, (char *)"GDAL_GCP_get_GCPY(GCP gcp) -> double"},
   21642                 :    { (char *)"GDAL_GCP_set_GCPY", _wrap_GDAL_GCP_set_GCPY, METH_VARARGS, (char *)"GDAL_GCP_set_GCPY(GCP gcp, double dfGCPY)"},
   21643                 :    { (char *)"GDAL_GCP_get_GCPZ", _wrap_GDAL_GCP_get_GCPZ, METH_VARARGS, (char *)"GDAL_GCP_get_GCPZ(GCP gcp) -> double"},
   21644                 :    { (char *)"GDAL_GCP_set_GCPZ", _wrap_GDAL_GCP_set_GCPZ, METH_VARARGS, (char *)"GDAL_GCP_set_GCPZ(GCP gcp, double dfGCPZ)"},
   21645                 :    { (char *)"GDAL_GCP_get_GCPPixel", _wrap_GDAL_GCP_get_GCPPixel, METH_VARARGS, (char *)"GDAL_GCP_get_GCPPixel(GCP gcp) -> double"},
   21646                 :    { (char *)"GDAL_GCP_set_GCPPixel", _wrap_GDAL_GCP_set_GCPPixel, METH_VARARGS, (char *)"GDAL_GCP_set_GCPPixel(GCP gcp, double dfGCPPixel)"},
   21647                 :    { (char *)"GDAL_GCP_get_GCPLine", _wrap_GDAL_GCP_get_GCPLine, METH_VARARGS, (char *)"GDAL_GCP_get_GCPLine(GCP gcp) -> double"},
   21648                 :    { (char *)"GDAL_GCP_set_GCPLine", _wrap_GDAL_GCP_set_GCPLine, METH_VARARGS, (char *)"GDAL_GCP_set_GCPLine(GCP gcp, double dfGCPLine)"},
   21649                 :    { (char *)"GDAL_GCP_get_Info", _wrap_GDAL_GCP_get_Info, METH_VARARGS, (char *)"GDAL_GCP_get_Info(GCP gcp) -> char"},
   21650                 :    { (char *)"GDAL_GCP_set_Info", _wrap_GDAL_GCP_set_Info, METH_VARARGS, (char *)"GDAL_GCP_set_Info(GCP gcp, char pszInfo)"},
   21651                 :    { (char *)"GDAL_GCP_get_Id", _wrap_GDAL_GCP_get_Id, METH_VARARGS, (char *)"GDAL_GCP_get_Id(GCP gcp) -> char"},
   21652                 :    { (char *)"GDAL_GCP_set_Id", _wrap_GDAL_GCP_set_Id, METH_VARARGS, (char *)"GDAL_GCP_set_Id(GCP gcp, char pszId)"},
   21653                 :    { (char *)"GCPsToGeoTransform", _wrap_GCPsToGeoTransform, METH_VARARGS, (char *)"GCPsToGeoTransform(int nGCPs, int bApproxOK = 1) -> RETURN_NONE"},
   21654                 :    { (char *)"delete_AsyncReader", _wrap_delete_AsyncReader, METH_VARARGS, (char *)"delete_AsyncReader(AsyncReader self)"},
   21655                 :    { (char *)"AsyncReader_GetNextUpdatedRegion", _wrap_AsyncReader_GetNextUpdatedRegion, METH_VARARGS, (char *)"AsyncReader_GetNextUpdatedRegion(AsyncReader self, double timeout) -> GDALAsyncStatusType"},
   21656                 :    { (char *)"AsyncReader_GetBuffer", _wrap_AsyncReader_GetBuffer, METH_VARARGS, (char *)"AsyncReader_GetBuffer(AsyncReader self)"},
   21657                 :    { (char *)"AsyncReader_LockBuffer", _wrap_AsyncReader_LockBuffer, METH_VARARGS, (char *)"AsyncReader_LockBuffer(AsyncReader self, double timeout) -> int"},
   21658                 :    { (char *)"AsyncReader_UnlockBuffer", _wrap_AsyncReader_UnlockBuffer, METH_VARARGS, (char *)"AsyncReader_UnlockBuffer(AsyncReader self)"},
   21659                 :    { (char *)"AsyncReader_swigregister", AsyncReader_swigregister, METH_VARARGS, NULL},
   21660                 :    { (char *)"Dataset_RasterXSize_get", _wrap_Dataset_RasterXSize_get, METH_VARARGS, (char *)"Dataset_RasterXSize_get(Dataset self) -> int"},
   21661                 :    { (char *)"Dataset_RasterYSize_get", _wrap_Dataset_RasterYSize_get, METH_VARARGS, (char *)"Dataset_RasterYSize_get(Dataset self) -> int"},
   21662                 :    { (char *)"Dataset_RasterCount_get", _wrap_Dataset_RasterCount_get, METH_VARARGS, (char *)"Dataset_RasterCount_get(Dataset self) -> int"},
   21663                 :    { (char *)"delete_Dataset", _wrap_delete_Dataset, METH_VARARGS, (char *)"delete_Dataset(Dataset self)"},
   21664                 :    { (char *)"Dataset_GetDriver", _wrap_Dataset_GetDriver, METH_VARARGS, (char *)"Dataset_GetDriver(Dataset self) -> Driver"},
   21665                 :    { (char *)"Dataset_GetRasterBand", _wrap_Dataset_GetRasterBand, METH_VARARGS, (char *)"Dataset_GetRasterBand(Dataset self, int nBand) -> Band"},
   21666                 :    { (char *)"Dataset_GetProjection", _wrap_Dataset_GetProjection, METH_VARARGS, (char *)"Dataset_GetProjection(Dataset self) -> char"},
   21667                 :    { (char *)"Dataset_GetProjectionRef", _wrap_Dataset_GetProjectionRef, METH_VARARGS, (char *)"Dataset_GetProjectionRef(Dataset self) -> char"},
   21668                 :    { (char *)"Dataset_SetProjection", _wrap_Dataset_SetProjection, METH_VARARGS, (char *)"Dataset_SetProjection(Dataset self, char prj) -> CPLErr"},
   21669                 :    { (char *)"Dataset_GetGeoTransform", (PyCFunction) _wrap_Dataset_GetGeoTransform, METH_VARARGS | METH_KEYWORDS, (char *)"Dataset_GetGeoTransform(Dataset self, int can_return_null = None)"},
   21670                 :    { (char *)"Dataset_SetGeoTransform", _wrap_Dataset_SetGeoTransform, METH_VARARGS, (char *)"Dataset_SetGeoTransform(Dataset self, double argin) -> CPLErr"},
   21671                 :    { (char *)"Dataset_BuildOverviews", (PyCFunction) _wrap_Dataset_BuildOverviews, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21672                 :     "Dataset_BuildOverviews(Dataset self, char resampling = \"NEAREST\", int overviewlist = 0, \n"
   21673                 :     "    GDALProgressFunc callback = None, \n"
   21674                 :     "    void callback_data = None) -> int\n"
   21675                 :     ""},
   21676                 :    { (char *)"Dataset_GetGCPCount", _wrap_Dataset_GetGCPCount, METH_VARARGS, (char *)"Dataset_GetGCPCount(Dataset self) -> int"},
   21677                 :    { (char *)"Dataset_GetGCPProjection", _wrap_Dataset_GetGCPProjection, METH_VARARGS, (char *)"Dataset_GetGCPProjection(Dataset self) -> char"},
   21678                 :    { (char *)"Dataset_GetGCPs", _wrap_Dataset_GetGCPs, METH_VARARGS, (char *)"Dataset_GetGCPs(Dataset self)"},
   21679                 :    { (char *)"Dataset_SetGCPs", _wrap_Dataset_SetGCPs, METH_VARARGS, (char *)"Dataset_SetGCPs(Dataset self, int nGCPs, char pszGCPProjection) -> CPLErr"},
   21680                 :    { (char *)"Dataset_FlushCache", _wrap_Dataset_FlushCache, METH_VARARGS, (char *)"Dataset_FlushCache(Dataset self)"},
   21681                 :    { (char *)"Dataset_AddBand", (PyCFunction) _wrap_Dataset_AddBand, METH_VARARGS | METH_KEYWORDS, (char *)"Dataset_AddBand(Dataset self, GDALDataType datatype = GDT_Byte, char options = None) -> CPLErr"},
   21682                 :    { (char *)"Dataset_CreateMaskBand", _wrap_Dataset_CreateMaskBand, METH_VARARGS, (char *)"Dataset_CreateMaskBand(Dataset self, int nFlags) -> CPLErr"},
   21683                 :    { (char *)"Dataset_GetFileList", _wrap_Dataset_GetFileList, METH_VARARGS, (char *)"Dataset_GetFileList(Dataset self) -> char"},
   21684                 :    { (char *)"Dataset_WriteRaster", (PyCFunction) _wrap_Dataset_WriteRaster, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21685                 :     "Dataset_WriteRaster(Dataset self, int xoff, int yoff, int xsize, int ysize, \n"
   21686                 :     "    GIntBig buf_len, int buf_xsize = None, int buf_ysize = None, \n"
   21687                 :     "    GDALDataType buf_type = None, \n"
   21688                 :     "    int band_list = 0, int buf_pixel_space = None, \n"
   21689                 :     "    int buf_line_space = None, int buf_band_space = None) -> CPLErr\n"
   21690                 :     ""},
   21691                 :    { (char *)"Dataset_BeginAsyncReader", (PyCFunction) _wrap_Dataset_BeginAsyncReader, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21692                 :     "Dataset_BeginAsyncReader(Dataset self, int xOff, int yOff, int xSize, int ySize, \n"
   21693                 :     "    int buf_len, int buf_xsize, int buf_ysize, \n"
   21694                 :     "    GDALDataType bufType = (GDALDataType) 0, int band_list = 0, \n"
   21695                 :     "    int nPixelSpace = 0, int nLineSpace = 0, \n"
   21696                 :     "    int nBandSpace = 0, char options = None) -> AsyncReader\n"
   21697                 :     ""},
   21698                 :    { (char *)"Dataset_EndAsyncReader", _wrap_Dataset_EndAsyncReader, METH_VARARGS, (char *)"Dataset_EndAsyncReader(Dataset self, AsyncReader ario)"},
   21699                 :    { (char *)"Dataset_ReadRaster1", (PyCFunction) _wrap_Dataset_ReadRaster1, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21700                 :     "Dataset_ReadRaster1(Dataset self, int xoff, int yoff, int xsize, int ysize, \n"
   21701                 :     "    int buf_xsize = None, int buf_ysize = None, \n"
   21702                 :     "    GDALDataType buf_type = None, int band_list = 0, \n"
   21703                 :     "    int buf_pixel_space = None, int buf_line_space = None, \n"
   21704                 :     "    int buf_band_space = None) -> CPLErr\n"
   21705                 :     ""},
   21706                 :    { (char *)"Dataset_swigregister", Dataset_swigregister, METH_VARARGS, NULL},
   21707                 :    { (char *)"Band_XSize_get", _wrap_Band_XSize_get, METH_VARARGS, (char *)"Band_XSize_get(Band self) -> int"},
   21708                 :    { (char *)"Band_YSize_get", _wrap_Band_YSize_get, METH_VARARGS, (char *)"Band_YSize_get(Band self) -> int"},
   21709                 :    { (char *)"Band_DataType_get", _wrap_Band_DataType_get, METH_VARARGS, (char *)"Band_DataType_get(Band self) -> GDALDataType"},
   21710                 :    { (char *)"Band_GetBand", _wrap_Band_GetBand, METH_VARARGS, (char *)"Band_GetBand(Band self) -> int"},
   21711                 :    { (char *)"Band_GetBlockSize", _wrap_Band_GetBlockSize, METH_VARARGS, (char *)"Band_GetBlockSize(Band self)"},
   21712                 :    { (char *)"Band_GetColorInterpretation", _wrap_Band_GetColorInterpretation, METH_VARARGS, (char *)"Band_GetColorInterpretation(Band self) -> GDALColorInterp"},
   21713                 :    { (char *)"Band_GetRasterColorInterpretation", _wrap_Band_GetRasterColorInterpretation, METH_VARARGS, (char *)"Band_GetRasterColorInterpretation(Band self) -> GDALColorInterp"},
   21714                 :    { (char *)"Band_SetColorInterpretation", _wrap_Band_SetColorInterpretation, METH_VARARGS, (char *)"Band_SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr"},
   21715                 :    { (char *)"Band_SetRasterColorInterpretation", _wrap_Band_SetRasterColorInterpretation, METH_VARARGS, (char *)"Band_SetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr"},
   21716                 :    { (char *)"Band_GetNoDataValue", _wrap_Band_GetNoDataValue, METH_VARARGS, (char *)"Band_GetNoDataValue(Band self)"},
   21717                 :    { (char *)"Band_SetNoDataValue", _wrap_Band_SetNoDataValue, METH_VARARGS, (char *)"Band_SetNoDataValue(Band self, double d) -> CPLErr"},
   21718                 :    { (char *)"Band_GetUnitType", _wrap_Band_GetUnitType, METH_VARARGS, (char *)"Band_GetUnitType(Band self) -> char"},
   21719                 :    { (char *)"Band_SetUnitType", _wrap_Band_SetUnitType, METH_VARARGS, (char *)"Band_SetUnitType(Band self, char val) -> CPLErr"},
   21720                 :    { (char *)"Band_GetRasterCategoryNames", _wrap_Band_GetRasterCategoryNames, METH_VARARGS, (char *)"Band_GetRasterCategoryNames(Band self) -> char"},
   21721                 :    { (char *)"Band_SetRasterCategoryNames", _wrap_Band_SetRasterCategoryNames, METH_VARARGS, (char *)"Band_SetRasterCategoryNames(Band self, char names) -> CPLErr"},
   21722                 :    { (char *)"Band_GetMinimum", _wrap_Band_GetMinimum, METH_VARARGS, (char *)"Band_GetMinimum(Band self)"},
   21723                 :    { (char *)"Band_GetMaximum", _wrap_Band_GetMaximum, METH_VARARGS, (char *)"Band_GetMaximum(Band self)"},
   21724                 :    { (char *)"Band_GetOffset", _wrap_Band_GetOffset, METH_VARARGS, (char *)"Band_GetOffset(Band self)"},
   21725                 :    { (char *)"Band_GetScale", _wrap_Band_GetScale, METH_VARARGS, (char *)"Band_GetScale(Band self)"},
   21726                 :    { (char *)"Band_SetOffset", _wrap_Band_SetOffset, METH_VARARGS, (char *)"Band_SetOffset(Band self, double val) -> CPLErr"},
   21727                 :    { (char *)"Band_SetScale", _wrap_Band_SetScale, METH_VARARGS, (char *)"Band_SetScale(Band self, double val) -> CPLErr"},
   21728                 :    { (char *)"Band_GetStatistics", _wrap_Band_GetStatistics, METH_VARARGS, (char *)"Band_GetStatistics(Band self, int approx_ok, int force) -> CPLErr"},
   21729                 :    { (char *)"Band_ComputeStatistics", _wrap_Band_ComputeStatistics, METH_VARARGS, (char *)"\n"
   21730                 :     "Band_ComputeStatistics(Band self, bool approx_ok, GDALProgressFunc callback = None, \n"
   21731                 :     "    void callback_data = None) -> CPLErr\n"
   21732                 :     ""},
   21733                 :    { (char *)"Band_SetStatistics", _wrap_Band_SetStatistics, METH_VARARGS, (char *)"Band_SetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr"},
   21734                 :    { (char *)"Band_GetOverviewCount", _wrap_Band_GetOverviewCount, METH_VARARGS, (char *)"Band_GetOverviewCount(Band self) -> int"},
   21735                 :    { (char *)"Band_GetOverview", _wrap_Band_GetOverview, METH_VARARGS, (char *)"Band_GetOverview(Band self, int i) -> Band"},
   21736                 :    { (char *)"Band_Checksum", (PyCFunction) _wrap_Band_Checksum, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21737                 :     "Band_Checksum(Band self, int xoff = 0, int yoff = 0, int xsize = None, \n"
   21738                 :     "    int ysize = None) -> int\n"
   21739                 :     ""},
   21740                 :    { (char *)"Band_ComputeRasterMinMax", _wrap_Band_ComputeRasterMinMax, METH_VARARGS, (char *)"Band_ComputeRasterMinMax(Band self, int approx_ok = 0)"},
   21741                 :    { (char *)"Band_ComputeBandStats", _wrap_Band_ComputeBandStats, METH_VARARGS, (char *)"Band_ComputeBandStats(Band self, int samplestep = 1)"},
   21742                 :    { (char *)"Band_Fill", _wrap_Band_Fill, METH_VARARGS, (char *)"Band_Fill(Band self, double real_fill, double imag_fill = 0.0) -> CPLErr"},
   21743                 :    { (char *)"Band_WriteRaster", (PyCFunction) _wrap_Band_WriteRaster, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21744                 :     "Band_WriteRaster(Band self, int xoff, int yoff, int xsize, int ysize, \n"
   21745                 :     "    GIntBig buf_len, int buf_xsize = None, int buf_ysize = None, \n"
   21746                 :     "    int buf_type = None, int buf_pixel_space = None, \n"
   21747                 :     "    int buf_line_space = None) -> CPLErr\n"
   21748                 :     ""},
   21749                 :    { (char *)"Band_FlushCache", _wrap_Band_FlushCache, METH_VARARGS, (char *)"Band_FlushCache(Band self)"},
   21750                 :    { (char *)"Band_GetRasterColorTable", _wrap_Band_GetRasterColorTable, METH_VARARGS, (char *)"Band_GetRasterColorTable(Band self) -> ColorTable"},
   21751                 :    { (char *)"Band_GetColorTable", _wrap_Band_GetColorTable, METH_VARARGS, (char *)"Band_GetColorTable(Band self) -> ColorTable"},
   21752                 :    { (char *)"Band_SetRasterColorTable", _wrap_Band_SetRasterColorTable, METH_VARARGS, (char *)"Band_SetRasterColorTable(Band self, ColorTable arg) -> int"},
   21753                 :    { (char *)"Band_SetColorTable", _wrap_Band_SetColorTable, METH_VARARGS, (char *)"Band_SetColorTable(Band self, ColorTable arg) -> int"},
   21754                 :    { (char *)"Band_GetDefaultRAT", _wrap_Band_GetDefaultRAT, METH_VARARGS, (char *)"Band_GetDefaultRAT(Band self) -> RasterAttributeTable"},
   21755                 :    { (char *)"Band_SetDefaultRAT", _wrap_Band_SetDefaultRAT, METH_VARARGS, (char *)"Band_SetDefaultRAT(Band self, RasterAttributeTable table) -> int"},
   21756                 :    { (char *)"Band_GetMaskBand", _wrap_Band_GetMaskBand, METH_VARARGS, (char *)"Band_GetMaskBand(Band self) -> Band"},
   21757                 :    { (char *)"Band_GetMaskFlags", _wrap_Band_GetMaskFlags, METH_VARARGS, (char *)"Band_GetMaskFlags(Band self) -> int"},
   21758                 :    { (char *)"Band_CreateMaskBand", _wrap_Band_CreateMaskBand, METH_VARARGS, (char *)"Band_CreateMaskBand(Band self, int nFlags) -> CPLErr"},
   21759                 :    { (char *)"Band_GetHistogram", (PyCFunction) _wrap_Band_GetHistogram, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21760                 :     "Band_GetHistogram(Band self, double min = -0.5, double max = 255.5, int buckets = 256, \n"
   21761                 :     "    int include_out_of_range = 0, \n"
   21762                 :     "    int approx_ok = 1, GDALProgressFunc callback = None, \n"
   21763                 :     "    void callback_data = None) -> CPLErr\n"
   21764                 :     ""},
   21765                 :    { (char *)"Band_GetDefaultHistogram", (PyCFunction) _wrap_Band_GetDefaultHistogram, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21766                 :     "Band_GetDefaultHistogram(Band self, double min_ret = None, double max_ret = None, \n"
   21767                 :     "    int buckets_ret = None, int ppanHistogram = None, \n"
   21768                 :     "    int force = 1, GDALProgressFunc callback = None, \n"
   21769                 :     "    void callback_data = None) -> CPLErr\n"
   21770                 :     ""},
   21771                 :    { (char *)"Band_SetDefaultHistogram", _wrap_Band_SetDefaultHistogram, METH_VARARGS, (char *)"Band_SetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr"},
   21772                 :    { (char *)"Band_HasArbitraryOverviews", _wrap_Band_HasArbitraryOverviews, METH_VARARGS, (char *)"Band_HasArbitraryOverviews(Band self) -> bool"},
   21773                 :    { (char *)"Band_GetCategoryNames", _wrap_Band_GetCategoryNames, METH_VARARGS, (char *)"Band_GetCategoryNames(Band self) -> char"},
   21774                 :    { (char *)"Band_SetCategoryNames", _wrap_Band_SetCategoryNames, METH_VARARGS, (char *)"Band_SetCategoryNames(Band self, char papszCategoryNames) -> CPLErr"},
   21775                 :    { (char *)"Band_ReadRaster1", (PyCFunction) _wrap_Band_ReadRaster1, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21776                 :     "Band_ReadRaster1(Band self, int xoff, int yoff, int xsize, int ysize, \n"
   21777                 :     "    int buf_xsize = None, int buf_ysize = None, \n"
   21778                 :     "    int buf_type = None, int buf_pixel_space = None, \n"
   21779                 :     "    int buf_line_space = None) -> CPLErr\n"
   21780                 :     ""},
   21781                 :    { (char *)"Band_ReadBlock", (PyCFunction) _wrap_Band_ReadBlock, METH_VARARGS | METH_KEYWORDS, (char *)"Band_ReadBlock(Band self, int xoff, int yoff) -> CPLErr"},
   21782                 :    { (char *)"Band_swigregister", Band_swigregister, METH_VARARGS, NULL},
   21783                 :    { (char *)"new_ColorTable", (PyCFunction) _wrap_new_ColorTable, METH_VARARGS | METH_KEYWORDS, (char *)"new_ColorTable(GDALPaletteInterp palette = GPI_RGB) -> ColorTable"},
   21784                 :    { (char *)"delete_ColorTable", _wrap_delete_ColorTable, METH_VARARGS, (char *)"delete_ColorTable(ColorTable self)"},
   21785                 :    { (char *)"ColorTable_Clone", _wrap_ColorTable_Clone, METH_VARARGS, (char *)"ColorTable_Clone(ColorTable self) -> ColorTable"},
   21786                 :    { (char *)"ColorTable_GetPaletteInterpretation", _wrap_ColorTable_GetPaletteInterpretation, METH_VARARGS, (char *)"ColorTable_GetPaletteInterpretation(ColorTable self) -> GDALPaletteInterp"},
   21787                 :    { (char *)"ColorTable_GetCount", _wrap_ColorTable_GetCount, METH_VARARGS, (char *)"ColorTable_GetCount(ColorTable self) -> int"},
   21788                 :    { (char *)"ColorTable_GetColorEntry", _wrap_ColorTable_GetColorEntry, METH_VARARGS, (char *)"ColorTable_GetColorEntry(ColorTable self, int entry) -> ColorEntry"},
   21789                 :    { (char *)"ColorTable_GetColorEntryAsRGB", _wrap_ColorTable_GetColorEntryAsRGB, METH_VARARGS, (char *)"ColorTable_GetColorEntryAsRGB(ColorTable self, int entry, ColorEntry centry) -> int"},
   21790                 :    { (char *)"ColorTable_SetColorEntry", _wrap_ColorTable_SetColorEntry, METH_VARARGS, (char *)"ColorTable_SetColorEntry(ColorTable self, int entry, ColorEntry centry)"},
   21791                 :    { (char *)"ColorTable_CreateColorRamp", _wrap_ColorTable_CreateColorRamp, METH_VARARGS, (char *)"\n"
   21792                 :     "ColorTable_CreateColorRamp(ColorTable self, int nStartIndex, ColorEntry startcolor, \n"
   21793                 :     "    int nEndIndex, ColorEntry endcolor)\n"
   21794                 :     ""},
   21795                 :    { (char *)"ColorTable_swigregister", ColorTable_swigregister, METH_VARARGS, NULL},
   21796                 :    { (char *)"new_RasterAttributeTable", _wrap_new_RasterAttributeTable, METH_VARARGS, (char *)"new_RasterAttributeTable() -> RasterAttributeTable"},
   21797                 :    { (char *)"delete_RasterAttributeTable", _wrap_delete_RasterAttributeTable, METH_VARARGS, (char *)"delete_RasterAttributeTable(RasterAttributeTable self)"},
   21798                 :    { (char *)"RasterAttributeTable_Clone", _wrap_RasterAttributeTable_Clone, METH_VARARGS, (char *)"RasterAttributeTable_Clone(RasterAttributeTable self) -> RasterAttributeTable"},
   21799                 :    { (char *)"RasterAttributeTable_GetColumnCount", _wrap_RasterAttributeTable_GetColumnCount, METH_VARARGS, (char *)"RasterAttributeTable_GetColumnCount(RasterAttributeTable self) -> int"},
   21800                 :    { (char *)"RasterAttributeTable_GetNameOfCol", _wrap_RasterAttributeTable_GetNameOfCol, METH_VARARGS, (char *)"RasterAttributeTable_GetNameOfCol(RasterAttributeTable self, int iCol) -> char"},
   21801                 :    { (char *)"RasterAttributeTable_GetUsageOfCol", _wrap_RasterAttributeTable_GetUsageOfCol, METH_VARARGS, (char *)"RasterAttributeTable_GetUsageOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldUsage"},
   21802                 :    { (char *)"RasterAttributeTable_GetTypeOfCol", _wrap_RasterAttributeTable_GetTypeOfCol, METH_VARARGS, (char *)"RasterAttributeTable_GetTypeOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldType"},
   21803                 :    { (char *)"RasterAttributeTable_GetColOfUsage", _wrap_RasterAttributeTable_GetColOfUsage, METH_VARARGS, (char *)"RasterAttributeTable_GetColOfUsage(RasterAttributeTable self, GDALRATFieldUsage eUsage) -> int"},
   21804                 :    { (char *)"RasterAttributeTable_GetRowCount", _wrap_RasterAttributeTable_GetRowCount, METH_VARARGS, (char *)"RasterAttributeTable_GetRowCount(RasterAttributeTable self) -> int"},
   21805                 :    { (char *)"RasterAttributeTable_GetValueAsString", _wrap_RasterAttributeTable_GetValueAsString, METH_VARARGS, (char *)"RasterAttributeTable_GetValueAsString(RasterAttributeTable self, int iRow, int iCol) -> char"},
   21806                 :    { (char *)"RasterAttributeTable_GetValueAsInt", _wrap_RasterAttributeTable_GetValueAsInt, METH_VARARGS, (char *)"RasterAttributeTable_GetValueAsInt(RasterAttributeTable self, int iRow, int iCol) -> int"},
   21807                 :    { (char *)"RasterAttributeTable_GetValueAsDouble", _wrap_RasterAttributeTable_GetValueAsDouble, METH_VARARGS, (char *)"RasterAttributeTable_GetValueAsDouble(RasterAttributeTable self, int iRow, int iCol) -> double"},
   21808                 :    { (char *)"RasterAttributeTable_SetValueAsString", _wrap_RasterAttributeTable_SetValueAsString, METH_VARARGS, (char *)"RasterAttributeTable_SetValueAsString(RasterAttributeTable self, int iRow, int iCol, char pszValue)"},
   21809                 :    { (char *)"RasterAttributeTable_SetValueAsInt", _wrap_RasterAttributeTable_SetValueAsInt, METH_VARARGS, (char *)"RasterAttributeTable_SetValueAsInt(RasterAttributeTable self, int iRow, int iCol, int nValue)"},
   21810                 :    { (char *)"RasterAttributeTable_SetValueAsDouble", _wrap_RasterAttributeTable_SetValueAsDouble, METH_VARARGS, (char *)"RasterAttributeTable_SetValueAsDouble(RasterAttributeTable self, int iRow, int iCol, double dfValue)"},
   21811                 :    { (char *)"RasterAttributeTable_SetRowCount", _wrap_RasterAttributeTable_SetRowCount, METH_VARARGS, (char *)"RasterAttributeTable_SetRowCount(RasterAttributeTable self, int nCount)"},
   21812                 :    { (char *)"RasterAttributeTable_CreateColumn", _wrap_RasterAttributeTable_CreateColumn, METH_VARARGS, (char *)"\n"
   21813                 :     "RasterAttributeTable_CreateColumn(RasterAttributeTable self, char pszName, GDALRATFieldType eType, \n"
   21814                 :     "    GDALRATFieldUsage eUsage) -> int\n"
   21815                 :     ""},
   21816                 :    { (char *)"RasterAttributeTable_GetLinearBinning", _wrap_RasterAttributeTable_GetLinearBinning, METH_VARARGS, (char *)"RasterAttributeTable_GetLinearBinning(RasterAttributeTable self) -> bool"},
   21817                 :    { (char *)"RasterAttributeTable_SetLinearBinning", _wrap_RasterAttributeTable_SetLinearBinning, METH_VARARGS, (char *)"RasterAttributeTable_SetLinearBinning(RasterAttributeTable self, double dfRow0Min, double dfBinSize) -> int"},
   21818                 :    { (char *)"RasterAttributeTable_GetRowOfValue", _wrap_RasterAttributeTable_GetRowOfValue, METH_VARARGS, (char *)"RasterAttributeTable_GetRowOfValue(RasterAttributeTable self, double dfValue) -> int"},
   21819                 :    { (char *)"RasterAttributeTable_swigregister", RasterAttributeTable_swigregister, METH_VARARGS, NULL},
   21820                 :    { (char *)"TermProgress_nocb", (PyCFunction) _wrap_TermProgress_nocb, METH_VARARGS | METH_KEYWORDS, (char *)"TermProgress_nocb(double dfProgress, char pszMessage = None, void pData = None) -> int"},
   21821                 :    { (char *)"ComputeMedianCutPCT", (PyCFunction) _wrap_ComputeMedianCutPCT, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21822                 :     "ComputeMedianCutPCT(Band red, Band green, Band blue, int num_colors, ColorTable colors, \n"
   21823                 :     "    GDALProgressFunc callback = None, \n"
   21824                 :     "    void callback_data = None) -> int\n"
   21825                 :     ""},
   21826                 :    { (char *)"DitherRGB2PCT", (PyCFunction) _wrap_DitherRGB2PCT, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21827                 :     "DitherRGB2PCT(Band red, Band green, Band blue, Band target, ColorTable colors, \n"
   21828                 :     "    GDALProgressFunc callback = None, \n"
   21829                 :     "    void callback_data = None) -> int\n"
   21830                 :     ""},
   21831                 :    { (char *)"ReprojectImage", _wrap_ReprojectImage, METH_VARARGS, (char *)"\n"
   21832                 :     "ReprojectImage(Dataset src_ds, Dataset dst_ds, char src_wkt = None, \n"
   21833                 :     "    char dst_wkt = None, GDALResampleAlg eResampleAlg = GRA_NearestNeighbour, \n"
   21834                 :     "    double WarpMemoryLimit = 0.0, \n"
   21835                 :     "    double maxerror = 0.0, GDALProgressFunc callback = None, \n"
   21836                 :     "    void callback_data = None) -> CPLErr\n"
   21837                 :     ""},
   21838                 :    { (char *)"ComputeProximity", (PyCFunction) _wrap_ComputeProximity, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21839                 :     "ComputeProximity(Band srcBand, Band proximityBand, char options = None, \n"
   21840                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21841                 :     ""},
   21842                 :    { (char *)"RasterizeLayer", (PyCFunction) _wrap_RasterizeLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21843                 :     "RasterizeLayer(Dataset dataset, int bands, OGRLayerShadow layer, void pfnTransformer = None, \n"
   21844                 :     "    void pTransformArg = None, \n"
   21845                 :     "    int burn_values = 0, char options = None, \n"
   21846                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21847                 :     ""},
   21848                 :    { (char *)"Polygonize", (PyCFunction) _wrap_Polygonize, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21849                 :     "Polygonize(Band srcBand, Band maskBand, OGRLayerShadow outLayer, \n"
   21850                 :     "    int iPixValField, char options = None, GDALProgressFunc callback = None, \n"
   21851                 :     "    void callback_data = None) -> int\n"
   21852                 :     ""},
   21853                 :    { (char *)"FillNodata", (PyCFunction) _wrap_FillNodata, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21854                 :     "FillNodata(Band targetBand, Band maskBand, double maxSearchDist, \n"
   21855                 :     "    int smoothingIterations, char options = None, \n"
   21856                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21857                 :     ""},
   21858                 :    { (char *)"SieveFilter", (PyCFunction) _wrap_SieveFilter, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21859                 :     "SieveFilter(Band srcBand, Band maskBand, Band dstBand, int threshold, \n"
   21860                 :     "    int connectedness = 4, char options = None, \n"
   21861                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21862                 :     ""},
   21863                 :    { (char *)"RegenerateOverviews", (PyCFunction) _wrap_RegenerateOverviews, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21864                 :     "RegenerateOverviews(Band srcBand, int overviewBandCount, char resampling = \"average\", \n"
   21865                 :     "    GDALProgressFunc callback = None, \n"
   21866                 :     "    void callback_data = None) -> int\n"
   21867                 :     ""},
   21868                 :    { (char *)"RegenerateOverview", (PyCFunction) _wrap_RegenerateOverview, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21869                 :     "RegenerateOverview(Band srcBand, Band overviewBand, char resampling = \"average\", \n"
   21870                 :     "    GDALProgressFunc callback = None, \n"
   21871                 :     "    void callback_data = None) -> int\n"
   21872                 :     ""},
   21873                 :    { (char *)"ContourGenerate", (PyCFunction) _wrap_ContourGenerate, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21874                 :     "ContourGenerate(Band srcBand, double contourInterval, double contourBase, \n"
   21875                 :     "    int fixedLevelCount, int useNoData, double noDataValue, \n"
   21876                 :     "    OGRLayerShadow dstLayer, int idField, \n"
   21877                 :     "    int elevField, GDALProgressFunc callback = None, \n"
   21878                 :     "    void callback_data = None) -> int\n"
   21879                 :     ""},
   21880                 :    { (char *)"AutoCreateWarpedVRT", _wrap_AutoCreateWarpedVRT, METH_VARARGS, (char *)"\n"
   21881                 :     "AutoCreateWarpedVRT(Dataset src_ds, char src_wkt = None, char dst_wkt = None, \n"
   21882                 :     "    GDALResampleAlg eResampleAlg = GRA_NearestNeighbour, \n"
   21883                 :     "    double maxerror = 0.0) -> Dataset\n"
   21884                 :     ""},
   21885                 :    { (char *)"new_Transformer", _wrap_new_Transformer, METH_VARARGS, (char *)"new_Transformer(Dataset src, Dataset dst, char options) -> Transformer"},
   21886                 :    { (char *)"delete_Transformer", _wrap_delete_Transformer, METH_VARARGS, (char *)"delete_Transformer(Transformer self)"},
   21887                 :    { (char *)"Transformer_TransformPoint", _wrap_Transformer_TransformPoint, METH_VARARGS, (char *)"\n"
   21888                 :     "TransformPoint(int bDstToSrc, double inout) -> int\n"
   21889                 :     "Transformer_TransformPoint(Transformer self, int bDstToSrc, double x, double y, \n"
   21890                 :     "    double z = 0.0) -> int\n"
   21891                 :     ""},
   21892                 :    { (char *)"Transformer_TransformPoints", _wrap_Transformer_TransformPoints, METH_VARARGS, (char *)"Transformer_TransformPoints(Transformer self, int bDstToSrc, int nCount) -> int"},
   21893                 :    { (char *)"Transformer_TransformGeolocations", (PyCFunction) _wrap_Transformer_TransformGeolocations, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21894                 :     "Transformer_TransformGeolocations(Transformer self, Band xBand, Band yBand, Band zBand, \n"
   21895                 :     "    GDALProgressFunc callback = None, void callback_data = None, \n"
   21896                 :     "    char options = None) -> int\n"
   21897                 :     ""},
   21898                 :    { (char *)"Transformer_swigregister", Transformer_swigregister, METH_VARARGS, NULL},
   21899                 :    { (char *)"ApplyGeoTransform", _wrap_ApplyGeoTransform, METH_VARARGS, (char *)"ApplyGeoTransform(double padfGeoTransform, double dfPixel, double dfLine)"},
   21900                 :    { (char *)"InvGeoTransform", _wrap_InvGeoTransform, METH_VARARGS, (char *)"InvGeoTransform(double gt_in) -> int"},
   21901                 :    { (char *)"VersionInfo", _wrap_VersionInfo, METH_VARARGS, (char *)"VersionInfo(char request = \"VERSION_NUM\") -> char"},
   21902                 :    { (char *)"AllRegister", _wrap_AllRegister, METH_VARARGS, (char *)"AllRegister()"},
   21903                 :    { (char *)"GDALDestroyDriverManager", _wrap_GDALDestroyDriverManager, METH_VARARGS, (char *)"GDALDestroyDriverManager()"},
   21904                 :    { (char *)"GetCacheMax", _wrap_GetCacheMax, METH_VARARGS, (char *)"GetCacheMax() -> GIntBig"},
   21905                 :    { (char *)"GetCacheUsed", _wrap_GetCacheUsed, METH_VARARGS, (char *)"GetCacheUsed() -> GIntBig"},
   21906                 :    { (char *)"SetCacheMax", _wrap_SetCacheMax, METH_VARARGS, (char *)"SetCacheMax(GIntBig nBytes)"},
   21907                 :    { (char *)"GetDataTypeSize", _wrap_GetDataTypeSize, METH_VARARGS, (char *)"GetDataTypeSize(GDALDataType eDataType) -> int"},
   21908                 :    { (char *)"DataTypeIsComplex", _wrap_DataTypeIsComplex, METH_VARARGS, (char *)"DataTypeIsComplex(GDALDataType eDataType) -> int"},
   21909                 :    { (char *)"GetDataTypeName", _wrap_GetDataTypeName, METH_VARARGS, (char *)"GetDataTypeName(GDALDataType eDataType) -> char"},
   21910                 :    { (char *)"GetDataTypeByName", _wrap_GetDataTypeByName, METH_VARARGS, (char *)"GetDataTypeByName(char pszDataTypeName) -> GDALDataType"},
   21911                 :    { (char *)"GetColorInterpretationName", _wrap_GetColorInterpretationName, METH_VARARGS, (char *)"GetColorInterpretationName(GDALColorInterp eColorInterp) -> char"},
   21912                 :    { (char *)"GetPaletteInterpretationName", _wrap_GetPaletteInterpretationName, METH_VARARGS, (char *)"GetPaletteInterpretationName(GDALPaletteInterp ePaletteInterp) -> char"},
   21913                 :    { (char *)"DecToDMS", _wrap_DecToDMS, METH_VARARGS, (char *)"DecToDMS(double arg0, char arg1, int arg2 = 2) -> char"},
   21914                 :    { (char *)"PackedDMSToDec", _wrap_PackedDMSToDec, METH_VARARGS, (char *)"PackedDMSToDec(double dfPacked) -> double"},
   21915                 :    { (char *)"DecToPackedDMS", _wrap_DecToPackedDMS, METH_VARARGS, (char *)"DecToPackedDMS(double dfDec) -> double"},
   21916                 :    { (char *)"ParseXMLString", _wrap_ParseXMLString, METH_VARARGS, (char *)"ParseXMLString(char pszXMLString) -> CPLXMLNode"},
   21917                 :    { (char *)"SerializeXMLTree", _wrap_SerializeXMLTree, METH_VARARGS, (char *)"SerializeXMLTree(CPLXMLNode xmlnode) -> retStringAndCPLFree"},
   21918                 :    { (char *)"GetDriverCount", _wrap_GetDriverCount, METH_VARARGS, (char *)"GetDriverCount() -> int"},
   21919                 :    { (char *)"GetDriverByName", _wrap_GetDriverByName, METH_VARARGS, (char *)"GetDriverByName(char name) -> Driver"},
   21920                 :    { (char *)"GetDriver", _wrap_GetDriver, METH_VARARGS, (char *)"GetDriver(int i) -> Driver"},
   21921                 :    { (char *)"Open", _wrap_Open, METH_VARARGS, (char *)"Open(char utf8_path, GDALAccess eAccess = GA_ReadOnly) -> Dataset"},
   21922                 :    { (char *)"OpenShared", _wrap_OpenShared, METH_VARARGS, (char *)"OpenShared(char utf8_path, GDALAccess eAccess = GA_ReadOnly) -> Dataset"},
   21923                 :    { (char *)"IdentifyDriver", _wrap_IdentifyDriver, METH_VARARGS, (char *)"IdentifyDriver(char utf8_path, char papszSiblings = None) -> Driver"},
   21924                 :    { (char *)"GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, (char *)"GeneralCmdLineProcessor(char papszArgv, int nOptions = 0) -> char"},
   21925                 :    { NULL, NULL, 0, NULL }
   21926                 : };
   21927                 : 
   21928                 : 
   21929                 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
   21930                 : 
   21931            2465 : static void *_p_GDALDriverShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   21932            2465 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDriverShadow *) x));
   21933                 : }
   21934             549 : static void *_p_GDALDatasetShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   21935             549 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDatasetShadow *) x));
   21936                 : }
   21937             315 : static void *_p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   21938             315 :     return (void *)((GDALMajorObjectShadow *)  ((GDALRasterBandShadow *) x));
   21939                 : }
   21940                 : static swig_type_info _swigt__p_CPLErrorHandler = {"_p_CPLErrorHandler", "CPLErrorHandler *", 0, 0, (void*)0, 0};
   21941                 : static swig_type_info _swigt__p_CPLXMLNode = {"_p_CPLXMLNode", "CPLXMLNode *", 0, 0, (void*)0, 0};
   21942                 : static swig_type_info _swigt__p_GByte = {"_p_GByte", "GByte *", 0, 0, (void*)0, 0};
   21943                 : static swig_type_info _swigt__p_GDALAsyncReaderShadow = {"_p_GDALAsyncReaderShadow", "GDALAsyncReaderShadow *", 0, 0, (void*)0, 0};
   21944                 : static swig_type_info _swigt__p_GDALColorEntry = {"_p_GDALColorEntry", "GDALColorEntry *", 0, 0, (void*)0, 0};
   21945                 : static swig_type_info _swigt__p_GDALColorTableShadow = {"_p_GDALColorTableShadow", "GDALColorTableShadow *", 0, 0, (void*)0, 0};
   21946                 : static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *", 0, 0, (void*)0, 0};
   21947                 : static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *", 0, 0, (void*)0, 0};
   21948                 : static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
   21949                 : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
   21950                 : static swig_type_info _swigt__p_GDALRasterAttributeTableShadow = {"_p_GDALRasterAttributeTableShadow", "GDALRasterAttributeTableShadow *", 0, 0, (void*)0, 0};
   21951                 : static swig_type_info _swigt__p_GDALRasterBandShadow = {"_p_GDALRasterBandShadow", "GDALRasterBandShadow *", 0, 0, (void*)0, 0};
   21952                 : static swig_type_info _swigt__p_GDALTransformerInfoShadow = {"_p_GDALTransformerInfoShadow", "GDALTransformerInfoShadow *", 0, 0, (void*)0, 0};
   21953                 : static swig_type_info _swigt__p_GDAL_GCP = {"_p_GDAL_GCP", "GDAL_GCP *", 0, 0, (void*)0, 0};
   21954                 : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
   21955                 : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
   21956                 : static swig_type_info _swigt__p_StatBuf = {"_p_StatBuf", "StatBuf *", 0, 0, (void*)0, 0};
   21957                 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
   21958                 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
   21959                 : 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};
   21960                 : static swig_type_info _swigt__p_int = {"_p_int", "CPLErr *|GDALRATFieldType *|int *|GDALColorInterp *|GDALAccess *|GDALPaletteInterp *|GDALDataType *|GDALAsyncStatusType *|GDALRATFieldUsage *|GDALResampleAlg *", 0, 0, (void*)0, 0};
   21961                 : static swig_type_info _swigt__p_p_GDALRasterBandShadow = {"_p_p_GDALRasterBandShadow", "GDALRasterBandShadow **", 0, 0, (void*)0, 0};
   21962                 : static swig_type_info _swigt__p_p_GDAL_GCP = {"_p_p_GDAL_GCP", "GDAL_GCP **", 0, 0, (void*)0, 0};
   21963                 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
   21964                 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
   21965                 : static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
   21966                 : static swig_type_info _swigt__p_void = {"_p_void", "VSILFILE *|void *", 0, 0, (void*)0, 0};
   21967                 : 
   21968                 : static swig_type_info *swig_type_initial[] = {
   21969                 :   &_swigt__p_CPLErrorHandler,
   21970                 :   &_swigt__p_CPLXMLNode,
   21971                 :   &_swigt__p_GByte,
   21972                 :   &_swigt__p_GDALAsyncReaderShadow,
   21973                 :   &_swigt__p_GDALColorEntry,
   21974                 :   &_swigt__p_GDALColorTableShadow,
   21975                 :   &_swigt__p_GDALDatasetShadow,
   21976                 :   &_swigt__p_GDALDriverShadow,
   21977                 :   &_swigt__p_GDALMajorObjectShadow,
   21978                 :   &_swigt__p_GDALProgressFunc,
   21979                 :   &_swigt__p_GDALRasterAttributeTableShadow,
   21980                 :   &_swigt__p_GDALRasterBandShadow,
   21981                 :   &_swigt__p_GDALTransformerInfoShadow,
   21982                 :   &_swigt__p_GDAL_GCP,
   21983                 :   &_swigt__p_GIntBig,
   21984                 :   &_swigt__p_OGRLayerShadow,
   21985                 :   &_swigt__p_StatBuf,
   21986                 :   &_swigt__p_char,
   21987                 :   &_swigt__p_double,
   21988                 :   &_swigt__p_f_double_p_q_const__char_p_void__int,
   21989                 :   &_swigt__p_int,
   21990                 :   &_swigt__p_p_GDALRasterBandShadow,
   21991                 :   &_swigt__p_p_GDAL_GCP,
   21992                 :   &_swigt__p_p_char,
   21993                 :   &_swigt__p_p_int,
   21994                 :   &_swigt__p_p_void,
   21995                 :   &_swigt__p_void,
   21996                 : };
   21997                 : 
   21998                 : static swig_cast_info _swigc__p_CPLErrorHandler[] = {  {&_swigt__p_CPLErrorHandler, 0, 0, 0},{0, 0, 0, 0}};
   21999                 : static swig_cast_info _swigc__p_CPLXMLNode[] = {  {&_swigt__p_CPLXMLNode, 0, 0, 0},{0, 0, 0, 0}};
   22000                 : static swig_cast_info _swigc__p_GByte[] = {  {&_swigt__p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   22001                 : static swig_cast_info _swigc__p_GDALAsyncReaderShadow[] = {  {&_swigt__p_GDALAsyncReaderShadow, 0, 0, 0},{0, 0, 0, 0}};
   22002                 : static swig_cast_info _swigc__p_GDALColorEntry[] = {  {&_swigt__p_GDALColorEntry, 0, 0, 0},{0, 0, 0, 0}};
   22003                 : static swig_cast_info _swigc__p_GDALColorTableShadow[] = {  {&_swigt__p_GDALColorTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   22004                 : static swig_cast_info _swigc__p_GDALDatasetShadow[] = {  {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   22005                 : static swig_cast_info _swigc__p_GDALDriverShadow[] = {  {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
   22006                 : 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}};
   22007                 : static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
   22008                 : static swig_cast_info _swigc__p_GDALRasterAttributeTableShadow[] = {  {&_swigt__p_GDALRasterAttributeTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   22009                 : static swig_cast_info _swigc__p_GDALRasterBandShadow[] = {  {&_swigt__p_GDALRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   22010                 : static swig_cast_info _swigc__p_GDALTransformerInfoShadow[] = {  {&_swigt__p_GDALTransformerInfoShadow, 0, 0, 0},{0, 0, 0, 0}};
   22011                 : static swig_cast_info _swigc__p_GDAL_GCP[] = {  {&_swigt__p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   22012                 : static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
   22013                 : static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   22014                 : static swig_cast_info _swigc__p_StatBuf[] = {  {&_swigt__p_StatBuf, 0, 0, 0},{0, 0, 0, 0}};
   22015                 : static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
   22016                 : static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
   22017                 : 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}};
   22018                 : static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
   22019                 : static swig_cast_info _swigc__p_p_GDALRasterBandShadow[] = {  {&_swigt__p_p_GDALRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   22020                 : static swig_cast_info _swigc__p_p_GDAL_GCP[] = {  {&_swigt__p_p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   22021                 : static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
   22022                 : static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
   22023                 : static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
   22024                 : static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
   22025                 : 
   22026                 : static swig_cast_info *swig_cast_initial[] = {
   22027                 :   _swigc__p_CPLErrorHandler,
   22028                 :   _swigc__p_CPLXMLNode,
   22029                 :   _swigc__p_GByte,
   22030                 :   _swigc__p_GDALAsyncReaderShadow,
   22031                 :   _swigc__p_GDALColorEntry,
   22032                 :   _swigc__p_GDALColorTableShadow,
   22033                 :   _swigc__p_GDALDatasetShadow,
   22034                 :   _swigc__p_GDALDriverShadow,
   22035                 :   _swigc__p_GDALMajorObjectShadow,
   22036                 :   _swigc__p_GDALProgressFunc,
   22037                 :   _swigc__p_GDALRasterAttributeTableShadow,
   22038                 :   _swigc__p_GDALRasterBandShadow,
   22039                 :   _swigc__p_GDALTransformerInfoShadow,
   22040                 :   _swigc__p_GDAL_GCP,
   22041                 :   _swigc__p_GIntBig,
   22042                 :   _swigc__p_OGRLayerShadow,
   22043                 :   _swigc__p_StatBuf,
   22044                 :   _swigc__p_char,
   22045                 :   _swigc__p_double,
   22046                 :   _swigc__p_f_double_p_q_const__char_p_void__int,
   22047                 :   _swigc__p_int,
   22048                 :   _swigc__p_p_GDALRasterBandShadow,
   22049                 :   _swigc__p_p_GDAL_GCP,
   22050                 :   _swigc__p_p_char,
   22051                 :   _swigc__p_p_int,
   22052                 :   _swigc__p_p_void,
   22053                 :   _swigc__p_void,
   22054                 : };
   22055                 : 
   22056                 : 
   22057                 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
   22058                 : 
   22059                 : static swig_const_info swig_const_table[] = {
   22060                 : { 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 },
   22061                 : {0, 0, 0, 0.0, 0, 0}};
   22062                 : 
   22063                 : #ifdef __cplusplus
   22064                 : }
   22065                 : #endif
   22066                 : /* -----------------------------------------------------------------------------
   22067                 :  * Type initialization:
   22068                 :  * This problem is tough by the requirement that no dynamic 
   22069                 :  * memory is used. Also, since swig_type_info structures store pointers to 
   22070                 :  * swig_cast_info structures and swig_cast_info structures store pointers back
   22071                 :  * to swig_type_info structures, we need some lookup code at initialization. 
   22072                 :  * The idea is that swig generates all the structures that are needed. 
   22073                 :  * The runtime then collects these partially filled structures. 
   22074                 :  * The SWIG_InitializeModule function takes these initial arrays out of 
   22075                 :  * swig_module, and does all the lookup, filling in the swig_module.types
   22076                 :  * array with the correct data and linking the correct swig_cast_info
   22077                 :  * structures together.
   22078                 :  *
   22079                 :  * The generated swig_type_info structures are assigned staticly to an initial 
   22080                 :  * array. We just loop through that array, and handle each type individually.
   22081                 :  * First we lookup if this type has been already loaded, and if so, use the
   22082                 :  * loaded structure instead of the generated one. Then we have to fill in the
   22083                 :  * cast linked list. The cast data is initially stored in something like a
   22084                 :  * two-dimensional array. Each row corresponds to a type (there are the same
   22085                 :  * number of rows as there are in the swig_type_initial array). Each entry in
   22086                 :  * a column is one of the swig_cast_info structures for that type.
   22087                 :  * The cast_initial array is actually an array of arrays, because each row has
   22088                 :  * a variable number of columns. So to actually build the cast linked list,
   22089                 :  * we find the array of casts associated with the type, and loop through it 
   22090                 :  * adding the casts to the list. The one last trick we need to do is making
   22091                 :  * sure the type pointer in the swig_cast_info struct is correct.
   22092                 :  *
   22093                 :  * First off, we lookup the cast->type name to see if it is already loaded. 
   22094                 :  * There are three cases to handle:
   22095                 :  *  1) If the cast->type has already been loaded AND the type we are adding
   22096                 :  *     casting info to has not been loaded (it is in this module), THEN we
   22097                 :  *     replace the cast->type pointer with the type pointer that has already
   22098                 :  *     been loaded.
   22099                 :  *  2) If BOTH types (the one we are adding casting info to, and the 
   22100                 :  *     cast->type) are loaded, THEN the cast info has already been loaded by
   22101                 :  *     the previous module so we just ignore it.
   22102                 :  *  3) Finally, if cast->type has not already been loaded, then we add that
   22103                 :  *     swig_cast_info to the linked list (because the cast->type) pointer will
   22104                 :  *     be correct.
   22105                 :  * ----------------------------------------------------------------------------- */
   22106                 : 
   22107                 : #ifdef __cplusplus
   22108                 : extern "C" {
   22109                 : #if 0
   22110                 : } /* c-mode */
   22111                 : #endif
   22112                 : #endif
   22113                 : 
   22114                 : #if 0
   22115                 : #define SWIGRUNTIME_DEBUG
   22116                 : #endif
   22117                 : 
   22118                 : 
   22119                 : SWIGRUNTIME void
   22120              12 : SWIG_InitializeModule(void *clientdata) {
   22121                 :   size_t i;
   22122                 :   swig_module_info *module_head, *iter;
   22123                 :   int found, init;
   22124                 :   
   22125              12 :   clientdata = clientdata;
   22126                 :   
   22127                 :   /* check to see if the circular list has been setup, if not, set it up */
   22128              12 :   if (swig_module.next==0) {
   22129                 :     /* Initialize the swig_module */
   22130              12 :     swig_module.type_initial = swig_type_initial;
   22131              12 :     swig_module.cast_initial = swig_cast_initial;
   22132              12 :     swig_module.next = &swig_module;
   22133              12 :     init = 1;
   22134                 :   } else {
   22135               0 :     init = 0;
   22136                 :   }
   22137                 :   
   22138                 :   /* Try and load any already created modules */
   22139              12 :   module_head = SWIG_GetModule(clientdata);
   22140              12 :   if (!module_head) {
   22141                 :     /* This is the first module loaded for this interpreter */
   22142                 :     /* so set the swig module into the interpreter */
   22143                 :     SWIG_SetModule(clientdata, &swig_module);
   22144              12 :     module_head = &swig_module;
   22145                 :   } else {
   22146                 :     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
   22147               0 :     found=0;
   22148               0 :     iter=module_head;
   22149               0 :     do {
   22150               0 :       if (iter==&swig_module) {
   22151               0 :         found=1;
   22152               0 :         break;
   22153                 :       }
   22154               0 :       iter=iter->next;
   22155                 :     } while (iter!= module_head);
   22156                 :     
   22157                 :     /* if the is found in the list, then all is done and we may leave */
   22158               0 :     if (found) return;
   22159                 :     /* otherwise we must add out module into the list */
   22160               0 :     swig_module.next = module_head->next;
   22161               0 :     module_head->next = &swig_module;
   22162                 :   }
   22163                 :   
   22164                 :   /* When multiple interpeters are used, a module could have already been initialized in
   22165                 :        a different interpreter, but not yet have a pointer in this interpreter.
   22166                 :        In this case, we do not want to continue adding types... everything should be
   22167                 :        set up already */
   22168              12 :   if (init == 0) return;
   22169                 :   
   22170                 :   /* Now work on filling in swig_module.types */
   22171                 : #ifdef SWIGRUNTIME_DEBUG
   22172                 :   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
   22173                 : #endif
   22174             336 :   for (i = 0; i < swig_module.size; ++i) {
   22175             324 :     swig_type_info *type = 0;
   22176                 :     swig_type_info *ret;
   22177                 :     swig_cast_info *cast;
   22178                 :     
   22179                 : #ifdef SWIGRUNTIME_DEBUG
   22180                 :     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
   22181                 : #endif
   22182                 :     
   22183                 :     /* if there is another module already loaded */
   22184             324 :     if (swig_module.next != &swig_module) {
   22185               0 :       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
   22186                 :     }
   22187             324 :     if (type) {
   22188                 :       /* Overwrite clientdata field */
   22189                 : #ifdef SWIGRUNTIME_DEBUG
   22190                 :       printf("SWIG_InitializeModule: found type %s\n", type->name);
   22191                 : #endif
   22192               0 :       if (swig_module.type_initial[i]->clientdata) {
   22193               0 :         type->clientdata = swig_module.type_initial[i]->clientdata;
   22194                 : #ifdef SWIGRUNTIME_DEBUG
   22195                 :         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
   22196                 : #endif
   22197                 :       }
   22198                 :     } else {
   22199             324 :       type = swig_module.type_initial[i];
   22200                 :     }
   22201                 :     
   22202                 :     /* Insert casting types */
   22203             324 :     cast = swig_module.cast_initial[i];
   22204            1008 :     while (cast->type) {
   22205                 :       /* Don't need to add information already in the list */
   22206             360 :       ret = 0;
   22207                 : #ifdef SWIGRUNTIME_DEBUG
   22208                 :       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
   22209                 : #endif
   22210             360 :       if (swig_module.next != &swig_module) {
   22211               0 :         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
   22212                 : #ifdef SWIGRUNTIME_DEBUG
   22213                 :         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
   22214                 : #endif
   22215                 :       }
   22216             360 :       if (ret) {
   22217               0 :         if (type == swig_module.type_initial[i]) {
   22218                 : #ifdef SWIGRUNTIME_DEBUG
   22219                 :           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
   22220                 : #endif
   22221               0 :           cast->type = ret;
   22222               0 :           ret = 0;
   22223                 :         } else {
   22224                 :           /* Check for casting already in the list */
   22225               0 :           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
   22226                 : #ifdef SWIGRUNTIME_DEBUG
   22227                 :           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
   22228                 : #endif
   22229               0 :           if (!ocast) ret = 0;
   22230                 :         }
   22231                 :       }
   22232                 :       
   22233             360 :       if (!ret) {
   22234                 : #ifdef SWIGRUNTIME_DEBUG
   22235                 :         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
   22236                 : #endif
   22237             360 :         if (type->cast) {
   22238              36 :           type->cast->prev = cast;
   22239              36 :           cast->next = type->cast;
   22240                 :         }
   22241             360 :         type->cast = cast;
   22242                 :       }
   22243             360 :       cast++;
   22244                 :     }
   22245                 :     /* Set entry in modules->types array equal to the type */
   22246             324 :     swig_module.types[i] = type;
   22247                 :   }
   22248              12 :   swig_module.types[i] = 0;
   22249                 :   
   22250                 : #ifdef SWIGRUNTIME_DEBUG
   22251                 :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   22252                 :   for (i = 0; i < swig_module.size; ++i) {
   22253                 :     int j = 0;
   22254                 :     swig_cast_info *cast = swig_module.cast_initial[i];
   22255                 :     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
   22256                 :     while (cast->type) {
   22257                 :       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
   22258                 :       cast++;
   22259                 :       ++j;
   22260                 :     }
   22261                 :     printf("---- Total casts: %d\n",j);
   22262                 :   }
   22263                 :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   22264                 : #endif
   22265                 : }
   22266                 : 
   22267                 : /* This function will propagate the clientdata field of type to
   22268                 : * any new swig_type_info structures that have been added into the list
   22269                 : * of equivalent types.  It is like calling
   22270                 : * SWIG_TypeClientData(type, clientdata) a second time.
   22271                 : */
   22272                 : SWIGRUNTIME void
   22273                 : SWIG_PropagateClientData(void) {
   22274                 :   size_t i;
   22275                 :   swig_cast_info *equiv;
   22276                 :   static int init_run = 0;
   22277                 :   
   22278                 :   if (init_run) return;
   22279                 :   init_run = 1;
   22280                 :   
   22281                 :   for (i = 0; i < swig_module.size; i++) {
   22282                 :     if (swig_module.types[i]->clientdata) {
   22283                 :       equiv = swig_module.types[i]->cast;
   22284                 :       while (equiv) {
   22285                 :         if (!equiv->converter) {
   22286                 :           if (equiv->type && !equiv->type->clientdata)
   22287                 :           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
   22288                 :         }
   22289                 :         equiv = equiv->next;
   22290                 :       }
   22291                 :     }
   22292                 :   }
   22293                 : }
   22294                 : 
   22295                 : #ifdef __cplusplus
   22296                 : #if 0
   22297                 : {
   22298                 :   /* c-mode */
   22299                 : #endif
   22300                 : }
   22301                 : #endif
   22302                 : 
   22303                 : 
   22304                 : 
   22305                 : #ifdef __cplusplus
   22306                 : extern "C" {
   22307                 : #endif
   22308                 :   
   22309                 :   /* Python-specific SWIG API */
   22310                 : #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
   22311                 : #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
   22312                 : #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
   22313                 :   
   22314                 :   /* -----------------------------------------------------------------------------
   22315                 :    * global variable support code.
   22316                 :    * ----------------------------------------------------------------------------- */
   22317                 :   
   22318                 :   typedef struct swig_globalvar {
   22319                 :     char       *name;                  /* Name of global variable */
   22320                 :     PyObject *(*get_attr)(void);       /* Return the current value */
   22321                 :     int       (*set_attr)(PyObject *); /* Set the value */
   22322                 :     struct swig_globalvar *next;
   22323                 :   } swig_globalvar;
   22324                 :   
   22325                 :   typedef struct swig_varlinkobject {
   22326                 :     PyObject_HEAD
   22327                 :     swig_globalvar *vars;
   22328                 :   } swig_varlinkobject;
   22329                 :   
   22330                 :   SWIGINTERN PyObject *
   22331                 :   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
   22332                 : #if PY_VERSION_HEX >= 0x03000000
   22333                 :     return PyUnicode_InternFromString("<Swig global variables>");
   22334                 : #else
   22335                 :     return PyString_FromString("<Swig global variables>");
   22336                 : #endif
   22337                 :   }
   22338                 :   
   22339                 :   SWIGINTERN PyObject *
   22340                 :   swig_varlink_str(swig_varlinkobject *v) {
   22341                 : #if PY_VERSION_HEX >= 0x03000000
   22342                 :     PyObject *str = PyUnicode_InternFromString("(");
   22343                 :     PyObject *tail;
   22344                 :     PyObject *joined;
   22345                 :     swig_globalvar *var;
   22346                 :     for (var = v->vars; var; var=var->next) {
   22347                 :       tail = PyUnicode_FromString(var->name);
   22348                 :       joined = PyUnicode_Concat(str, tail);
   22349                 :       Py_DecRef(str);
   22350                 :       Py_DecRef(tail);
   22351                 :       str = joined;
   22352                 :       if (var->next) {
   22353                 :         tail = PyUnicode_InternFromString(", ");
   22354                 :         joined = PyUnicode_Concat(str, tail);
   22355                 :         Py_DecRef(str);
   22356                 :         Py_DecRef(tail);
   22357                 :         str = joined;
   22358                 :       }
   22359                 :     }
   22360                 :     tail = PyUnicode_InternFromString(")");
   22361                 :     joined = PyUnicode_Concat(str, tail);
   22362                 :     Py_DecRef(str);
   22363                 :     Py_DecRef(tail);
   22364                 :     str = joined;
   22365                 : #else
   22366                 :     PyObject *str = PyString_FromString("(");
   22367                 :     swig_globalvar *var;
   22368                 :     for (var = v->vars; var; var=var->next) {
   22369                 :       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
   22370                 :       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
   22371                 :     }
   22372                 :     PyString_ConcatAndDel(&str,PyString_FromString(")"));
   22373                 : #endif
   22374                 :     return str;
   22375                 :   }
   22376                 :   
   22377                 :   SWIGINTERN int
   22378                 :   swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
   22379                 :     char *tmp;
   22380                 :     PyObject *str = swig_varlink_str(v);
   22381                 :     fprintf(fp,"Swig global variables ");
   22382                 :     fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
   22383                 :     SWIG_Python_str_DelForPy3(tmp);
   22384                 :     Py_DECREF(str);
   22385                 :     return 0;
   22386                 :   }
   22387                 :   
   22388                 :   SWIGINTERN void
   22389                 :   swig_varlink_dealloc(swig_varlinkobject *v) {
   22390                 :     swig_globalvar *var = v->vars;
   22391                 :     while (var) {
   22392                 :       swig_globalvar *n = var->next;
   22393                 :       free(var->name);
   22394                 :       free(var);
   22395                 :       var = n;
   22396                 :     }
   22397                 :   }
   22398                 :   
   22399                 :   SWIGINTERN PyObject *
   22400                 :   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
   22401                 :     PyObject *res = NULL;
   22402                 :     swig_globalvar *var = v->vars;
   22403                 :     while (var) {
   22404                 :       if (strcmp(var->name,n) == 0) {
   22405                 :         res = (*var->get_attr)();
   22406                 :         break;
   22407                 :       }
   22408                 :       var = var->next;
   22409                 :     }
   22410                 :     if (res == NULL && !PyErr_Occurred()) {
   22411                 :       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
   22412                 :     }
   22413                 :     return res;
   22414                 :   }
   22415                 :   
   22416                 :   SWIGINTERN int
   22417                 :   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
   22418                 :     int res = 1;
   22419                 :     swig_globalvar *var = v->vars;
   22420                 :     while (var) {
   22421                 :       if (strcmp(var->name,n) == 0) {
   22422                 :         res = (*var->set_attr)(p);
   22423                 :         break;
   22424                 :       }
   22425                 :       var = var->next;
   22426                 :     }
   22427                 :     if (res == 1 && !PyErr_Occurred()) {
   22428                 :       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
   22429                 :     }
   22430                 :     return res;
   22431                 :   }
   22432                 :   
   22433                 :   SWIGINTERN PyTypeObject*
   22434                 :   swig_varlink_type(void) {
   22435                 :     static char varlink__doc__[] = "Swig var link object";
   22436                 :     static PyTypeObject varlink_type;
   22437                 :     static int type_init = 0;  
   22438                 :     if (!type_init) {
   22439                 :       const PyTypeObject tmp
   22440                 :       = {
   22441                 :         /* PyObject header changed in Python 3 */
   22442                 : #if PY_VERSION_HEX >= 0x03000000
   22443                 :         PyVarObject_HEAD_INIT(&PyType_Type, 0)
   22444                 : #else
   22445                 :         PyObject_HEAD_INIT(NULL)
   22446                 :         0,                                  /* Number of items in variable part (ob_size) */
   22447                 : #endif
   22448                 :         (char *)"swigvarlink",              /* Type name (tp_name) */
   22449                 :         sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
   22450                 :         0,                                  /* Itemsize (tp_itemsize) */
   22451                 :         (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
   22452                 :         (printfunc) swig_varlink_print,     /* Print (tp_print) */
   22453                 :         (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
   22454                 :         (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
   22455                 :         0,                                  /* tp_compare */
   22456                 :         (reprfunc) swig_varlink_repr,       /* tp_repr */
   22457                 :         0,                                  /* tp_as_number */
   22458                 :         0,                                  /* tp_as_sequence */
   22459                 :         0,                                  /* tp_as_mapping */
   22460                 :         0,                                  /* tp_hash */
   22461                 :         0,                                  /* tp_call */
   22462                 :         (reprfunc) swig_varlink_str,        /* tp_str */
   22463                 :         0,                                  /* tp_getattro */
   22464                 :         0,                                  /* tp_setattro */
   22465                 :         0,                                  /* tp_as_buffer */
   22466                 :         0,                                  /* tp_flags */
   22467                 :         varlink__doc__,                     /* tp_doc */
   22468                 :         0,                                  /* tp_traverse */
   22469                 :         0,                                  /* tp_clear */
   22470                 :         0,                                  /* tp_richcompare */
   22471                 :         0,                                  /* tp_weaklistoffset */
   22472                 : #if PY_VERSION_HEX >= 0x02020000
   22473                 :         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
   22474                 : #endif
   22475                 : #if PY_VERSION_HEX >= 0x02030000
   22476                 :         0,                                  /* tp_del */
   22477                 : #endif
   22478                 : #ifdef COUNT_ALLOCS
   22479                 :         0,0,0,0                             /* tp_alloc -> tp_next */
   22480                 : #endif
   22481                 :       };
   22482                 :       varlink_type = tmp;
   22483                 :       /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
   22484                 : #if PY_VERSION_HEX < 0x03000000
   22485                 :       varlink_type.ob_type = &PyType_Type;
   22486                 : #endif
   22487                 :       type_init = 1;
   22488                 :     }
   22489                 :     return &varlink_type;
   22490                 :   }
   22491                 :   
   22492                 :   /* Create a variable linking object for use later */
   22493                 :   SWIGINTERN PyObject *
   22494                 :   SWIG_Python_newvarlink(void) {
   22495                 :     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
   22496                 :     if (result) {
   22497                 :       result->vars = 0;
   22498                 :     }
   22499                 :     return ((PyObject*) result);
   22500                 :   }
   22501                 :   
   22502                 :   SWIGINTERN void 
   22503                 :   SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
   22504                 :     swig_varlinkobject *v = (swig_varlinkobject *) p;
   22505                 :     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
   22506                 :     if (gv) {
   22507                 :       size_t size = strlen(name)+1;
   22508                 :       gv->name = (char *)malloc(size);
   22509                 :       if (gv->name) {
   22510                 :         strncpy(gv->name,name,size);
   22511                 :         gv->get_attr = get_attr;
   22512                 :         gv->set_attr = set_attr;
   22513                 :         gv->next = v->vars;
   22514                 :       }
   22515                 :     }
   22516                 :     v->vars = gv;
   22517                 :   }
   22518                 :   
   22519                 :   SWIGINTERN PyObject *
   22520                 :   SWIG_globals(void) {
   22521                 :     static PyObject *_SWIG_globals = 0; 
   22522                 :     if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
   22523                 :     return _SWIG_globals;
   22524                 :   }
   22525                 :   
   22526                 :   /* -----------------------------------------------------------------------------
   22527                 :    * constants/methods manipulation
   22528                 :    * ----------------------------------------------------------------------------- */
   22529                 :   
   22530                 :   /* Install Constants */
   22531                 :   SWIGINTERN void
   22532              12 :   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
   22533              12 :     PyObject *obj = 0;
   22534                 :     size_t i;
   22535              24 :     for (i = 0; constants[i].type; ++i) {
   22536              12 :       switch(constants[i].type) {
   22537                 :       case SWIG_PY_POINTER:
   22538              12 :         obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
   22539              12 :         break;
   22540                 :       case SWIG_PY_BINARY:
   22541               0 :         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
   22542               0 :         break;
   22543                 :       default:
   22544               0 :         obj = 0;
   22545                 :         break;
   22546                 :       }
   22547              12 :       if (obj) {
   22548              12 :         PyDict_SetItemString(d, constants[i].name, obj);
   22549              12 :         Py_DECREF(obj);
   22550                 :       }
   22551                 :     }
   22552              12 :   }
   22553                 :   
   22554                 :   /* -----------------------------------------------------------------------------*/
   22555                 :   /* Fix SwigMethods to carry the callback ptrs when needed */
   22556                 :   /* -----------------------------------------------------------------------------*/
   22557                 :   
   22558                 :   SWIGINTERN void
   22559              12 :   SWIG_Python_FixMethods(PyMethodDef *methods,
   22560                 :     swig_const_info *const_table,
   22561                 :     swig_type_info **types,
   22562                 :     swig_type_info **types_initial) {
   22563                 :     size_t i;
   22564            3384 :     for (i = 0; methods[i].ml_name; ++i) {
   22565            3372 :       const char *c = methods[i].ml_doc;
   22566            6600 :       if (c && (c = strstr(c, "swig_ptr: "))) {
   22567                 :         int j;
   22568               0 :         swig_const_info *ci = 0;
   22569               0 :         const char *name = c + 10;
   22570               0 :         for (j = 0; const_table[j].type; ++j) {
   22571               0 :           if (strncmp(const_table[j].name, name, 
   22572               0 :               strlen(const_table[j].name)) == 0) {
   22573               0 :             ci = &(const_table[j]);
   22574               0 :             break;
   22575                 :           }
   22576                 :         }
   22577               0 :         if (ci) {
   22578               0 :           size_t shift = (ci->ptype) - types;
   22579               0 :           swig_type_info *ty = types_initial[shift];
   22580               0 :           size_t ldoc = (c - methods[i].ml_doc);
   22581               0 :           size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
   22582               0 :           char *ndoc = (char*)malloc(ldoc + lptr + 10);
   22583               0 :           if (ndoc) {
   22584               0 :             char *buff = ndoc;
   22585               0 :             void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
   22586               0 :             if (ptr) {
   22587               0 :               strncpy(buff, methods[i].ml_doc, ldoc);
   22588               0 :               buff += ldoc;
   22589                 :               strncpy(buff, "swig_ptr: ", 10);
   22590               0 :               buff += 10;
   22591               0 :               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
   22592               0 :               methods[i].ml_doc = ndoc;
   22593                 :             }
   22594                 :           }
   22595                 :         }
   22596                 :       }
   22597                 :     }
   22598              12 :   } 
   22599                 :   
   22600                 : #ifdef __cplusplus
   22601                 : }
   22602                 : #endif
   22603                 : 
   22604                 : /* -----------------------------------------------------------------------------*
   22605                 :  *  Partial Init method
   22606                 :  * -----------------------------------------------------------------------------*/
   22607                 : 
   22608                 : #ifdef __cplusplus
   22609                 : extern "C"
   22610                 : #endif
   22611                 : 
   22612                 : SWIGEXPORT 
   22613                 : #if PY_VERSION_HEX >= 0x03000000
   22614                 : PyObject*
   22615                 : #else
   22616                 : void
   22617                 : #endif
   22618              12 : SWIG_init(void) {
   22619                 :   PyObject *m, *d;  
   22620                 : #if PY_VERSION_HEX >= 0x03000000
   22621                 :   static struct PyModuleDef SWIG_module = {
   22622                 :     PyModuleDef_HEAD_INIT,
   22623                 :     (char *) SWIG_name,
   22624                 :     NULL,
   22625                 :     -1,
   22626                 :     SwigMethods,
   22627                 :     NULL,
   22628                 :     NULL,
   22629                 :     NULL,
   22630                 :     NULL
   22631                 :   };
   22632                 : #endif
   22633                 :   
   22634                 :   /* Fix SwigMethods to carry the callback ptrs when needed */
   22635              12 :   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   22636                 :   
   22637                 : #if PY_VERSION_HEX >= 0x03000000
   22638                 :   m = PyModule_Create(&SWIG_module);
   22639                 : #else
   22640              12 :   m = Py_InitModule((char *) SWIG_name, SwigMethods);
   22641                 : #endif
   22642              12 :   d = PyModule_GetDict(m);
   22643                 :   
   22644              12 :   SWIG_InitializeModule(0);
   22645              12 :   SWIG_InstallConstants(d,swig_const_table);
   22646                 :   
   22647                 :   
   22648                 :   
   22649                 :   /* gdal_python.i %init code */
   22650              12 :   if ( GDALGetDriverCount() == 0 ) {
   22651              12 :     GDALAllRegister();
   22652                 :   }
   22653                 :   
   22654              12 :   SWIG_Python_SetConstant(d, "VSI_STAT_EXISTS_FLAG",SWIG_From_int(static_cast< int >(0x1)));
   22655              12 :   SWIG_Python_SetConstant(d, "VSI_STAT_NATURE_FLAG",SWIG_From_int(static_cast< int >(0x2)));
   22656              12 :   SWIG_Python_SetConstant(d, "VSI_STAT_SIZE_FLAG",SWIG_From_int(static_cast< int >(0x4)));
   22657                 :   
   22658                 : #if PY_VERSION_HEX >= 0x03000000
   22659                 :   return m;
   22660                 : #else
   22661                 :   return;
   22662                 : #endif
   22663              24 : }
   22664                 : 

Generated by: LCOV version 1.7