LCOV - code coverage report
Current view: directory - swig/python/extensions - ogr_wrap.cpp (source / functions) Found Hit Coverage
Test: gdal_filtered.info Lines: 9160 5905 64.5 %
Date: 2012-12-26 Functions: 343 276 80.5 %

       1                 : /* ----------------------------------------------------------------------------
       2                 :  * This file was automatically generated by SWIG (http://www.swig.org).
       3                 :  * Version 1.3.40
       4                 :  * 
       5                 :  * This file is not intended to be easily readable and contains a number of 
       6                 :  * coding conventions designed to improve portability and efficiency. Do not make
       7                 :  * changes to this file unless you know what you are doing--modify the SWIG 
       8                 :  * interface file instead. 
       9                 :  * ----------------------------------------------------------------------------- */
      10                 : 
      11                 : #define SWIGPYTHON
      12                 : #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
      13                 : 
      14                 : 
      15                 : #ifdef __cplusplus
      16                 : /* SwigValueWrapper is described in swig.swg */
      17                 : template<typename T> class SwigValueWrapper {
      18                 :   struct SwigMovePointer {
      19                 :     T *ptr;
      20                 :     SwigMovePointer(T *p) : ptr(p) { }
      21                 :     ~SwigMovePointer() { delete ptr; }
      22                 :     SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
      23                 :   } pointer;
      24                 :   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
      25                 :   SwigValueWrapper(const SwigValueWrapper<T>& rhs);
      26                 : public:
      27                 :   SwigValueWrapper() : pointer(0) { }
      28                 :   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
      29                 :   operator T&() const { return *pointer.ptr; }
      30                 :   T *operator&() { return pointer.ptr; }
      31                 : };
      32                 : 
      33                 : template <typename T> T SwigValueInit() {
      34                 :   return T();
      35                 : }
      36                 : #endif
      37                 : 
      38                 : /* -----------------------------------------------------------------------------
      39                 :  *  This section contains generic SWIG labels for method/variable
      40                 :  *  declarations/attributes, and other compiler dependent labels.
      41                 :  * ----------------------------------------------------------------------------- */
      42                 : 
      43                 : /* template workaround for compilers that cannot correctly implement the C++ standard */
      44                 : #ifndef SWIGTEMPLATEDISAMBIGUATOR
      45                 : # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
      46                 : #  define SWIGTEMPLATEDISAMBIGUATOR template
      47                 : # elif defined(__HP_aCC)
      48                 : /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
      49                 : /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
      50                 : #  define SWIGTEMPLATEDISAMBIGUATOR template
      51                 : # else
      52                 : #  define SWIGTEMPLATEDISAMBIGUATOR
      53                 : # endif
      54                 : #endif
      55                 : 
      56                 : /* inline attribute */
      57                 : #ifndef SWIGINLINE
      58                 : # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
      59                 : #   define SWIGINLINE inline
      60                 : # else
      61                 : #   define SWIGINLINE
      62                 : # endif
      63                 : #endif
      64                 : 
      65                 : /* attribute recognised by some compilers to avoid 'unused' warnings */
      66                 : #ifndef SWIGUNUSED
      67                 : # if defined(__GNUC__)
      68                 : #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
      69                 : #     define SWIGUNUSED __attribute__ ((__unused__)) 
      70                 : #   else
      71                 : #     define SWIGUNUSED
      72                 : #   endif
      73                 : # elif defined(__ICC)
      74                 : #   define SWIGUNUSED __attribute__ ((__unused__)) 
      75                 : # else
      76                 : #   define SWIGUNUSED 
      77                 : # endif
      78                 : #endif
      79                 : 
      80                 : #ifndef SWIG_MSC_UNSUPPRESS_4505
      81                 : # if defined(_MSC_VER)
      82                 : #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
      83                 : # endif 
      84                 : #endif
      85                 : 
      86                 : #ifndef SWIGUNUSEDPARM
      87                 : # ifdef __cplusplus
      88                 : #   define SWIGUNUSEDPARM(p)
      89                 : # else
      90                 : #   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
      91                 : # endif
      92                 : #endif
      93                 : 
      94                 : /* internal SWIG method */
      95                 : #ifndef SWIGINTERN
      96                 : # define SWIGINTERN static SWIGUNUSED
      97                 : #endif
      98                 : 
      99                 : /* internal inline SWIG method */
     100                 : #ifndef SWIGINTERNINLINE
     101                 : # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
     102                 : #endif
     103                 : 
     104                 : /* exporting methods */
     105                 : #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
     106                 : #  ifndef GCC_HASCLASSVISIBILITY
     107                 : #    define GCC_HASCLASSVISIBILITY
     108                 : #  endif
     109                 : #endif
     110                 : 
     111                 : #ifndef SWIGEXPORT
     112                 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
     113                 : #   if defined(STATIC_LINKED)
     114                 : #     define SWIGEXPORT
     115                 : #   else
     116                 : #     define SWIGEXPORT __declspec(dllexport)
     117                 : #   endif
     118                 : # else
     119                 : #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
     120                 : #     define SWIGEXPORT __attribute__ ((visibility("default")))
     121                 : #   else
     122                 : #     define SWIGEXPORT
     123                 : #   endif
     124                 : # endif
     125                 : #endif
     126                 : 
     127                 : /* calling conventions for Windows */
     128                 : #ifndef SWIGSTDCALL
     129                 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
     130                 : #   define SWIGSTDCALL __stdcall
     131                 : # else
     132                 : #   define SWIGSTDCALL
     133                 : # endif 
     134                 : #endif
     135                 : 
     136                 : /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
     137                 : #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
     138                 : # define _CRT_SECURE_NO_DEPRECATE
     139                 : #endif
     140                 : 
     141                 : /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
     142                 : #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
     143                 : # define _SCL_SECURE_NO_DEPRECATE
     144                 : #endif
     145                 : 
     146                 : 
     147                 : 
     148                 : /* Python.h has to appear first */
     149                 : #include <Python.h>
     150                 : 
     151                 : /* -----------------------------------------------------------------------------
     152                 :  * swigrun.swg
     153                 :  *
     154                 :  * This file contains generic C API SWIG runtime support for pointer
     155                 :  * type checking.
     156                 :  * ----------------------------------------------------------------------------- */
     157                 : 
     158                 : /* This should only be incremented when either the layout of swig_type_info changes,
     159                 :    or for whatever reason, the runtime changes incompatibly */
     160                 : #define SWIG_RUNTIME_VERSION "4"
     161                 : 
     162                 : /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
     163                 : #ifdef SWIG_TYPE_TABLE
     164                 : # define SWIG_QUOTE_STRING(x) #x
     165                 : # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
     166                 : # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
     167                 : #else
     168                 : # define SWIG_TYPE_TABLE_NAME
     169                 : #endif
     170                 : 
     171                 : /*
     172                 :   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
     173                 :   creating a static or dynamic library from the SWIG runtime code.
     174                 :   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
     175                 :   
     176                 :   But only do this if strictly necessary, ie, if you have problems
     177                 :   with your compiler or suchlike.
     178                 : */
     179                 : 
     180                 : #ifndef SWIGRUNTIME
     181                 : # define SWIGRUNTIME SWIGINTERN
     182                 : #endif
     183                 : 
     184                 : #ifndef SWIGRUNTIMEINLINE
     185                 : # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
     186                 : #endif
     187                 : 
     188                 : /*  Generic buffer size */
     189                 : #ifndef SWIG_BUFFER_SIZE
     190                 : # define SWIG_BUFFER_SIZE 1024
     191                 : #endif
     192                 : 
     193                 : /* Flags for pointer conversions */
     194                 : #define SWIG_POINTER_DISOWN        0x1
     195                 : #define SWIG_CAST_NEW_MEMORY       0x2
     196                 : 
     197                 : /* Flags for new pointer objects */
     198                 : #define SWIG_POINTER_OWN           0x1
     199                 : 
     200                 : 
     201                 : /* 
     202                 :    Flags/methods for returning states.
     203                 :    
     204                 :    The SWIG conversion methods, as ConvertPtr, return and integer 
     205                 :    that tells if the conversion was successful or not. And if not,
     206                 :    an error code can be returned (see swigerrors.swg for the codes).
     207                 :    
     208                 :    Use the following macros/flags to set or process the returning
     209                 :    states.
     210                 :    
     211                 :    In old versions of SWIG, code such as the following was usually written:
     212                 : 
     213                 :      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
     214                 :        // success code
     215                 :      } else {
     216                 :        //fail code
     217                 :      }
     218                 : 
     219                 :    Now you can be more explicit:
     220                 : 
     221                 :     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
     222                 :     if (SWIG_IsOK(res)) {
     223                 :       // success code
     224                 :     } else {
     225                 :       // fail code
     226                 :     }
     227                 : 
     228                 :    which is the same really, but now you can also do
     229                 : 
     230                 :     Type *ptr;
     231                 :     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
     232                 :     if (SWIG_IsOK(res)) {
     233                 :       // success code
     234                 :       if (SWIG_IsNewObj(res) {
     235                 :         ...
     236                 :   delete *ptr;
     237                 :       } else {
     238                 :         ...
     239                 :       }
     240                 :     } else {
     241                 :       // fail code
     242                 :     }
     243                 :     
     244                 :    I.e., now SWIG_ConvertPtr can return new objects and you can
     245                 :    identify the case and take care of the deallocation. Of course that
     246                 :    also requires SWIG_ConvertPtr to return new result values, such as
     247                 : 
     248                 :       int SWIG_ConvertPtr(obj, ptr,...) {         
     249                 :         if (<obj is ok>) {             
     250                 :           if (<need new object>) {           
     251                 :             *ptr = <ptr to new allocated object>; 
     252                 :             return SWIG_NEWOBJ;          
     253                 :           } else {               
     254                 :             *ptr = <ptr to old object>;        
     255                 :             return SWIG_OLDOBJ;          
     256                 :           }                
     257                 :         } else {               
     258                 :           return SWIG_BADOBJ;          
     259                 :         }                
     260                 :       }
     261                 : 
     262                 :    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
     263                 :    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
     264                 :    SWIG errors code.
     265                 : 
     266                 :    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
     267                 :    allows to return the 'cast rank', for example, if you have this
     268                 : 
     269                 :        int food(double)
     270                 :        int fooi(int);
     271                 : 
     272                 :    and you call
     273                 :  
     274                 :       food(1)   // cast rank '1'  (1 -> 1.0)
     275                 :       fooi(1)   // cast rank '0'
     276                 : 
     277                 :    just use the SWIG_AddCast()/SWIG_CheckState()
     278                 : */
     279                 : 
     280                 : #define SWIG_OK                    (0) 
     281                 : #define SWIG_ERROR                 (-1)
     282                 : #define SWIG_IsOK(r)               (r >= 0)
     283                 : #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
     284                 : 
     285                 : /* The CastRankLimit says how many bits are used for the cast rank */
     286                 : #define SWIG_CASTRANKLIMIT         (1 << 8)
     287                 : /* The NewMask denotes the object was created (using new/malloc) */
     288                 : #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
     289                 : /* The TmpMask is for in/out typemaps that use temporal objects */
     290                 : #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
     291                 : /* Simple returning values */
     292                 : #define SWIG_BADOBJ                (SWIG_ERROR)
     293                 : #define SWIG_OLDOBJ                (SWIG_OK)
     294                 : #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
     295                 : #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
     296                 : /* Check, add and del mask methods */
     297                 : #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
     298                 : #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
     299                 : #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
     300                 : #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
     301                 : #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
     302                 : #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
     303                 : 
     304                 : /* Cast-Rank Mode */
     305                 : #if defined(SWIG_CASTRANK_MODE)
     306                 : #  ifndef SWIG_TypeRank
     307                 : #    define SWIG_TypeRank             unsigned long
     308                 : #  endif
     309                 : #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
     310                 : #    define SWIG_MAXCASTRANK          (2)
     311                 : #  endif
     312                 : #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
     313                 : #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
     314                 : SWIGINTERNINLINE int SWIG_AddCast(int r) { 
     315                 :   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
     316                 : }
     317                 : SWIGINTERNINLINE int SWIG_CheckState(int r) { 
     318                 :   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
     319                 : }
     320                 : #else /* no cast-rank mode */
     321                 : #  define SWIG_AddCast
     322                 : #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
     323                 : #endif
     324                 : 
     325                 : 
     326                 : #include <string.h>
     327                 : 
     328                 : #ifdef __cplusplus
     329                 : extern "C" {
     330                 : #endif
     331                 : 
     332                 : typedef void *(*swig_converter_func)(void *, int *);
     333                 : typedef struct swig_type_info *(*swig_dycast_func)(void **);
     334                 : 
     335                 : /* Structure to store information on one type */
     336                 : typedef struct swig_type_info {
     337                 :   const char             *name;     /* mangled name of this type */
     338                 :   const char             *str;      /* human readable name of this type */
     339                 :   swig_dycast_func        dcast;    /* dynamic cast function down a hierarchy */
     340                 :   struct swig_cast_info  *cast;     /* linked list of types that can cast into this type */
     341                 :   void                   *clientdata;   /* language specific type data */
     342                 :   int                    owndata;   /* flag if the structure owns the clientdata */
     343                 : } swig_type_info;
     344                 : 
     345                 : /* Structure to store a type and conversion function used for casting */
     346                 : typedef struct swig_cast_info {
     347                 :   swig_type_info         *type;     /* pointer to type that is equivalent to this type */
     348                 :   swig_converter_func     converter;    /* function to cast the void pointers */
     349                 :   struct swig_cast_info  *next;     /* pointer to next cast in linked list */
     350                 :   struct swig_cast_info  *prev;     /* pointer to the previous cast */
     351                 : } swig_cast_info;
     352                 : 
     353                 : /* Structure used to store module information
     354                 :  * Each module generates one structure like this, and the runtime collects
     355                 :  * all of these structures and stores them in a circularly linked list.*/
     356                 : typedef struct swig_module_info {
     357                 :   swig_type_info         **types;   /* Array of pointers to swig_type_info structures that are in this module */
     358                 :   size_t                 size;            /* Number of types in this module */
     359                 :   struct swig_module_info *next;    /* Pointer to next element in circularly linked list */
     360                 :   swig_type_info         **type_initial;  /* Array of initially generated type structures */
     361                 :   swig_cast_info         **cast_initial;  /* Array of initially generated casting structures */
     362                 :   void                    *clientdata;    /* Language specific module data */
     363                 : } swig_module_info;
     364                 : 
     365                 : /* 
     366                 :   Compare two type names skipping the space characters, therefore
     367                 :   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
     368                 : 
     369                 :   Return 0 when the two name types are equivalent, as in
     370                 :   strncmp, but skipping ' '.
     371                 : */
     372                 : SWIGRUNTIME int
     373                 : SWIG_TypeNameComp(const char *f1, const char *l1,
     374                 :       const char *f2, const char *l2) {
     375               0 :   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
     376               0 :     while ((*f1 == ' ') && (f1 != l1)) ++f1;
     377               0 :     while ((*f2 == ' ') && (f2 != l2)) ++f2;
     378               0 :     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
     379                 :   }
     380               0 :   return (int)((l1 - f1) - (l2 - f2));
     381                 : }
     382                 : 
     383                 : /*
     384                 :   Check type equivalence in a name list like <name1>|<name2>|...
     385                 :   Return 0 if not equal, 1 if equal
     386                 : */
     387                 : SWIGRUNTIME int
     388                 : SWIG_TypeEquiv(const char *nb, const char *tb) {
     389               0 :   int equiv = 0;
     390               0 :   const char* te = tb + strlen(tb);
     391               0 :   const char* ne = nb;
     392               0 :   while (!equiv && *ne) {
     393               0 :     for (nb = ne; *ne; ++ne) {
     394               0 :       if (*ne == '|') break;
     395                 :     }
     396               0 :     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
     397               0 :     if (*ne) ++ne;
     398                 :   }
     399               0 :   return equiv;
     400                 : }
     401                 : 
     402                 : /*
     403                 :   Check type equivalence in a name list like <name1>|<name2>|...
     404                 :   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
     405                 : */
     406                 : SWIGRUNTIME int
     407                 : SWIG_TypeCompare(const char *nb, const char *tb) {
     408                 :   int equiv = 0;
     409                 :   const char* te = tb + strlen(tb);
     410                 :   const char* ne = nb;
     411                 :   while (!equiv && *ne) {
     412                 :     for (nb = ne; *ne; ++ne) {
     413                 :       if (*ne == '|') break;
     414                 :     }
     415                 :     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
     416                 :     if (*ne) ++ne;
     417                 :   }
     418                 :   return equiv;
     419                 : }
     420                 : 
     421                 : 
     422                 : /*
     423                 :   Check the typename
     424                 : */
     425                 : SWIGRUNTIME swig_cast_info *
     426              21 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
     427              21 :   if (ty) {
     428              21 :     swig_cast_info *iter = ty->cast;
     429              42 :     while (iter) {
     430              21 :       if (strcmp(iter->type->name, c) == 0) {
     431              21 :         if (iter == ty->cast)
     432              21 :           return iter;
     433                 :         /* Move iter to the top of the linked list */
     434               0 :         iter->prev->next = iter->next;
     435               0 :         if (iter->next)
     436               0 :           iter->next->prev = iter->prev;
     437               0 :         iter->next = ty->cast;
     438               0 :         iter->prev = 0;
     439               0 :         if (ty->cast) ty->cast->prev = iter;
     440               0 :         ty->cast = iter;
     441               0 :         return iter;
     442                 :       }
     443               0 :       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               0 :   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              14 : SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
     533              14 :   swig_cast_info *cast = ti->cast;
     534                 :   /* if (ti->clientdata == clientdata) return; */
     535              14 :   ti->clientdata = clientdata;
     536                 :   
     537              42 :   while (cast) {
     538              14 :     if (!cast->converter) {
     539              14 :       swig_type_info *tc = cast->type;
     540              14 :       if (!tc->clientdata) {
     541               0 :   SWIG_TypeClientData(tc, clientdata);
     542                 :       }
     543                 :     }    
     544              14 :     cast = cast->next;
     545                 :   }
     546              14 : }
     547                 : SWIGRUNTIME void
     548                 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
     549              14 :   SWIG_TypeClientData(ti, clientdata);
     550              14 :   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              74 : SWIG_MangledTypeQueryModule(swig_module_info *start, 
     563                 :                             swig_module_info *end, 
     564                 :                 const char *name) {
     565              74 :   swig_module_info *iter = start;
     566              74 :   do {
     567             118 :     if (iter->size) {
     568             118 :       register size_t l = 0;
     569             118 :       register size_t r = iter->size - 1;
     570             322 :       do {
     571                 :   /* since l+r >= 0, we can (>> 1) instead (/ 2) */
     572             402 :   register size_t i = (l + r) >> 1; 
     573             402 :   const char *iname = iter->types[i]->name;
     574             402 :   if (iname) {
     575             402 :     register int compare = strcmp(name, iname);
     576             402 :     if (compare == 0) {     
     577              44 :       return iter->types[i];
     578             358 :     } else if (compare < 0) {
     579             206 :       if (i) {
     580             170 :         r = i - 1;
     581                 :       } else {
     582                 :         break;
     583                 :       }
     584             152 :     } else if (compare > 0) {
     585             152 :       l = i + 1;
     586                 :     }
     587                 :   } else {
     588                 :     break; /* should never happen */
     589                 :   }
     590                 :       } while (l <= r);
     591                 :     }
     592              74 :     iter = iter->next;
     593                 :   } while (iter != end);
     594              30 :   return 0;
     595                 : }
     596                 : 
     597                 : /*
     598                 :   Search for a swig_type_info structure for either a mangled name or a human readable name.
     599                 :   It first searches the mangled names of the types, which is a O(log #types)
     600                 :   If a type is not found it then searches the human readable names, which is O(#types).
     601                 :   
     602                 :   We start searching at module start, and finish searching when start == end.  
     603                 :   Note: if start == end at the beginning of the function, we go all the way around
     604                 :   the circular list.
     605                 : */
     606                 : SWIGRUNTIME swig_type_info *
     607               2 : SWIG_TypeQueryModule(swig_module_info *start, 
     608                 :                      swig_module_info *end, 
     609                 :          const char *name) {
     610                 :   /* STEP 1: Search the name field using binary search */
     611               2 :   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
     612               2 :   if (ret) {
     613               2 :     return ret;
     614                 :   } else {
     615                 :     /* STEP 2: If the type hasn't been found, do a complete search
     616                 :        of the str field (the human readable name) */
     617               0 :     swig_module_info *iter = start;
     618               0 :     do {
     619               0 :       register size_t i = 0;
     620               0 :       for (; i < iter->size; ++i) {
     621               0 :   if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
     622               0 :     return iter->types[i];
     623                 :       }
     624               0 :       iter = iter->next;
     625                 :     } while (iter != end);
     626                 :   }
     627                 :   
     628                 :   /* neither found a match */
     629               0 :   return 0;
     630                 : }
     631                 : 
     632                 : /* 
     633                 :    Pack binary data into a string
     634                 : */
     635                 : SWIGRUNTIME char *
     636                 : SWIG_PackData(char *c, void *ptr, size_t sz) {
     637                 :   static const char hex[17] = "0123456789abcdef";
     638               0 :   register const unsigned char *u = (unsigned char *) ptr;
     639               0 :   register const unsigned char *eu =  u + sz;
     640               0 :   for (; u != eu; ++u) {
     641               0 :     register unsigned char uu = *u;
     642               0 :     *(c++) = hex[(uu & 0xf0) >> 4];
     643               0 :     *(c++) = hex[uu & 0xf];
     644                 :   }
     645               0 :   return c;
     646                 : }
     647                 : 
     648                 : /* 
     649                 :    Unpack binary data from a string
     650                 : */
     651                 : SWIGRUNTIME const char *
     652                 : SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
     653                 :   register unsigned char *u = (unsigned char *) ptr;
     654                 :   register const unsigned char *eu = u + sz;
     655                 :   for (; u != eu; ++u) {
     656                 :     register char d = *(c++);
     657                 :     register unsigned char uu;
     658                 :     if ((d >= '0') && (d <= '9'))
     659                 :       uu = ((d - '0') << 4);
     660                 :     else if ((d >= 'a') && (d <= 'f'))
     661                 :       uu = ((d - ('a'-10)) << 4);
     662                 :     else 
     663                 :       return (char *) 0;
     664                 :     d = *(c++);
     665                 :     if ((d >= '0') && (d <= '9'))
     666                 :       uu |= (d - '0');
     667                 :     else if ((d >= 'a') && (d <= 'f'))
     668                 :       uu |= (d - ('a'-10));
     669                 :     else 
     670                 :       return (char *) 0;
     671                 :     *u = uu;
     672                 :   }
     673                 :   return c;
     674                 : }
     675                 : 
     676                 : /* 
     677                 :    Pack 'void *' into a string buffer.
     678                 : */
     679                 : SWIGRUNTIME char *
     680               0 : SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
     681               0 :   char *r = buff;
     682               0 :   if ((2*sizeof(void *) + 2) > bsz) return 0;
     683               0 :   *(r++) = '_';
     684               0 :   r = SWIG_PackData(r,&ptr,sizeof(void *));
     685               0 :   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
     686                 :   strcpy(r,name);
     687               0 :   return buff;
     688                 : }
     689                 : 
     690                 : SWIGRUNTIME const char *
     691                 : SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
     692                 :   if (*c != '_') {
     693                 :     if (strcmp(c,"NULL") == 0) {
     694                 :       *ptr = (void *) 0;
     695                 :       return name;
     696                 :     } else {
     697                 :       return 0;
     698                 :     }
     699                 :   }
     700                 :   return SWIG_UnpackData(++c,ptr,sizeof(void *));
     701                 : }
     702                 : 
     703                 : SWIGRUNTIME char *
     704               0 : SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
     705               0 :   char *r = buff;
     706               0 :   size_t lname = (name ? strlen(name) : 0);
     707               0 :   if ((2*sz + 2 + lname) > bsz) return 0;
     708               0 :   *(r++) = '_';
     709               0 :   r = SWIG_PackData(r,ptr,sz);
     710               0 :   if (lname) {
     711               0 :     strncpy(r,name,lname+1);
     712                 :   } else {
     713               0 :     *r = 0;
     714                 :   }
     715               0 :   return buff;
     716                 : }
     717                 : 
     718                 : SWIGRUNTIME const char *
     719                 : SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
     720                 :   if (*c != '_') {
     721                 :     if (strcmp(c,"NULL") == 0) {
     722                 :       memset(ptr,0,sz);
     723                 :       return name;
     724                 :     } else {
     725                 :       return 0;
     726                 :     }
     727                 :   }
     728                 :   return SWIG_UnpackData(++c,ptr,sz);
     729                 : }
     730                 : 
     731                 : #ifdef __cplusplus
     732                 : }
     733                 : #endif
     734                 : 
     735                 : /*  Errors in SWIG */
     736                 : #define  SWIG_UnknownError         -1 
     737                 : #define  SWIG_IOError            -2 
     738                 : #define  SWIG_RuntimeError       -3 
     739                 : #define  SWIG_IndexError         -4 
     740                 : #define  SWIG_TypeError          -5 
     741                 : #define  SWIG_DivisionByZero     -6 
     742                 : #define  SWIG_OverflowError      -7 
     743                 : #define  SWIG_SyntaxError        -8 
     744                 : #define  SWIG_ValueError         -9 
     745                 : #define  SWIG_SystemError        -10
     746                 : #define  SWIG_AttributeError     -11
     747                 : #define  SWIG_MemoryError        -12 
     748                 : #define  SWIG_NullReferenceError   -13
     749                 : 
     750                 : 
     751                 : 
     752                 : /* Compatibility macros for Python 3 */
     753                 : #if PY_VERSION_HEX >= 0x03000000
     754                 : 
     755                 : #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
     756                 : #define PyInt_Check(x) PyLong_Check(x)
     757                 : #define PyInt_AsLong(x) PyLong_AsLong(x)
     758                 : #define PyInt_FromLong(x) PyLong_FromLong(x)
     759                 : #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
     760                 : 
     761                 : #endif
     762                 : 
     763                 : #ifndef Py_TYPE
     764                 : #  define Py_TYPE(op) ((op)->ob_type)
     765                 : #endif
     766                 : 
     767                 : /* SWIG APIs for compatibility of both Python 2 & 3 */
     768                 : 
     769                 : #if PY_VERSION_HEX >= 0x03000000
     770                 : #  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
     771                 : #else
     772                 : #  define SWIG_Python_str_FromFormat PyString_FromFormat
     773                 : #endif
     774                 : 
     775                 : 
     776                 : /* Warning: This function will allocate a new string in Python 3,
     777                 :  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
     778                 :  */
     779                 : SWIGINTERN char*
     780                 : SWIG_Python_str_AsChar(PyObject *str)
     781                 : {
     782                 : #if PY_VERSION_HEX >= 0x03000000
     783                 :   char *cstr;
     784                 :   char *newstr;
     785                 :   Py_ssize_t len;
     786                 :   str = PyUnicode_AsUTF8String(str);
     787                 :   PyBytes_AsStringAndSize(str, &cstr, &len);
     788                 :   newstr = (char *) malloc(len+1);
     789                 :   memcpy(newstr, cstr, len+1);
     790                 :   Py_XDECREF(str);
     791                 :   return newstr;
     792                 : #else
     793               0 :   return PyString_AsString(str);
     794                 : #endif
     795                 : }
     796                 : 
     797                 : #if PY_VERSION_HEX >= 0x03000000
     798                 : #  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
     799                 : #else
     800                 : #  define SWIG_Python_str_DelForPy3(x) 
     801                 : #endif
     802                 : 
     803                 : 
     804                 : SWIGINTERN PyObject*
     805                 : SWIG_Python_str_FromChar(const char *c)
     806                 : {
     807                 : #if PY_VERSION_HEX >= 0x03000000
     808                 :   return PyUnicode_FromString(c); 
     809                 : #else
     810               2 :   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               0 :     type = PyExc_RuntimeError;
     917               0 :     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               1 :     type = PyExc_ValueError;
     935               1 :     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             120 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
    1172             120 :   PyDict_SetItemString(d, (char*) name, obj);
    1173             120 :   Py_DECREF(obj);                            
    1174             120 : }
    1175                 : 
    1176                 : /* Append a value to the result obj */
    1177                 : 
    1178                 : SWIGINTERN PyObject*
    1179           18772 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
    1180                 : #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
    1181           18772 :   if (!result) {
    1182            1191 :     result = obj;
    1183           17581 :   } else if (result == Py_None) {
    1184           17575 :     Py_DECREF(result);
    1185           17575 :     result = obj;
    1186                 :   } else {
    1187               6 :     if (!PyList_Check(result)) {
    1188               1 :       PyObject *o2 = result;
    1189               1 :       result = PyList_New(1);
    1190               1 :       PyList_SetItem(result, 0, o2);
    1191                 :     }
    1192               6 :     PyList_Append(result,obj);
    1193               6 :     Py_DECREF(obj);
    1194                 :   }
    1195           18772 :   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          222086 :   PyObject *none = Py_None;
    1330          222086 :   Py_INCREF(none);
    1331          222086 :   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              14 : SwigPyClientData_New(PyObject* obj)
    1362                 : {
    1363              14 :   if (!obj) {
    1364               0 :     return 0;
    1365                 :   } else {
    1366              14 :     SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    1367                 :     /* the klass element */
    1368              14 :     data->klass = obj;
    1369              14 :     Py_INCREF(data->klass);
    1370                 :     /* the newraw method and newargs arguments used to create a new raw instance */
    1371              14 :     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              14 :       data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
    1380                 : #endif
    1381              14 :       if (data->newraw) {
    1382              14 :   Py_INCREF(data->newraw);
    1383              14 :   data->newargs = PyTuple_New(1);
    1384              14 :   PyTuple_SetItem(data->newargs, 0, obj);
    1385                 :       } else {
    1386               0 :   data->newargs = obj;
    1387                 :       }
    1388              14 :       Py_INCREF(data->newargs);
    1389                 :     }
    1390                 :     /* the destroy method, aka as the C++ delete method */
    1391              14 :     data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
    1392              14 :     if (PyErr_Occurred()) {
    1393               4 :       PyErr_Clear();
    1394               4 :       data->destroy = 0;
    1395                 :     }
    1396              14 :     if (data->destroy) {
    1397                 :       int flags;
    1398              10 :       Py_INCREF(data->destroy);
    1399              10 :       flags = PyCFunction_GET_FLAGS(data->destroy);
    1400                 : #ifdef METH_O
    1401              10 :       data->delargs = !(flags & (METH_O));
    1402                 : #else
    1403                 :       data->delargs = 0;
    1404                 : #endif
    1405                 :     } else {
    1406               4 :       data->delargs = 0;
    1407                 :     }
    1408              14 :     data->implicitconv = 0;
    1409              14 :     return data;
    1410                 :   }
    1411                 : }
    1412                 : 
    1413                 : SWIGRUNTIME void 
    1414                 : SwigPyClientData_Del(SwigPyClientData* data)
    1415                 : {
    1416               0 :   Py_XDECREF(data->newraw);
    1417               0 :   Py_XDECREF(data->newargs);
    1418               0 :   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         2202718 : SwigPyObject_type(void) {
    1556         2202718 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
    1557         2202718 :   return type;
    1558                 : }
    1559                 : 
    1560                 : SWIGRUNTIMEINLINE int
    1561         1427100 : SwigPyObject_Check(PyObject *op) {
    1562                 :   return (Py_TYPE(op) == SwigPyObject_type())
    1563         1427100 :     || (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          387809 : SwigPyObject_dealloc(PyObject *v)
    1571                 : {
    1572          387809 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1573          387809 :   PyObject *next = sobj->next;
    1574          387809 :   if (sobj->own == SWIG_POINTER_OWN) {
    1575          139867 :     swig_type_info *ty = sobj->ty;
    1576          139867 :     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    1577          139867 :     PyObject *destroy = data ? data->destroy : 0;
    1578          139867 :     if (destroy) {
    1579                 :       /* destroy is always a VARARGS method */
    1580                 :       PyObject *res;
    1581          139867 :       if (data->delargs) {
    1582                 :   /* we need to create a temporary object to carry the destroy operation */
    1583          139867 :   PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
    1584          139867 :   res = SWIG_Python_CallFunctor(destroy, tmp);
    1585          139867 :   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          139867 :       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          387809 :   Py_XDECREF(next);
    1601          387809 :   PyObject_DEL(v);
    1602          387809 : }
    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            2405 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1645            2405 :   sobj->own = 0;
    1646            2405 :   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            2405 : SwigPyObject_own(PyObject *v, PyObject *args)
    1663                 : {
    1664            2405 :   PyObject *val = 0;
    1665                 : #if (PY_VERSION_HEX < 0x02020000)
    1666                 :   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
    1667                 : #else
    1668            2405 :   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
    1669                 : #endif
    1670                 :     {
    1671               0 :       return NULL;
    1672                 :     } 
    1673                 :   else
    1674                 :     {
    1675            2405 :       SwigPyObject *sobj = (SwigPyObject *)v;
    1676            2405 :       PyObject *obj = PyBool_FromLong(sobj->own);
    1677            2405 :       if (val) {
    1678                 : #ifdef METH_NOARGS
    1679            2405 :   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            2405 :       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               2 : _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               2 :   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               2 :       };
    1851               2 :     swigpyobject_type = tmp;
    1852                 :     /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
    1853                 : #if PY_VERSION_HEX < 0x03000000
    1854               2 :     swigpyobject_type.ob_type = &PyType_Type;
    1855                 : #endif
    1856               2 :     type_init = 1;
    1857                 :   }
    1858               2 :   return &swigpyobject_type;
    1859                 : }
    1860                 : 
    1861                 : SWIGRUNTIME PyObject *
    1862          387809 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    1863                 : {
    1864          387809 :   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    1865          387809 :   if (sobj) {
    1866          387809 :     sobj->ptr  = ptr;
    1867          387809 :     sobj->ty   = ty;
    1868          387809 :     sobj->own  = own;
    1869          387809 :     sobj->next = 0;
    1870                 :   }
    1871          387809 :   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               2 :     return SWIG_Python_str_FromChar("this");
    2076                 : }
    2077                 : 
    2078                 : SWIGRUNTIME PyObject *
    2079          853974 : SWIG_This(void)
    2080                 : {
    2081          853976 :   static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
    2082          853974 :   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          783367 : SWIG_Python_GetSwigThis(PyObject *pyobj) 
    2094                 : {
    2095          783367 :   if (SwigPyObject_Check(pyobj)) {
    2096          139634 :     return (SwigPyObject *) pyobj;
    2097                 :   } else {
    2098          643733 :     PyObject *obj = 0;
    2099                 : #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
    2100          643733 :     if (PyInstance_Check(pyobj)) {
    2101               0 :       obj = _PyInstance_Lookup(pyobj, SWIG_This());      
    2102                 :     } else {
    2103          643733 :       PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    2104          643733 :       if (dictptr != NULL) {
    2105          643733 :   PyObject *dict = *dictptr;
    2106          643733 :   obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
    2107                 :       } else {
    2108                 : #ifdef PyWeakref_CheckProxy
    2109               0 :   if (PyWeakref_CheckProxy(pyobj)) {
    2110               0 :     PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
    2111               0 :     return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
    2112                 :   }
    2113                 : #endif
    2114               0 :   obj = PyObject_GetAttr(pyobj,SWIG_This());
    2115               0 :   if (obj) {
    2116               0 :     Py_DECREF(obj);
    2117                 :   } else {
    2118               0 :     if (PyErr_Occurred()) PyErr_Clear();
    2119               0 :     return 0;
    2120                 :   }
    2121                 :       }
    2122                 :     }
    2123                 : #else
    2124                 :     obj = PyObject_GetAttr(pyobj,SWIG_This());
    2125                 :     if (obj) {
    2126                 :       Py_DECREF(obj);
    2127                 :     } else {
    2128                 :       if (PyErr_Occurred()) PyErr_Clear();
    2129                 :       return 0;
    2130                 :     }
    2131                 : #endif
    2132          643733 :     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          643733 :     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          783557 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
    2160          783557 :   if (!obj) return SWIG_ERROR;
    2161          783557 :   if (obj == Py_None) {
    2162             190 :     if (ptr) *ptr = 0;
    2163             190 :     return SWIG_OK;
    2164                 :   } else {
    2165          783367 :     SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    2166          783367 :     if (own)
    2167               0 :       *own = 0;
    2168          783367 :     while (sobj) {
    2169          783367 :       void *vptr = sobj->ptr;
    2170          783367 :       if (ty) {
    2171          783367 :   swig_type_info *to = sobj->ty;
    2172          783367 :   if (to == ty) {
    2173                 :     /* no type cast needed */
    2174          783367 :     if (ptr) *ptr = vptr;
    2175                 :     break;
    2176                 :   } else {
    2177               0 :     swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    2178               0 :     if (!tc) {
    2179               0 :       sobj = (SwigPyObject *)sobj->next;
    2180                 :     } else {
    2181               0 :       if (ptr) {
    2182               0 :               int newmemory = 0;
    2183               0 :               *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
    2184               0 :               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               0 :   if (ptr) *ptr = vptr;
    2195                 :   break;
    2196                 :       }
    2197                 :     }
    2198          783367 :     if (sobj) {
    2199          783367 :       if (own)
    2200               0 :         *own = *own | sobj->own;
    2201          783367 :       if (flags & SWIG_POINTER_DISOWN) {
    2202          148775 :   sobj->own = 0;
    2203                 :       }
    2204          783367 :       return SWIG_OK;
    2205                 :     } else {
    2206               0 :       int res = SWIG_ERROR;
    2207               0 :       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               0 :       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          210241 : SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
    2306                 : {
    2307                 : #if (PY_VERSION_HEX >= 0x02020000)
    2308          210241 :   PyObject *inst = 0;
    2309          210241 :   PyObject *newraw = data->newraw;
    2310          210241 :   if (newraw) {
    2311          210241 :     inst = PyObject_Call(newraw, data->newargs, NULL);
    2312          210241 :     if (inst) {
    2313                 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
    2314          210241 :       PyObject **dictptr = _PyObject_GetDictPtr(inst);
    2315          210241 :       if (dictptr != NULL) {
    2316          210241 :   PyObject *dict = *dictptr;
    2317          210241 :   if (dict == NULL) {
    2318          210241 :     dict = PyDict_New();
    2319          210241 :     *dictptr = dict;
    2320          210241 :     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          210241 :   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          250119 : SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
    2415          250119 :   if (!ptr) {
    2416            2177 :     return SWIG_Py_Void();
    2417                 :   } else {
    2418          247942 :     int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2419          247942 :     PyObject *robj = SwigPyObject_New(ptr, type, own);
    2420          247942 :     SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    2421          247942 :     if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    2422          210241 :       PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    2423          210241 :       if (inst) {
    2424          210241 :   Py_DECREF(robj);
    2425          210241 :   robj = inst;
    2426                 :       }
    2427                 :     }
    2428          247942 :     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               2 :   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               2 :             (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
    2460                 : #endif
    2461               2 :     if (PyErr_Occurred()) {
    2462               0 :       PyErr_Clear();
    2463               0 :       type_pointer = (void *)0;
    2464                 :     }
    2465                 : #endif
    2466                 :   }
    2467               2 :   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               0 : SWIG_Python_DestroyModule(void *vptr)
    2518                 : {
    2519               0 :   swig_module_info *swig_module = (swig_module_info *) vptr;
    2520               0 :   swig_type_info **types = swig_module->types;
    2521                 :   size_t i;
    2522                 : #endif
    2523               0 :   for (i =0; i < swig_module->size; ++i) {
    2524               0 :     swig_type_info *ty = types[i];
    2525               0 :     if (ty->owndata) {
    2526               0 :       SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
    2527               0 :       if (data) SwigPyClientData_Del(data);
    2528                 :     }
    2529                 :   }
    2530               0 :   Py_DECREF(SWIG_This());
    2531               0 : }
    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               0 :   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               0 :   PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
    2550                 : #endif
    2551               0 :   if (pointer && module) {
    2552               0 :     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_GDALProgressFunc swig_types[0]
    2726                 : #define SWIGTYPE_p_GIntBig swig_types[1]
    2727                 : #define SWIGTYPE_p_OGRDataSourceShadow swig_types[2]
    2728                 : #define SWIGTYPE_p_OGRDriverShadow swig_types[3]
    2729                 : #define SWIGTYPE_p_OGRFeatureDefnShadow swig_types[4]
    2730                 : #define SWIGTYPE_p_OGRFeatureShadow swig_types[5]
    2731                 : #define SWIGTYPE_p_OGRFieldDefnShadow swig_types[6]
    2732                 : #define SWIGTYPE_p_OGRGeometryShadow swig_types[7]
    2733                 : #define SWIGTYPE_p_OGRLayerShadow swig_types[8]
    2734                 : #define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[9]
    2735                 : #define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[10]
    2736                 : #define SWIGTYPE_p_char swig_types[11]
    2737                 : #define SWIGTYPE_p_double swig_types[12]
    2738                 : #define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[13]
    2739                 : #define SWIGTYPE_p_int swig_types[14]
    2740                 : #define SWIGTYPE_p_p_char swig_types[15]
    2741                 : #define SWIGTYPE_p_p_double swig_types[16]
    2742                 : #define SWIGTYPE_p_p_int swig_types[17]
    2743                 : static swig_type_info *swig_types[19];
    2744                 : static swig_module_info swig_module = {swig_types, 18, 0, 0, 0, 0};
    2745                 : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
    2746                 : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
    2747                 : 
    2748                 : /* -------- TYPES TABLE (END) -------- */
    2749                 : 
    2750                 : #if (PY_VERSION_HEX <= 0x02000000)
    2751                 : # if !defined(SWIG_PYTHON_CLASSIC)
    2752                 : #  error "This python version requires swig to be run with the '-classic' option"
    2753                 : # endif
    2754                 : #endif
    2755                 : 
    2756                 : /*-----------------------------------------------
    2757                 :               @(target):= _ogr.so
    2758                 :   ------------------------------------------------*/
    2759                 : #if PY_VERSION_HEX >= 0x03000000
    2760                 : #  define SWIG_init    PyInit__ogr
    2761                 : 
    2762                 : #else
    2763                 : #  define SWIG_init    init_ogr
    2764                 : 
    2765                 : #endif
    2766                 : #define SWIG_name    "_ogr"
    2767                 : 
    2768                 : #define SWIGVERSION 0x010340 
    2769                 : #define SWIG_VERSION SWIGVERSION
    2770                 : 
    2771                 : 
    2772                 : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
    2773                 : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 
    2774                 : 
    2775                 : 
    2776                 : #include <stdexcept>
    2777                 : 
    2778                 : 
    2779                 : namespace swig {
    2780                 :   class SwigPtr_PyObject {
    2781                 :   protected:
    2782                 :     PyObject *_obj;
    2783                 : 
    2784                 :   public:
    2785                 :     SwigPtr_PyObject() :_obj(0)
    2786                 :     {
    2787                 :     }
    2788                 : 
    2789                 :     SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
    2790                 :     {
    2791                 :       Py_XINCREF(_obj);      
    2792                 :     }
    2793                 :     
    2794                 :     SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    2795                 :     {
    2796                 :       if (initial_ref) {
    2797                 :         Py_XINCREF(_obj);
    2798                 :       }
    2799                 :     }
    2800                 :     
    2801                 :     SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    2802                 :     {
    2803                 :       Py_XINCREF(item._obj);
    2804                 :       Py_XDECREF(_obj);
    2805                 :       _obj = item._obj;
    2806                 :       return *this;      
    2807                 :     }
    2808                 :     
    2809                 :     ~SwigPtr_PyObject() 
    2810                 :     {
    2811                 :       Py_XDECREF(_obj);
    2812                 :     }
    2813                 :     
    2814                 :     operator PyObject *() const
    2815                 :     {
    2816                 :       return _obj;
    2817                 :     }
    2818                 : 
    2819                 :     PyObject *operator->() const
    2820                 :     {
    2821                 :       return _obj;
    2822                 :     }
    2823                 :   };
    2824                 : }
    2825                 : 
    2826                 : 
    2827                 : namespace swig {
    2828                 :   struct SwigVar_PyObject : SwigPtr_PyObject {
    2829                 :     SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
    2830                 :     
    2831                 :     SwigVar_PyObject & operator = (PyObject* obj)
    2832                 :     {
    2833                 :       Py_XDECREF(_obj);
    2834                 :       _obj = obj;
    2835                 :       return *this;      
    2836                 :     }
    2837                 :   };
    2838                 : }
    2839                 : 
    2840                 : 
    2841                 : typedef char retStringAndCPLFree;
    2842                 : 
    2843                 : 
    2844                 : #include <iostream>
    2845                 : using namespace std;
    2846                 : 
    2847                 : #include "ogr_api.h"
    2848                 : #include "ogr_p.h"
    2849                 : #include "ogr_core.h"
    2850                 : #include "cpl_port.h"
    2851                 : #include "cpl_string.h"
    2852                 : #include "ogr_srs_api.h"
    2853                 : 
    2854                 : #ifdef DEBUG 
    2855                 : typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
    2856                 : typedef struct OGRDriverHS OGRDriverShadow;
    2857                 : typedef struct OGRDataSourceHS OGRDataSourceShadow;
    2858                 : typedef struct OGRLayerHS OGRLayerShadow;
    2859                 : typedef struct OGRFeatureHS OGRFeatureShadow;
    2860                 : typedef struct OGRFeatureDefnHS OGRFeatureDefnShadow;
    2861                 : typedef struct OGRGeometryHS OGRGeometryShadow;
    2862                 : typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
    2863                 : typedef struct OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
    2864                 : typedef struct OGRFieldDefnHS OGRFieldDefnShadow;
    2865                 : #else
    2866                 : typedef void OSRSpatialReferenceShadow;
    2867                 : typedef void OGRDriverShadow;
    2868                 : typedef void OGRDataSourceShadow;
    2869                 : typedef void OGRLayerShadow;
    2870                 : typedef void OGRFeatureShadow;
    2871                 : typedef void OGRFeatureDefnShadow;
    2872                 : typedef void OGRGeometryShadow;
    2873                 : typedef void OSRCoordinateTransformationShadow;
    2874                 : typedef void OGRFieldDefnShadow;
    2875                 : #endif
    2876                 : 
    2877                 : 
    2878                 :   #define SWIG_From_long   PyInt_FromLong 
    2879                 : 
    2880                 : 
    2881                 : SWIGINTERNINLINE PyObject *
    2882                 : SWIG_From_int  (int value)
    2883                 : {    
    2884           27784 :   return SWIG_From_long  (value);
    2885                 : }
    2886                 : 
    2887                 : 
    2888                 : SWIGINTERN swig_type_info*
    2889                 : SWIG_pchar_descriptor(void)
    2890                 : {
    2891                 :   static int init = 0;
    2892                 :   static swig_type_info* info = 0;
    2893              66 :   if (!init) {
    2894               2 :     info = SWIG_TypeQuery("_p_char");
    2895               2 :     init = 1;
    2896                 :   }
    2897              66 :   return info;
    2898                 : }
    2899                 : 
    2900                 : 
    2901                 : SWIGINTERNINLINE PyObject *
    2902                 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
    2903                 : {
    2904           12400 :   if (carray) {
    2905           12334 :     if (size > INT_MAX) {
    2906               0 :       swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    2907                 :       return pchar_descriptor ? 
    2908               0 :   SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    2909                 :     } else {
    2910                 : #if PY_VERSION_HEX >= 0x03000000
    2911                 :       return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
    2912                 : #else
    2913           12334 :       return PyString_FromStringAndSize(carray, static_cast< int >(size));
    2914                 : #endif
    2915                 :     }
    2916                 :   } else {
    2917              66 :     return SWIG_Py_Void();
    2918                 :   }
    2919                 : }
    2920                 : 
    2921                 : 
    2922                 : SWIGINTERNINLINE PyObject * 
    2923           12400 : SWIG_FromCharPtr(const char *cptr)
    2924                 : { 
    2925           24800 :   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
    2926                 : }
    2927                 : 
    2928                 : 
    2929                 : int bUseExceptions=0;
    2930                 : CPLErrorHandler pfnPreviousHandler = CPLDefaultErrorHandler;
    2931                 : 
    2932                 : void CPL_STDCALL 
    2933               0 : PythonBindingErrorHandler(CPLErr eclass, int code, const char *msg ) 
    2934                 : {
    2935                 :   /* 
    2936                 :   ** Generally we want to supress error reporting if we have exceptions
    2937                 :   ** enabled as the error message will be in the exception thrown in 
    2938                 :   ** Python.  
    2939                 :   */
    2940                 : 
    2941                 :   /* If the error class is CE_Fatal, we want to have a message issued
    2942                 :      because the CPL support code does an abort() before any exception
    2943                 :      can be generated */
    2944               0 :   if (eclass == CE_Fatal ) {
    2945               0 :     pfnPreviousHandler(eclass, code, msg );
    2946                 :   }
    2947                 : 
    2948                 :   /*
    2949                 :   ** We do not want to interfere with warnings or debug messages since
    2950                 :   ** they won't be translated into exceptions.
    2951                 :   */
    2952               0 :   if (eclass == CE_Warning || eclass == CE_Debug ) {
    2953               0 :     pfnPreviousHandler(eclass, code, msg );
    2954                 :   }
    2955               0 : }
    2956                 : 
    2957                 : 
    2958                 : 
    2959               0 : int GetUseExceptions() {
    2960               0 :   return bUseExceptions;
    2961                 : }
    2962                 : 
    2963               0 : void UseExceptions() {
    2964               0 :   bUseExceptions = 1;
    2965                 :   pfnPreviousHandler = 
    2966               0 :     CPLSetErrorHandler( (CPLErrorHandler) PythonBindingErrorHandler );
    2967               0 : }
    2968                 : 
    2969               0 : void DontUseExceptions() {
    2970               0 :   bUseExceptions = 0;
    2971               0 :   CPLSetErrorHandler( pfnPreviousHandler );
    2972               0 : }
    2973                 : 
    2974                 : 
    2975                 : 
    2976                 : /* Return a PyObject* from a NULL terminated C String */
    2977            1520 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
    2978                 : {
    2979            1520 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    2980           96454 :   while(*pszIter != 0)
    2981                 :   {
    2982           93414 :     if (*pszIter > 127)
    2983                 :     {
    2984               0 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "ignore");
    2985               0 :         if (pyObj != NULL)
    2986               0 :             return pyObj;
    2987                 : #if PY_VERSION_HEX >= 0x03000000
    2988                 :         return PyBytes_FromString(pszStr);
    2989                 : #else
    2990               0 :         return PyString_FromString(pszStr);
    2991                 : #endif
    2992                 :     }
    2993           93414 :     pszIter ++;
    2994                 :   }
    2995                 : #if PY_VERSION_HEX >= 0x03000000
    2996                 :   return PyUnicode_FromString(pszStr); 
    2997                 : #else
    2998            1520 :   return PyString_FromString(pszStr);
    2999                 : #endif
    3000                 : }
    3001                 : 
    3002                 : /* Return a NULL terminated c String from a PyObject */
    3003                 : /* Result must be freed with GDALPythonFreeCStr */
    3004            5149 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
    3005                 : {
    3006            5149 :   *pbToFree = 0;
    3007            5149 :   if (PyUnicode_Check(pyObject))
    3008                 :   {
    3009                 :       char *pszStr;
    3010                 :       char *pszNewStr;
    3011                 :       Py_ssize_t nLen;
    3012               3 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
    3013                 : #if PY_VERSION_HEX >= 0x03000000
    3014                 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    3015                 : #else
    3016               3 :       PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    3017                 : #endif
    3018               3 :       pszNewStr = (char *) malloc(nLen+1);
    3019               3 :       memcpy(pszNewStr, pszStr, nLen+1);
    3020               3 :       Py_XDECREF(pyUTF8Str);
    3021               3 :       *pbToFree = 1;
    3022               3 :       return pszNewStr;
    3023                 :   }
    3024                 :   else 
    3025                 :   {
    3026                 : #if PY_VERSION_HEX >= 0x03000000
    3027                 :       return PyBytes_AsString(pyObject);
    3028                 : #else
    3029            5146 :       return PyString_AsString(pyObject);
    3030                 : #endif
    3031                 :   }
    3032                 : }
    3033                 : 
    3034            5149 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
    3035                 : {
    3036            5149 :    if (bToFree)
    3037               3 :        free(ptr);
    3038            5149 : }
    3039                 : 
    3040                 : 
    3041                 : 
    3042                 : 
    3043                 : typedef struct {
    3044                 :     PyObject *psPyCallback;
    3045                 :     PyObject *psPyCallbackData;
    3046                 :     int nLastReported;
    3047                 : } PyProgressData;
    3048                 : 
    3049                 : /************************************************************************/
    3050                 : /*                          PyProgressProxy()                           */
    3051                 : /************************************************************************/
    3052                 : 
    3053                 : int CPL_STDCALL
    3054               0 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
    3055                 : 
    3056                 : {
    3057               0 :     PyProgressData *psInfo = (PyProgressData *) pData;
    3058                 :     PyObject *psArgs, *psResult;
    3059               0 :     int      bContinue = TRUE;
    3060                 : 
    3061               0 :     if( psInfo->nLastReported == (int) (100.0 * dfComplete) )
    3062               0 :         return TRUE;
    3063                 : 
    3064               0 :     if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
    3065               0 :         return TRUE;
    3066                 : 
    3067               0 :     psInfo->nLastReported = (int) (100.0 * dfComplete);
    3068                 :     
    3069               0 :     if( pszMessage == NULL )
    3070               0 :         pszMessage = "";
    3071                 : 
    3072               0 :     if( psInfo->psPyCallbackData == NULL )
    3073               0 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    3074                 :     else
    3075                 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, 
    3076               0 :                          psInfo->psPyCallbackData );
    3077                 : 
    3078               0 :     psResult = PyEval_CallObject( psInfo->psPyCallback, psArgs);
    3079               0 :     Py_XDECREF(psArgs);
    3080                 : 
    3081               0 :     if( psResult == NULL )
    3082                 :     {
    3083               0 :         return TRUE;
    3084                 :     }
    3085                 : 
    3086               0 :     if( psResult == Py_None )
    3087                 :     {
    3088               0 :   Py_XDECREF(Py_None);
    3089               0 :         return TRUE;
    3090                 :     }
    3091                 : 
    3092               0 :     if( !PyArg_Parse( psResult, "i", &bContinue ) )
    3093                 :     {
    3094               0 :         PyErr_SetString(PyExc_ValueError, "bad progress return value");
    3095               0 :   return FALSE;
    3096                 :     }
    3097                 : 
    3098               0 :     Py_XDECREF(psResult);
    3099                 : 
    3100               0 :     return bContinue;    
    3101                 : }
    3102                 : 
    3103                 : 
    3104                 : SWIGINTERN int
    3105           22765 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
    3106                 : {
    3107                 : #if PY_VERSION_HEX>=0x03000000
    3108                 :   if (PyUnicode_Check(obj))
    3109                 : #else  
    3110           22765 :   if (PyString_Check(obj))
    3111                 : #endif
    3112                 :   {
    3113                 :     char *cstr; Py_ssize_t len;
    3114                 : #if PY_VERSION_HEX>=0x03000000
    3115                 :     if (!alloc && cptr) {
    3116                 :         /* We can't allow converting without allocation, since the internal
    3117                 :            representation of string in Python 3 is UCS-2/UCS-4 but we require
    3118                 :            a UTF-8 representation.
    3119                 :            TODO(bhy) More detailed explanation */
    3120                 :         return SWIG_RuntimeError;
    3121                 :     }
    3122                 :     obj = PyUnicode_AsUTF8String(obj);
    3123                 :     PyBytes_AsStringAndSize(obj, &cstr, &len);
    3124                 :     if(alloc) *alloc = SWIG_NEWOBJ;
    3125                 : #else
    3126           22699 :     PyString_AsStringAndSize(obj, &cstr, &len);
    3127                 : #endif
    3128           22699 :     if (cptr) {
    3129           16466 :       if (alloc) {
    3130                 :   /* 
    3131                 :      In python the user should not be able to modify the inner
    3132                 :      string representation. To warranty that, if you define
    3133                 :      SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
    3134                 :      buffer is always returned.
    3135                 : 
    3136                 :      The default behavior is just to return the pointer value,
    3137                 :      so, be careful.
    3138                 :   */ 
    3139                 : #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
    3140                 :   if (*alloc != SWIG_OLDOBJ) 
    3141                 : #else
    3142           16466 :   if (*alloc == SWIG_NEWOBJ) 
    3143                 : #endif
    3144                 :     {
    3145               0 :       *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
    3146               0 :       *alloc = SWIG_NEWOBJ;
    3147                 :     }
    3148                 :   else {
    3149           16466 :     *cptr = cstr;
    3150           16466 :     *alloc = SWIG_OLDOBJ;
    3151                 :   }
    3152                 :       } else {
    3153                 :         #if PY_VERSION_HEX>=0x03000000
    3154                 :         assert(0); /* Should never reach here in Python 3 */
    3155                 :         #endif
    3156               0 :   *cptr = SWIG_Python_str_AsChar(obj);
    3157                 :       }
    3158                 :     }
    3159           22699 :     if (psize) *psize = len + 1;
    3160                 : #if PY_VERSION_HEX>=0x03000000
    3161                 :     Py_XDECREF(obj);
    3162                 : #endif
    3163           22699 :     return SWIG_OK;
    3164                 :   } else {
    3165              66 :     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3166              66 :     if (pchar_descriptor) {
    3167              66 :       void* vptr = 0;
    3168              66 :       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
    3169              66 :   if (cptr) *cptr = (char *) vptr;
    3170              66 :   if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
    3171              66 :   if (alloc) *alloc = SWIG_OLDOBJ;
    3172              66 :   return SWIG_OK;
    3173                 :       }
    3174                 :     }
    3175                 :   }
    3176               0 :   return SWIG_TypeError;
    3177                 : }
    3178                 : 
    3179                 : 
    3180                 : 
    3181                 : 
    3182                 : SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CreateDataSource(OGRDriverShadow *self,char const *utf8_path,char **options=0){
    3183             287 :     OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CreateDataSource( self, utf8_path, options);
    3184             287 :     return ds;
    3185                 :   }
    3186                 : SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CopyDataSource(OGRDriverShadow *self,OGRDataSourceShadow *copy_ds,char const *utf8_path,char **options=0){
    3187               1 :     OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CopyDataSource(self, copy_ds, utf8_path, options);
    3188               1 :     return ds;
    3189                 :   }
    3190                 : 
    3191                 : #include <limits.h>
    3192                 : #if !defined(SWIG_NO_LLONG_MAX)
    3193                 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
    3194                 : #   define LLONG_MAX __LONG_LONG_MAX__
    3195                 : #   define LLONG_MIN (-LLONG_MAX - 1LL)
    3196                 : #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
    3197                 : # endif
    3198                 : #endif
    3199                 : 
    3200                 : 
    3201                 : SWIGINTERN int
    3202           74958 : SWIG_AsVal_double (PyObject *obj, double *val)
    3203                 : {
    3204           74958 :   int res = SWIG_TypeError;
    3205           74958 :   if (PyFloat_Check(obj)) {
    3206           71077 :     if (val) *val = PyFloat_AsDouble(obj);
    3207           71077 :     return SWIG_OK;
    3208            3881 :   } else if (PyInt_Check(obj)) {
    3209             168 :     if (val) *val = PyInt_AsLong(obj);
    3210             168 :     return SWIG_OK;
    3211            3713 :   } else if (PyLong_Check(obj)) {
    3212               0 :     double v = PyLong_AsDouble(obj);
    3213               0 :     if (!PyErr_Occurred()) {
    3214               0 :       if (val) *val = v;
    3215               0 :       return SWIG_OK;
    3216                 :     } else {
    3217               0 :       PyErr_Clear();
    3218                 :     }
    3219                 :   }
    3220                 : #ifdef SWIG_PYTHON_CAST_MODE
    3221                 :   {
    3222                 :     int dispatch = 0;
    3223                 :     double d = PyFloat_AsDouble(obj);
    3224                 :     if (!PyErr_Occurred()) {
    3225                 :       if (val) *val = d;
    3226                 :       return SWIG_AddCast(SWIG_OK);
    3227                 :     } else {
    3228                 :       PyErr_Clear();
    3229                 :     }
    3230                 :     if (!dispatch) {
    3231                 :       long v = PyLong_AsLong(obj);
    3232                 :       if (!PyErr_Occurred()) {
    3233                 :   if (val) *val = v;
    3234                 :   return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
    3235                 :       } else {
    3236                 :   PyErr_Clear();
    3237                 :       }
    3238                 :     }
    3239                 :   }
    3240                 : #endif
    3241            3713 :   return res;
    3242                 : }
    3243                 : 
    3244                 : 
    3245                 : #include <float.h>
    3246                 : 
    3247                 : 
    3248                 : #include <math.h>
    3249                 : 
    3250                 : 
    3251                 : SWIGINTERNINLINE int
    3252                 : SWIG_CanCastAsInteger(double *d, double min, double max) {
    3253                 :   double x = *d;
    3254                 :   if ((min <= x && x <= max)) {
    3255                 :    double fx = floor(x);
    3256                 :    double cx = ceil(x);
    3257                 :    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
    3258                 :    if ((errno == EDOM) || (errno == ERANGE)) {
    3259                 :      errno = 0;
    3260                 :    } else {
    3261                 :      double summ, reps, diff;
    3262                 :      if (rd < x) {
    3263                 :        diff = x - rd;
    3264                 :      } else if (rd > x) {
    3265                 :        diff = rd - x;
    3266                 :      } else {
    3267                 :        return 1;
    3268                 :      }
    3269                 :      summ = rd + x;
    3270                 :      reps = diff/summ;
    3271                 :      if (reps < 8*DBL_EPSILON) {
    3272                 :        *d = rd;
    3273                 :        return 1;
    3274                 :      }
    3275                 :    }
    3276                 :   }
    3277                 :   return 0;
    3278                 : }
    3279                 : 
    3280                 : 
    3281                 : SWIGINTERN int
    3282          156595 : SWIG_AsVal_long (PyObject *obj, long* val)
    3283                 : {
    3284          156595 :   if (PyInt_Check(obj)) {
    3285          149545 :     if (val) *val = PyInt_AsLong(obj);
    3286          149545 :     return SWIG_OK;
    3287            7050 :   } else if (PyLong_Check(obj)) {
    3288               0 :     long v = PyLong_AsLong(obj);
    3289               0 :     if (!PyErr_Occurred()) {
    3290               0 :       if (val) *val = v;
    3291               0 :       return SWIG_OK;
    3292                 :     } else {
    3293               0 :       PyErr_Clear();
    3294                 :     }
    3295                 :   }
    3296                 : #ifdef SWIG_PYTHON_CAST_MODE
    3297                 :   {
    3298                 :     int dispatch = 0;
    3299                 :     long v = PyInt_AsLong(obj);
    3300                 :     if (!PyErr_Occurred()) {
    3301                 :       if (val) *val = v;
    3302                 :       return SWIG_AddCast(SWIG_OK);
    3303                 :     } else {
    3304                 :       PyErr_Clear();
    3305                 :     }
    3306                 :     if (!dispatch) {
    3307                 :       double d;
    3308                 :       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
    3309                 :       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
    3310                 :   if (val) *val = (long)(d);
    3311                 :   return res;
    3312                 :       }
    3313                 :     }
    3314                 :   }
    3315                 : #endif
    3316            7050 :   return SWIG_TypeError;
    3317                 : }
    3318                 : 
    3319                 : 
    3320                 : SWIGINTERN int
    3321          156450 : SWIG_AsVal_int (PyObject * obj, int *val)
    3322                 : {
    3323                 :   long v;
    3324          156450 :   int res = SWIG_AsVal_long (obj, &v);
    3325          156450 :   if (SWIG_IsOK(res)) {
    3326          149400 :     if ((v < INT_MIN || v > INT_MAX)) {
    3327               0 :       return SWIG_OverflowError;
    3328                 :     } else {
    3329          149400 :       if (val) *val = static_cast< int >(v);
    3330                 :     }
    3331                 :   }  
    3332          156450 :   return res;
    3333                 : }
    3334                 : 
    3335                 : SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_Open(OGRDriverShadow *self,char const *utf8_path,int update=0){
    3336              56 :     OGRDataSourceShadow* ds = (OGRDataSourceShadow*) OGR_Dr_Open(self, utf8_path, update);
    3337              56 :     if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    3338                 :     {
    3339                 :         CPLDebug( "SWIG",
    3340                 :           "OGR_Dr_Open() succeeded, but an error is posted, so we destroy"
    3341               0 :           " the datasource and fail at swig level." );
    3342               0 :         OGRReleaseDataSource(ds);
    3343               0 :         ds = NULL;
    3344                 :     }
    3345              56 :     return ds;
    3346                 :   }
    3347                 : SWIGINTERN int OGRDriverShadow_DeleteDataSource(OGRDriverShadow *self,char const *utf8_path){
    3348                 : 
    3349             164 :     return OGR_Dr_DeleteDataSource( self, utf8_path );
    3350                 :   }
    3351                 : SWIGINTERN bool OGRDriverShadow_TestCapability(OGRDriverShadow *self,char const *cap){
    3352              41 :     return (OGR_Dr_TestCapability(self, cap) > 0);
    3353                 :   }
    3354                 : 
    3355                 : SWIGINTERNINLINE PyObject*
    3356           40753 :   SWIG_From_bool  (bool value)
    3357                 : {
    3358           40753 :   return PyBool_FromLong(value ? 1 : 0);
    3359                 : }
    3360                 : 
    3361                 : SWIGINTERN char const *OGRDriverShadow_GetName(OGRDriverShadow *self){
    3362             141 :     return OGR_Dr_GetName( self );
    3363                 :   }
    3364                 : SWIGINTERN void OGRDriverShadow_Register(OGRDriverShadow *self){
    3365               5 :     OGRRegisterDriver( self );
    3366                 :   }
    3367                 : SWIGINTERN void OGRDriverShadow_Deregister(OGRDriverShadow *self){
    3368               5 :     OGRDeregisterDriver( self );
    3369                 :   }
    3370                 : SWIGINTERN void delete_OGRDataSourceShadow(OGRDataSourceShadow *self){
    3371            1249 :     OGRReleaseDataSource(self);
    3372                 :   }
    3373                 : SWIGINTERN int OGRDataSourceShadow_GetRefCount(OGRDataSourceShadow *self){
    3374               4 :     return OGR_DS_GetRefCount(self);
    3375                 :   }
    3376                 : SWIGINTERN int OGRDataSourceShadow_GetSummaryRefCount(OGRDataSourceShadow *self){
    3377               0 :     return OGR_DS_GetSummaryRefCount(self);
    3378                 :   }
    3379                 : SWIGINTERN int OGRDataSourceShadow_GetLayerCount(OGRDataSourceShadow *self){
    3380             231 :     return OGR_DS_GetLayerCount(self);
    3381                 :   }
    3382                 : SWIGINTERN OGRDriverShadow *OGRDataSourceShadow_GetDriver(OGRDataSourceShadow *self){
    3383             110 :     return (OGRDriverShadow *) OGR_DS_GetDriver( self );
    3384                 :   }
    3385                 : SWIGINTERN char const *OGRDataSourceShadow_GetName(OGRDataSourceShadow *self){
    3386              11 :     return OGR_DS_GetName(self);
    3387                 :   }
    3388                 : SWIGINTERN OGRErr OGRDataSourceShadow_DeleteLayer(OGRDataSourceShadow *self,int index){
    3389              15 :     return OGR_DS_DeleteLayer(self, index);
    3390                 :   }
    3391                 : 
    3392                 : 
    3393                 : #include "ogr_core.h"
    3394                 : static char const *
    3395             179 : OGRErrMessages( int rc ) {
    3396             179 :   switch( rc ) {
    3397                 :   case OGRERR_NONE:
    3398               0 :     return "OGR Error: None";
    3399                 :   case OGRERR_NOT_ENOUGH_DATA:
    3400               0 :     return "OGR Error: Not enough data to deserialize";
    3401                 :   case OGRERR_NOT_ENOUGH_MEMORY:
    3402               0 :     return "OGR Error: Not enough memory";
    3403                 :   case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
    3404              11 :     return "OGR Error: Unsupported geometry type";
    3405                 :   case OGRERR_UNSUPPORTED_OPERATION:
    3406               0 :     return "OGR Error: Unsupported operation";
    3407                 :   case OGRERR_CORRUPT_DATA:
    3408             166 :     return "OGR Error: Corrupt data";
    3409                 :   case OGRERR_FAILURE:
    3410               2 :     return "OGR Error: General Error";
    3411                 :   case OGRERR_UNSUPPORTED_SRS:
    3412               0 :     return "OGR Error: Unsupported SRS";
    3413                 :   case OGRERR_INVALID_HANDLE:
    3414               0 :     return "OGR Error: Invalid handle";
    3415                 :   default:
    3416               0 :     return "OGR Error: Unknown";
    3417                 :   }
    3418                 : }
    3419                 : 
    3420                 : SWIGINTERN OGRErr OGRDataSourceShadow_SyncToDisk(OGRDataSourceShadow *self){
    3421               0 :     return OGR_DS_SyncToDisk(self);
    3422                 :   }
    3423                 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_CreateLayer(OGRDataSourceShadow *self,char const *name,OSRSpatialReferenceShadow *srs=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
    3424                 :     OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_CreateLayer( self,
    3425                 :                   name,
    3426                 :                   srs,
    3427                 :                   geom_type,
    3428            1558 :                   options);
    3429            1558 :     return layer;
    3430                 :   }
    3431                 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_CopyLayer(OGRDataSourceShadow *self,OGRLayerShadow *src_layer,char const *new_name,char **options=0){
    3432                 :     OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_CopyLayer( self,
    3433                 :                                                       src_layer,
    3434                 :                                                       new_name,
    3435               4 :                                                       options);
    3436               4 :     return layer;
    3437                 :   }
    3438                 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByIndex(OGRDataSourceShadow *self,int index=0){
    3439                 : 
    3440            4656 :     OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayer(self, index);
    3441            4656 :     return layer;
    3442                 :   }
    3443                 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByName(OGRDataSourceShadow *self,char const *layer_name){
    3444            1713 :     OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayerByName(self, layer_name);
    3445            1713 :     return layer;
    3446                 :   }
    3447                 : SWIGINTERN bool OGRDataSourceShadow_TestCapability(OGRDataSourceShadow *self,char const *cap){
    3448              54 :     return (OGR_DS_TestCapability(self, cap) > 0);
    3449                 :   }
    3450                 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_ExecuteSQL(OGRDataSourceShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
    3451                 :     OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_ExecuteSQL((OGRDataSourceShadow*)self,
    3452                 :                                                       statement,
    3453                 :                                                       spatialFilter,
    3454            1802 :                                                       dialect);
    3455            1802 :     return layer;
    3456                 :   }
    3457                 : SWIGINTERN void OGRDataSourceShadow_ReleaseResultSet(OGRDataSourceShadow *self,OGRLayerShadow *layer){
    3458             762 :     OGR_DS_ReleaseResultSet(self, layer);
    3459                 :   }
    3460                 : SWIGINTERN int OGRLayerShadow_GetRefCount(OGRLayerShadow *self){
    3461               0 :     return OGR_L_GetRefCount(self);
    3462                 :   }
    3463                 : SWIGINTERN void OGRLayerShadow_SetSpatialFilter(OGRLayerShadow *self,OGRGeometryShadow *filter){
    3464              65 :     OGR_L_SetSpatialFilter (self, filter);
    3465                 :   }
    3466                 : SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
    3467           17519 :     OGR_L_SetSpatialFilterRect(self, minx, miny, maxx, maxy);                          
    3468                 :   }
    3469                 : SWIGINTERN OGRGeometryShadow *OGRLayerShadow_GetSpatialFilter(OGRLayerShadow *self){
    3470               0 :     return (OGRGeometryShadow *) OGR_L_GetSpatialFilter(self);
    3471                 :   }
    3472                 : SWIGINTERN OGRErr OGRLayerShadow_SetAttributeFilter(OGRLayerShadow *self,char *filter_string){
    3473             240 :     return OGR_L_SetAttributeFilter((OGRLayerShadow*)self, filter_string);
    3474                 :   }
    3475                 : SWIGINTERN void OGRLayerShadow_ResetReading(OGRLayerShadow *self){
    3476           18939 :     OGR_L_ResetReading(self);
    3477                 :   }
    3478                 : SWIGINTERN char const *OGRLayerShadow_GetName(OGRLayerShadow *self){
    3479            4158 :     return OGR_L_GetName(self);
    3480                 :   }
    3481                 : SWIGINTERN OGRwkbGeometryType OGRLayerShadow_GetGeomType(OGRLayerShadow *self){
    3482             113 :     return (OGRwkbGeometryType) OGR_L_GetGeomType(self);
    3483                 :   }
    3484                 : SWIGINTERN char const *OGRLayerShadow_GetGeometryColumn(OGRLayerShadow *self){
    3485              29 :     return OGR_L_GetGeometryColumn(self);
    3486                 :   }
    3487                 : SWIGINTERN char const *OGRLayerShadow_GetFIDColumn(OGRLayerShadow *self){
    3488              21 :     return OGR_L_GetFIDColumn(self);
    3489                 :   }
    3490                 : SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetFeature(OGRLayerShadow *self,long fid){
    3491              97 :     return (OGRFeatureShadow*) OGR_L_GetFeature(self, fid);
    3492                 :   }
    3493                 : SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetNextFeature(OGRLayerShadow *self){
    3494           60559 :     return (OGRFeatureShadow*) OGR_L_GetNextFeature(self);
    3495                 :   }
    3496                 : SWIGINTERN OGRErr OGRLayerShadow_SetNextByIndex(OGRLayerShadow *self,long new_index){
    3497              10 :     return OGR_L_SetNextByIndex(self, new_index);
    3498                 :   }
    3499                 : SWIGINTERN OGRErr OGRLayerShadow_SetFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    3500            2057 :     return OGR_L_SetFeature(self, feature);
    3501                 :   }
    3502                 : SWIGINTERN OGRErr OGRLayerShadow_CreateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    3503           32957 :     return OGR_L_CreateFeature(self, feature);
    3504                 :   }
    3505                 : SWIGINTERN OGRErr OGRLayerShadow_DeleteFeature(OGRLayerShadow *self,long fid){
    3506              38 :     return OGR_L_DeleteFeature(self, fid);
    3507                 :   }
    3508                 : SWIGINTERN OGRErr OGRLayerShadow_SyncToDisk(OGRLayerShadow *self){
    3509               3 :     return OGR_L_SyncToDisk(self);
    3510                 :   }
    3511                 : SWIGINTERN OGRFeatureDefnShadow *OGRLayerShadow_GetLayerDefn(OGRLayerShadow *self){
    3512           31806 :     return (OGRFeatureDefnShadow*) OGR_L_GetLayerDefn(self);
    3513                 :   }
    3514                 : SWIGINTERN int OGRLayerShadow_GetFeatureCount(OGRLayerShadow *self,int force=1){
    3515             670 :     return OGR_L_GetFeatureCount(self, force);
    3516                 :   }
    3517                 : SWIGINTERN void OGRLayerShadow_GetExtent(OGRLayerShadow *self,double argout[4],int *isvalid=NULL,int force=1,int can_return_null=0){
    3518              90 :     OGRErr eErr = OGR_L_GetExtent(self, (OGREnvelope*)argout, force);
    3519              90 :     if (can_return_null)
    3520               9 :         *isvalid = (eErr == OGRERR_NONE);
    3521                 :     else
    3522              81 :         *isvalid = TRUE;
    3523                 :     return;
    3524                 :   }
    3525                 : SWIGINTERN bool OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
    3526             123 :     return (OGR_L_TestCapability(self, cap) > 0);
    3527                 :   }
    3528                 : SWIGINTERN OGRErr OGRLayerShadow_CreateField(OGRLayerShadow *self,OGRFieldDefnShadow *field_def,int approx_ok=1){
    3529            4741 :     return OGR_L_CreateField(self, field_def, approx_ok);
    3530                 :   }
    3531                 : SWIGINTERN OGRErr OGRLayerShadow_DeleteField(OGRLayerShadow *self,int iField){
    3532              29 :     return OGR_L_DeleteField(self, iField);
    3533                 :   }
    3534                 : SWIGINTERN OGRErr OGRLayerShadow_ReorderField(OGRLayerShadow *self,int iOldFieldPos,int iNewFieldPos){
    3535              24 :     return OGR_L_ReorderField(self, iOldFieldPos, iNewFieldPos);
    3536                 :   }
    3537                 : SWIGINTERN OGRErr OGRLayerShadow_ReorderFields(OGRLayerShadow *self,int nList,int *pList){
    3538              15 :     if (nList != OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)))
    3539                 :     {
    3540                 :       CPLError(CE_Failure, CPLE_IllegalArg,
    3541                 :                "List should have %d elements",
    3542               0 :                OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)));
    3543               0 :       return OGRERR_FAILURE;
    3544                 :     }
    3545              15 :     return OGR_L_ReorderFields(self, pList);
    3546                 :   }
    3547                 : SWIGINTERN OGRErr OGRLayerShadow_AlterFieldDefn(OGRLayerShadow *self,int iField,OGRFieldDefnShadow *field_def,int nFlags){
    3548              34 :     return OGR_L_AlterFieldDefn(self, iField, field_def, nFlags);
    3549                 :   }
    3550                 : SWIGINTERN OGRErr OGRLayerShadow_StartTransaction(OGRLayerShadow *self){
    3551              71 :     return OGR_L_StartTransaction(self);
    3552                 :   }
    3553                 : SWIGINTERN OGRErr OGRLayerShadow_CommitTransaction(OGRLayerShadow *self){
    3554              68 :     return OGR_L_CommitTransaction(self);
    3555                 :   }
    3556                 : SWIGINTERN OGRErr OGRLayerShadow_RollbackTransaction(OGRLayerShadow *self){
    3557               4 :     return OGR_L_RollbackTransaction(self);
    3558                 :   }
    3559                 : SWIGINTERN OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){
    3560             253 :     OGRSpatialReferenceH ref =  OGR_L_GetSpatialRef(self);
    3561             253 :     if( ref )
    3562             223 :         OSRReference(ref);
    3563             253 :     return (OSRSpatialReferenceShadow*) ref;
    3564                 :   }
    3565                 : SWIGINTERN GIntBig OGRLayerShadow_GetFeaturesRead(OGRLayerShadow *self){
    3566               0 :     return OGR_L_GetFeaturesRead(self);
    3567                 :   }
    3568                 : SWIGINTERN OGRErr OGRLayerShadow_SetIgnoredFields(OGRLayerShadow *self,char const **options){
    3569               4 :     return OGR_L_SetIgnoredFields( self, options );
    3570                 :   }
    3571                 : SWIGINTERN OGRErr OGRLayerShadow_Intersection(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    3572               1 :     return OGR_L_Intersection( self, method_layer, result_layer, options, callback, callback_data );
    3573                 :   }
    3574                 : SWIGINTERN OGRErr OGRLayerShadow_Union(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    3575               1 :     return OGR_L_Union( self, method_layer, result_layer, options, callback, callback_data );
    3576                 :   }
    3577                 : SWIGINTERN OGRErr OGRLayerShadow_SymDifference(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    3578               1 :     return OGR_L_SymDifference( self, method_layer, result_layer, options, callback, callback_data );
    3579                 :   }
    3580                 : SWIGINTERN OGRErr OGRLayerShadow_Identity(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    3581               1 :     return OGR_L_Identity( self, method_layer, result_layer, options, callback, callback_data );
    3582                 :   }
    3583                 : SWIGINTERN OGRErr OGRLayerShadow_Update(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    3584               1 :     return OGR_L_Update( self, method_layer, result_layer, options, callback, callback_data );
    3585                 :   }
    3586                 : SWIGINTERN OGRErr OGRLayerShadow_Clip(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    3587               1 :     return OGR_L_Clip( self, method_layer, result_layer, options, callback, callback_data );
    3588                 :   }
    3589                 : SWIGINTERN OGRErr OGRLayerShadow_Erase(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    3590               1 :     return OGR_L_Erase( self, method_layer, result_layer, options, callback, callback_data );
    3591                 :   }
    3592                 : SWIGINTERN void delete_OGRFeatureShadow(OGRFeatureShadow *self){
    3593           92831 :     OGR_F_Destroy(self);
    3594                 :   }
    3595                 : SWIGINTERN OGRFeatureShadow *new_OGRFeatureShadow(OGRFeatureDefnShadow *feature_def){
    3596           32800 :       return (OGRFeatureShadow*) OGR_F_Create( feature_def );
    3597                 :   }
    3598                 : SWIGINTERN OGRFeatureDefnShadow *OGRFeatureShadow_GetDefnRef(OGRFeatureShadow *self){
    3599              76 :     return (OGRFeatureDefnShadow*) OGR_F_GetDefnRef(self);
    3600                 :   }
    3601                 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeometry(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    3602           29017 :     return OGR_F_SetGeometry(self, geom);
    3603                 :   }
    3604                 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeometryDirectly(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    3605             245 :     return OGR_F_SetGeometryDirectly(self, geom);
    3606                 :   }
    3607                 : SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeometryRef(OGRFeatureShadow *self){
    3608           55763 :     return (OGRGeometryShadow*) OGR_F_GetGeometryRef(self);
    3609                 :   }
    3610                 : SWIGINTERN OGRFeatureShadow *OGRFeatureShadow_Clone(OGRFeatureShadow *self){
    3611              36 :     return (OGRFeatureShadow*) OGR_F_Clone(self);
    3612                 :   }
    3613                 : SWIGINTERN bool OGRFeatureShadow_Equal(OGRFeatureShadow *self,OGRFeatureShadow *feature){
    3614              42 :     return (OGR_F_Equal(self, feature) > 0);
    3615                 :   }
    3616                 : SWIGINTERN int OGRFeatureShadow_GetFieldCount(OGRFeatureShadow *self){
    3617            4631 :     return OGR_F_GetFieldCount(self);
    3618                 :   }
    3619                 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
    3620              11 :     return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, id);
    3621                 :   }
    3622                 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *name){
    3623               0 :       int i = OGR_F_GetFieldIndex(self, name);
    3624               0 :       if (i == -1)
    3625               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3626                 :       else
    3627               0 :     return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, i);
    3628               0 :       return NULL;
    3629                 :   }
    3630                 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_0(OGRFeatureShadow *self,int id){
    3631            3268 :     return (const char *) OGR_F_GetFieldAsString(self, id);
    3632                 :   }
    3633                 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_1(OGRFeatureShadow *self,char const *name){
    3634             424 :       int i = OGR_F_GetFieldIndex(self, name);
    3635             424 :       if (i == -1)
    3636               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3637                 :       else
    3638             424 :     return (const char *) OGR_F_GetFieldAsString(self, i);
    3639               0 :       return NULL;
    3640                 :   }
    3641                 : SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_0(OGRFeatureShadow *self,int id){
    3642            2749 :     return OGR_F_GetFieldAsInteger(self, id);
    3643                 :   }
    3644                 : SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_1(OGRFeatureShadow *self,char const *name){
    3645             168 :       int i = OGR_F_GetFieldIndex(self, name);
    3646             168 :       if (i == -1)
    3647               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3648                 :       else
    3649             168 :     return OGR_F_GetFieldAsInteger(self, i);
    3650               0 :       return 0;
    3651                 :   }
    3652                 : SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_0(OGRFeatureShadow *self,int id){
    3653             641 :     return OGR_F_GetFieldAsDouble(self, id);
    3654                 :   }
    3655                 : 
    3656                 :   #define SWIG_From_double   PyFloat_FromDouble 
    3657                 : 
    3658                 : SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_1(OGRFeatureShadow *self,char const *name){
    3659              12 :       int i = OGR_F_GetFieldIndex(self, name);
    3660              12 :       if (i == -1)
    3661               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3662                 :       else
    3663              12 :     return OGR_F_GetFieldAsDouble(self, i);
    3664               0 :       return 0;
    3665                 :   }
    3666                 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime(OGRFeatureShadow *self,int id,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,int *pnSecond,int *pnTZFlag){
    3667                 :       OGR_F_GetFieldAsDateTime(self, id, pnYear, pnMonth, pnDay,
    3668                 :              pnHour, pnMinute, pnSecond,
    3669               1 :              pnTZFlag);
    3670                 :   }
    3671                 : SWIGINTERN void OGRFeatureShadow_GetFieldAsIntegerList(OGRFeatureShadow *self,int id,int *nLen,int const **pList){
    3672               6 :       *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
    3673                 :   }
    3674                 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDoubleList(OGRFeatureShadow *self,int id,int *nLen,double const **pList){
    3675              19 :       *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
    3676                 :   }
    3677                 : SWIGINTERN char **OGRFeatureShadow_GetFieldAsStringList(OGRFeatureShadow *self,int id){
    3678               3 :       return OGR_F_GetFieldAsStringList(self, id);
    3679                 :   }
    3680                 : SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_0(OGRFeatureShadow *self,int id){
    3681            4806 :     return (OGR_F_IsFieldSet(self, id) > 0);
    3682                 :   }
    3683                 : SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_1(OGRFeatureShadow *self,char const *name){
    3684              61 :       int i = OGR_F_GetFieldIndex(self, name);
    3685              61 :       if (i == -1)
    3686               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3687                 :       else
    3688              61 :     return (OGR_F_IsFieldSet(self, i) > 0);
    3689               0 :       return false;
    3690                 :   }
    3691                 : SWIGINTERN int OGRFeatureShadow_GetFieldIndex(OGRFeatureShadow *self,char const *name){
    3692            2833 :       return OGR_F_GetFieldIndex(self, name);
    3693                 :   }
    3694                 : SWIGINTERN int OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
    3695             349 :     return OGR_F_GetFID(self);
    3696                 :   }
    3697                 : SWIGINTERN OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,int fid){
    3698              52 :     return OGR_F_SetFID(self, fid);
    3699                 :   }
    3700                 : SWIGINTERN void OGRFeatureShadow_DumpReadable(OGRFeatureShadow *self){
    3701               0 :     OGR_F_DumpReadable(self, NULL);
    3702                 :   }
    3703                 : SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_0(OGRFeatureShadow *self,int id){
    3704               0 :     OGR_F_UnsetField(self, id);
    3705                 :   }
    3706                 : SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_1(OGRFeatureShadow *self,char const *name){
    3707               1 :       int i = OGR_F_GetFieldIndex(self, name);
    3708               1 :       if (i == -1)
    3709               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3710                 :       else
    3711               1 :     OGR_F_UnsetField(self, i);
    3712                 :   }
    3713                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_0(OGRFeatureShadow *self,int id,char const *value){
    3714            3278 :     OGR_F_SetFieldString(self, id, value);
    3715                 :   }
    3716                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_1(OGRFeatureShadow *self,char const *name,char const *value){
    3717             435 :       int i = OGR_F_GetFieldIndex(self, name);
    3718             435 :       if (i == -1)
    3719               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3720                 :       else
    3721             435 :     OGR_F_SetFieldString(self, i, value);
    3722                 :   }
    3723                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_2(OGRFeatureShadow *self,int id,int value){
    3724            9273 :     OGR_F_SetFieldInteger(self, id, value);
    3725                 :   }
    3726                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_3(OGRFeatureShadow *self,char const *name,int value){
    3727             260 :       int i = OGR_F_GetFieldIndex(self, name);
    3728             260 :       if (i == -1)
    3729               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3730                 :       else
    3731             260 :     OGR_F_SetFieldInteger(self, i, value);
    3732                 :   }
    3733                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_4(OGRFeatureShadow *self,int id,double value){
    3734               9 :     OGR_F_SetFieldDouble(self, id, value);
    3735                 :   }
    3736                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_5(OGRFeatureShadow *self,char const *name,double value){
    3737             144 :       int i = OGR_F_GetFieldIndex(self, name);
    3738             144 :       if (i == -1)
    3739               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3740                 :       else
    3741             144 :     OGR_F_SetFieldDouble(self, i, value);
    3742                 :   }
    3743                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_6(OGRFeatureShadow *self,int id,int year,int month,int day,int hour,int minute,int second,int tzflag){
    3744                 :     OGR_F_SetFieldDateTime(self, id, year, month, day,
    3745                 :                              hour, minute, second, 
    3746              24 :                              tzflag);
    3747                 :   }
    3748                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_7(OGRFeatureShadow *self,char const *name,int year,int month,int day,int hour,int minute,int second,int tzflag){
    3749               1 :       int i = OGR_F_GetFieldIndex(self, name);
    3750               1 :       if (i == -1)
    3751               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3752                 :       else
    3753                 :     OGR_F_SetFieldDateTime(self, i, year, month, day,
    3754                 :          hour, minute, second, 
    3755               1 :          tzflag);
    3756                 :   }
    3757                 : SWIGINTERN void OGRFeatureShadow_SetFieldIntegerList(OGRFeatureShadow *self,int id,int nList,int *pList){
    3758               6 :       OGR_F_SetFieldIntegerList(self, id, nList, pList);
    3759                 :   }
    3760                 : SWIGINTERN void OGRFeatureShadow_SetFieldDoubleList(OGRFeatureShadow *self,int id,int nList,double *pList){
    3761              29 :       OGR_F_SetFieldDoubleList(self, id, nList, pList);
    3762                 :   }
    3763                 : SWIGINTERN void OGRFeatureShadow_SetFieldStringList(OGRFeatureShadow *self,int id,char **pList){
    3764              14 :       OGR_F_SetFieldStringList(self, id, pList);
    3765                 :   }
    3766                 : SWIGINTERN OGRErr OGRFeatureShadow_SetFrom(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving=1){
    3767             241 :     return OGR_F_SetFrom(self, other, forgiving);
    3768                 :   }
    3769                 : SWIGINTERN OGRErr OGRFeatureShadow_SetFromWithMap(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving,int nList,int *pList){
    3770             381 :     if (nList != OGR_F_GetFieldCount(other))
    3771                 :     {
    3772                 :         CPLError(CE_Failure, CPLE_AppDefined,
    3773               0 :                  "The size of map doesn't match with the field count of the source feature");
    3774               0 :         return OGRERR_FAILURE;
    3775                 :     }
    3776             381 :     return OGR_F_SetFromWithMap(self, other, forgiving, pList);
    3777                 :   }
    3778                 : SWIGINTERN char const *OGRFeatureShadow_GetStyleString(OGRFeatureShadow *self){
    3779              89 :     return (const char*) OGR_F_GetStyleString(self);
    3780                 :   }
    3781                 : SWIGINTERN void OGRFeatureShadow_SetStyleString(OGRFeatureShadow *self,char const *the_string){
    3782              35 :     OGR_F_SetStyleString(self, the_string);
    3783                 :   }
    3784                 : SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_0(OGRFeatureShadow *self,int id){
    3785            4075 :     return (OGRFieldType) OGR_Fld_GetType( OGR_F_GetFieldDefnRef( self, id));
    3786                 :   }
    3787                 : SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_1(OGRFeatureShadow *self,char const *name){
    3788               0 :       int i = OGR_F_GetFieldIndex(self, name);
    3789               0 :       if (i == -1) {
    3790               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3791               0 :     return (OGRFieldType)0;
    3792                 :       } else
    3793                 :     return (OGRFieldType) OGR_Fld_GetType( 
    3794                 :         OGR_F_GetFieldDefnRef( self,  i )
    3795               0 :         );
    3796                 :   }
    3797                 : SWIGINTERN void delete_OGRFeatureDefnShadow(OGRFeatureDefnShadow *self){
    3798                 :     /*OGR_FD_Destroy(self);*/
    3799              24 :     OGR_FD_Release( OGRFeatureDefnH(self) );
    3800                 :   }
    3801                 : SWIGINTERN OGRFeatureDefnShadow *new_OGRFeatureDefnShadow(char const *name_null_ok=NULL){
    3802              24 :     OGRFeatureDefnH h = OGR_FD_Create(name_null_ok);
    3803              24 :     OGR_FD_Reference(h);
    3804              24 :     return (OGRFeatureDefnShadow* )h;
    3805                 :   }
    3806                 : SWIGINTERN char const *OGRFeatureDefnShadow_GetName(OGRFeatureDefnShadow *self){
    3807             114 :     return OGR_FD_GetName(self);
    3808                 :   }
    3809                 : SWIGINTERN int OGRFeatureDefnShadow_GetFieldCount(OGRFeatureDefnShadow *self){
    3810             396 :     return OGR_FD_GetFieldCount(self);
    3811                 :   }
    3812                 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureDefnShadow_GetFieldDefn(OGRFeatureDefnShadow *self,int i){
    3813            1284 :     return (OGRFieldDefnShadow*) OGR_FD_GetFieldDefn(self, i);
    3814                 :   }
    3815                 : SWIGINTERN int OGRFeatureDefnShadow_GetFieldIndex(OGRFeatureDefnShadow *self,char const *name){
    3816             834 :       return OGR_FD_GetFieldIndex(self, name);
    3817                 :   }
    3818                 : SWIGINTERN void OGRFeatureDefnShadow_AddFieldDefn(OGRFeatureDefnShadow *self,OGRFieldDefnShadow *defn){
    3819             210 :     OGR_FD_AddFieldDefn(self, defn);
    3820                 :   }
    3821                 : SWIGINTERN OGRwkbGeometryType OGRFeatureDefnShadow_GetGeomType(OGRFeatureDefnShadow *self){
    3822             135 :     return (OGRwkbGeometryType) OGR_FD_GetGeomType(self);
    3823                 :   }
    3824                 : SWIGINTERN void OGRFeatureDefnShadow_SetGeomType(OGRFeatureDefnShadow *self,OGRwkbGeometryType geom_type){
    3825               0 :     OGR_FD_SetGeomType(self, geom_type);
    3826                 :   }
    3827                 : SWIGINTERN int OGRFeatureDefnShadow_GetReferenceCount(OGRFeatureDefnShadow *self){
    3828               0 :     return OGR_FD_GetReferenceCount(self);
    3829                 :   }
    3830                 : SWIGINTERN int OGRFeatureDefnShadow_IsGeometryIgnored(OGRFeatureDefnShadow *self){
    3831               6 :     return OGR_FD_IsGeometryIgnored(self);
    3832                 :   }
    3833                 : SWIGINTERN void OGRFeatureDefnShadow_SetGeometryIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    3834               3 :     return OGR_FD_SetGeometryIgnored(self,bIgnored);
    3835                 :   }
    3836                 : SWIGINTERN int OGRFeatureDefnShadow_IsStyleIgnored(OGRFeatureDefnShadow *self){
    3837               3 :     return OGR_FD_IsStyleIgnored(self);
    3838                 :   }
    3839                 : SWIGINTERN void OGRFeatureDefnShadow_SetStyleIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    3840               0 :     return OGR_FD_SetStyleIgnored(self,bIgnored);
    3841                 :   }
    3842                 : 
    3843                 :     static int ValidateOGRFieldType(OGRFieldType field_type)
    3844                 :     {
    3845            4816 :         switch(field_type)
    3846                 :         {
    3847                 :             case OFTInteger:
    3848                 :             case OFTIntegerList:
    3849                 :             case OFTReal:
    3850                 :             case OFTRealList:
    3851                 :             case OFTString:
    3852                 :             case OFTStringList:
    3853                 :             case OFTBinary:
    3854                 :             case OFTDate:
    3855                 :             case OFTTime:
    3856                 :             case OFTDateTime:
    3857            4816 :                 return TRUE;
    3858                 :             default:
    3859               0 :                 CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field type value");
    3860               0 :                 return FALSE;
    3861                 :         }
    3862                 :     }
    3863                 : 
    3864                 : SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
    3865            4816 :     OGR_Fld_Destroy(self);
    3866                 :   }
    3867                 : SWIGINTERN OGRFieldDefnShadow *new_OGRFieldDefnShadow(char const *name_null_ok="unnamed",OGRFieldType field_type=OFTString){
    3868            4816 :     if (ValidateOGRFieldType(field_type))
    3869            4816 :         return (OGRFieldDefnShadow*) OGR_Fld_Create(name_null_ok, field_type);
    3870                 :     else
    3871               0 :         return NULL;
    3872                 :   }
    3873                 : SWIGINTERN char const *OGRFieldDefnShadow_GetName(OGRFieldDefnShadow *self){
    3874             250 :     return (const char *) OGR_Fld_GetNameRef(self);
    3875                 :   }
    3876                 : SWIGINTERN char const *OGRFieldDefnShadow_GetNameRef(OGRFieldDefnShadow *self){
    3877             526 :     return (const char *) OGR_Fld_GetNameRef(self);
    3878                 :   }
    3879                 : SWIGINTERN void OGRFieldDefnShadow_SetName(OGRFieldDefnShadow *self,char const *name){
    3880               1 :     OGR_Fld_SetName(self, name);
    3881                 :   }
    3882                 : SWIGINTERN OGRFieldType OGRFieldDefnShadow_GetType(OGRFieldDefnShadow *self){
    3883             591 :     return OGR_Fld_GetType(self);
    3884                 :   }
    3885                 : SWIGINTERN void OGRFieldDefnShadow_SetType(OGRFieldDefnShadow *self,OGRFieldType type){
    3886               0 :     if (ValidateOGRFieldType(type))
    3887               0 :         OGR_Fld_SetType(self, type);
    3888                 :   }
    3889                 : SWIGINTERN OGRJustification OGRFieldDefnShadow_GetJustify(OGRFieldDefnShadow *self){
    3890               0 :     return OGR_Fld_GetJustify(self);
    3891                 :   }
    3892                 : SWIGINTERN void OGRFieldDefnShadow_SetJustify(OGRFieldDefnShadow *self,OGRJustification justify){
    3893               0 :     OGR_Fld_SetJustify(self, justify);
    3894                 :   }
    3895                 : SWIGINTERN int OGRFieldDefnShadow_GetWidth(OGRFieldDefnShadow *self){
    3896             520 :     return OGR_Fld_GetWidth(self);
    3897                 :   }
    3898                 : SWIGINTERN void OGRFieldDefnShadow_SetWidth(OGRFieldDefnShadow *self,int width){
    3899             191 :     OGR_Fld_SetWidth(self, width);
    3900                 :   }
    3901                 : SWIGINTERN int OGRFieldDefnShadow_GetPrecision(OGRFieldDefnShadow *self){
    3902             210 :     return OGR_Fld_GetPrecision(self);
    3903                 :   }
    3904                 : SWIGINTERN void OGRFieldDefnShadow_SetPrecision(OGRFieldDefnShadow *self,int precision){
    3905             128 :     OGR_Fld_SetPrecision(self, precision);
    3906                 :   }
    3907                 : SWIGINTERN char const *OGRFieldDefnShadow_GetTypeName(OGRFieldDefnShadow *self){
    3908               0 :       return OGR_GetFieldTypeName(OGR_Fld_GetType(self));
    3909                 :   }
    3910                 : SWIGINTERN char const *OGRFieldDefnShadow_GetFieldTypeName(OGRFieldDefnShadow *self,OGRFieldType type){
    3911              32 :     return OGR_GetFieldTypeName(type);
    3912                 :   }
    3913                 : SWIGINTERN int OGRFieldDefnShadow_IsIgnored(OGRFieldDefnShadow *self){
    3914               6 :     return OGR_Fld_IsIgnored( self );
    3915                 :   }
    3916                 : SWIGINTERN void OGRFieldDefnShadow_SetIgnored(OGRFieldDefnShadow *self,int bIgnored){
    3917               0 :     return OGR_Fld_SetIgnored( self, bIgnored );
    3918                 :   }
    3919                 : 
    3920              72 :   OGRGeometryShadow* CreateGeometryFromWkb( int len, char *bin_string, 
    3921                 :                                             OSRSpatialReferenceShadow *reference=NULL ) {
    3922              72 :     OGRGeometryH geom = NULL;
    3923                 :     OGRErr err = OGR_G_CreateFromWkb( (unsigned char *) bin_string,
    3924                 :                                       reference,
    3925                 :                                       &geom,
    3926              72 :                                       len );
    3927              72 :     if (err != 0 ) {
    3928               2 :        CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
    3929               2 :        return NULL;
    3930                 :     }
    3931              70 :     return (OGRGeometryShadow*) geom;
    3932                 :   }
    3933                 :  
    3934                 : 
    3935                 : 
    3936           30236 :   OGRGeometryShadow* CreateGeometryFromWkt( char **val, 
    3937                 :                                       OSRSpatialReferenceShadow *reference=NULL ) {
    3938           30236 :     OGRGeometryH geom = NULL;
    3939                 :     OGRErr err = OGR_G_CreateFromWkt(val,
    3940                 :                                       reference,
    3941           30236 :                                       &geom);
    3942           30236 :     if (err != 0 ) {
    3943             175 :        CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
    3944             175 :        return NULL;
    3945                 :     }
    3946           30061 :     return (OGRGeometryShadow*) geom;
    3947                 :   }
    3948                 :  
    3949                 : 
    3950                 : 
    3951             167 :   OGRGeometryShadow *CreateGeometryFromGML( const char * input_string ) {
    3952             167 :     OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateFromGML(input_string);
    3953             167 :     return geom;
    3954                 :   }
    3955                 :  
    3956                 : 
    3957                 : 
    3958               0 :   OGRGeometryShadow *CreateGeometryFromJson( const char * input_string ) {
    3959               0 :     OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateGeometryFromJson(input_string);
    3960               0 :     return geom;
    3961                 :   }
    3962                 :  
    3963                 : 
    3964                 : 
    3965               5 :   OGRGeometryShadow* BuildPolygonFromEdges( OGRGeometryShadow*  hLineCollection,  
    3966                 :                                             int bBestEffort = 0, 
    3967                 :                                             int bAutoClose = 0, 
    3968                 :                                             double dfTolerance=0) {
    3969                 :   
    3970               5 :   OGRGeometryH hPolygon = NULL;
    3971                 :   
    3972                 :   OGRErr eErr;
    3973                 : 
    3974                 :   hPolygon = OGRBuildPolygonFromEdges( hLineCollection, bBestEffort, 
    3975               5 :                                        bAutoClose, dfTolerance, &eErr );
    3976                 : 
    3977               5 :   if (eErr != OGRERR_NONE ) {
    3978               2 :     CPLError(CE_Failure, eErr, "%s", OGRErrMessages(eErr));
    3979               2 :     return NULL;
    3980                 :   }
    3981                 : 
    3982               3 :   return (OGRGeometryShadow* )hPolygon;
    3983                 :   }
    3984                 : 
    3985                 : 
    3986               1 :   OGRGeometryShadow* ApproximateArcAngles( 
    3987                 :         double dfCenterX, double dfCenterY, double dfZ,
    3988                 :     double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation, 
    3989                 :         double dfStartAngle, double dfEndAngle,
    3990                 :         double dfMaxAngleStepSizeDegrees ) {
    3991                 :   
    3992                 :   return (OGRGeometryShadow* )OGR_G_ApproximateArcAngles( 
    3993                 :              dfCenterX, dfCenterY, dfZ, 
    3994                 :              dfPrimaryRadius, dfSecondaryAxis, dfRotation,
    3995               1 :              dfStartAngle, dfEndAngle, dfMaxAngleStepSizeDegrees );
    3996                 :   }
    3997                 : 
    3998                 : 
    3999              36 : OGRGeometryShadow* ForceToPolygon( OGRGeometryShadow *geom_in ) {
    4000              36 :  if (geom_in == NULL)
    4001               1 :      return NULL;
    4002              35 :  return (OGRGeometryShadow* )OGR_G_ForceToPolygon( OGR_G_Clone(geom_in) );
    4003                 : }
    4004                 : 
    4005                 : 
    4006              32 : OGRGeometryShadow* ForceToLineString( OGRGeometryShadow *geom_in ) {
    4007              32 :  if (geom_in == NULL)
    4008               1 :      return NULL;
    4009              31 :  return (OGRGeometryShadow* )OGR_G_ForceToLineString( OGR_G_Clone(geom_in) );
    4010                 : }
    4011                 : 
    4012                 : 
    4013              31 : OGRGeometryShadow* ForceToMultiPolygon( OGRGeometryShadow *geom_in ) {
    4014              31 :  if (geom_in == NULL)
    4015               1 :      return NULL;
    4016              30 :  return (OGRGeometryShadow* )OGR_G_ForceToMultiPolygon( OGR_G_Clone(geom_in) );
    4017                 : }
    4018                 : 
    4019                 : 
    4020              27 : OGRGeometryShadow* ForceToMultiPoint( OGRGeometryShadow *geom_in ) {
    4021              27 :  if (geom_in == NULL)
    4022               1 :      return NULL;
    4023              26 :  return (OGRGeometryShadow* )OGR_G_ForceToMultiPoint( OGR_G_Clone(geom_in) );
    4024                 : }
    4025                 : 
    4026                 : 
    4027              29 : OGRGeometryShadow* ForceToMultiLineString( OGRGeometryShadow *geom_in ) {
    4028              29 :  if (geom_in == NULL)
    4029               1 :      return NULL;
    4030              28 :  return (OGRGeometryShadow* )OGR_G_ForceToMultiLineString( OGR_G_Clone(geom_in) );
    4031                 : }
    4032                 : 
    4033                 : SWIGINTERN void delete_OGRGeometryShadow(OGRGeometryShadow *self){
    4034           48890 :     OGR_G_DestroyGeometry( self );
    4035                 :   }
    4036                 : SWIGINTERN OGRGeometryShadow *new_OGRGeometryShadow(OGRwkbGeometryType type=wkbUnknown,char *wkt=0,int wkb=0,char *wkb_buf=0,char *gml=0){
    4037              60 :     if (type != wkbUnknown ) {
    4038              40 :       return (OGRGeometryShadow*) OGR_G_CreateGeometry( type );
    4039                 :     }
    4040              20 :     else if ( wkt != 0 ) {
    4041              19 :       return CreateGeometryFromWkt( &wkt );
    4042                 :     }
    4043               1 :     else if ( wkb != 0 ) {
    4044               0 :       return CreateGeometryFromWkb( wkb, wkb_buf );
    4045                 :     }
    4046               1 :     else if ( gml != 0 ) {
    4047               0 :       return CreateGeometryFromGML( gml );
    4048                 :     }
    4049                 :     // throw?
    4050                 :     else {
    4051               1 :         CPLError(CE_Failure, 1, "Empty geometries cannot be constructed");
    4052               1 :         return NULL;}
    4053                 : 
    4054                 :   }
    4055                 : 
    4056                 : #define t_output_helper SWIG_Python_AppendOutput
    4057                 : 
    4058                 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkt(OGRGeometryShadow *self,char **argout){
    4059            1191 :     return OGR_G_ExportToWkt(self, argout);
    4060                 :   }
    4061                 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkb(OGRGeometryShadow *self,int *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbXDR){
    4062              57 :     *nLen = OGR_G_WkbSize( self );
    4063              57 :     *pBuf = (char *) malloc( *nLen * sizeof(unsigned char) );
    4064              57 :     return OGR_G_ExportToWkb(self, byte_order, (unsigned char*) *pBuf );
    4065                 :   }
    4066                 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToGML(OGRGeometryShadow *self,char **options=0){
    4067              41 :     return (retStringAndCPLFree*) OGR_G_ExportToGMLEx(self, options);
    4068                 :   }
    4069                 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToKML(OGRGeometryShadow *self,char const *altitude_mode=NULL){
    4070               0 :     return (retStringAndCPLFree *) OGR_G_ExportToKML(self, altitude_mode);
    4071                 :   }
    4072                 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToJson(OGRGeometryShadow *self,char **options=0){
    4073               2 :     return (retStringAndCPLFree *) OGR_G_ExportToJsonEx(self, options);
    4074                 :   }
    4075                 : SWIGINTERN void OGRGeometryShadow_AddPoint(OGRGeometryShadow *self,double x,double y,double z=0){
    4076              10 :     OGR_G_AddPoint( self, x, y, z );
    4077                 :   }
    4078                 : SWIGINTERN void OGRGeometryShadow_AddPoint_2D(OGRGeometryShadow *self,double x,double y){
    4079              40 :     OGR_G_AddPoint_2D( self, x, y );
    4080                 :   }
    4081                 : SWIGINTERN OGRErr OGRGeometryShadow_AddGeometryDirectly(OGRGeometryShadow *self,OGRGeometryShadow *other_disown){
    4082               1 :     return OGR_G_AddGeometryDirectly( self, other_disown );
    4083                 :   }
    4084                 : SWIGINTERN OGRErr OGRGeometryShadow_AddGeometry(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4085              49 :     return OGR_G_AddGeometry( self, other );
    4086                 :   }
    4087                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Clone(OGRGeometryShadow *self){
    4088           18631 :     return (OGRGeometryShadow*) OGR_G_Clone(self);
    4089                 :   }
    4090                 : SWIGINTERN OGRwkbGeometryType OGRGeometryShadow_GetGeometryType(OGRGeometryShadow *self){
    4091             211 :     return (OGRwkbGeometryType) OGR_G_GetGeometryType(self);
    4092                 :   }
    4093                 : SWIGINTERN char const *OGRGeometryShadow_GetGeometryName(OGRGeometryShadow *self){
    4094            2976 :     return (const char *) OGR_G_GetGeometryName(self);
    4095                 :   }
    4096                 : SWIGINTERN double OGRGeometryShadow_Length(OGRGeometryShadow *self){
    4097              12 :     return OGR_G_Length(self);
    4098                 :   }
    4099                 : SWIGINTERN double OGRGeometryShadow_Area(OGRGeometryShadow *self){
    4100               3 :     return OGR_G_Area(self);
    4101                 :   }
    4102                 : SWIGINTERN double OGRGeometryShadow_GetArea(OGRGeometryShadow *self){
    4103               4 :     return OGR_G_Area(self);
    4104                 :   }
    4105                 : SWIGINTERN int OGRGeometryShadow_GetPointCount(OGRGeometryShadow *self){
    4106            3886 :     return OGR_G_GetPointCount(self);
    4107                 :   }
    4108              13 : SWIGINTERN void OGRGeometryShadow_GetPoints(OGRGeometryShadow *self,int *pnCount,double **ppadfXY,double **ppadfZ,int nCoordDimension=0){
    4109              13 :     int nPoints = OGR_G_GetPointCount(self);
    4110              13 :     *pnCount = nPoints;
    4111              13 :     if (nPoints == 0)
    4112                 :     {
    4113               0 :         *ppadfXY = NULL;
    4114               0 :         *ppadfZ = NULL;
    4115                 :     }
    4116              13 :     *ppadfXY = (double*)VSIMalloc(2 * sizeof(double) * nPoints);
    4117              13 :     if (*ppadfXY == NULL)
    4118                 :     {
    4119               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate resulting array");
    4120               0 :         *pnCount = 0;
    4121               0 :         return;
    4122                 :     }
    4123              13 :     if (nCoordDimension <= 0)
    4124               9 :         nCoordDimension = OGR_G_GetCoordinateDimension(self);
    4125              13 :     *ppadfZ = (nCoordDimension == 3) ? (double*)VSIMalloc(sizeof(double) * nPoints) : NULL;
    4126                 :     OGR_G_GetPoints(self,
    4127                 :                     *ppadfXY, 2 * sizeof(double),
    4128                 :                     (*ppadfXY) + 1, 2 * sizeof(double),
    4129              13 :                     *ppadfZ, sizeof(double));
    4130                 :   }
    4131                 : SWIGINTERN double OGRGeometryShadow_GetX(OGRGeometryShadow *self,int point=0){
    4132           17600 :     return OGR_G_GetX(self, point);
    4133                 :   }
    4134                 : SWIGINTERN double OGRGeometryShadow_GetY(OGRGeometryShadow *self,int point=0){
    4135           17600 :     return OGR_G_GetY(self, point);
    4136                 :   }
    4137                 : SWIGINTERN double OGRGeometryShadow_GetZ(OGRGeometryShadow *self,int point=0){
    4138           17354 :     return OGR_G_GetZ(self, point);
    4139                 :   }
    4140                 : 
    4141                 : static PyObject *
    4142           17574 : CreateTupleFromDoubleArray( double *first, unsigned int size ) {
    4143           17574 :   PyObject *out = PyTuple_New( size );
    4144           87876 :   for( unsigned int i=0; i<size; i++ ) {
    4145           70302 :     PyObject *val = PyFloat_FromDouble( *first );
    4146           70302 :     ++first;
    4147           70302 :     PyTuple_SetItem( out, i, val );
    4148                 :   }
    4149           17574 :   return out;
    4150                 : }
    4151                 : 
    4152                 : SWIGINTERN void OGRGeometryShadow_GetPoint(OGRGeometryShadow *self,int iPoint=0,double argout[3]=NULL){
    4153                 : 
    4154               4 :     OGR_G_GetPoint( self, iPoint, argout+0, argout+1, argout+2 );
    4155                 :   }
    4156                 : SWIGINTERN void OGRGeometryShadow_GetPoint_2D(OGRGeometryShadow *self,int iPoint=0,double argout[2]=NULL){
    4157                 : 
    4158               2 :     OGR_G_GetPoint( self, iPoint, argout+0, argout+1, NULL );
    4159                 :   }
    4160                 : SWIGINTERN int OGRGeometryShadow_GetGeometryCount(OGRGeometryShadow *self){
    4161            4863 :     return OGR_G_GetGeometryCount(self);
    4162                 :   }
    4163                 : SWIGINTERN void OGRGeometryShadow_SetPoint(OGRGeometryShadow *self,int point,double x,double y,double z=0){
    4164             250 :     OGR_G_SetPoint(self, point, x, y, z);
    4165                 :   }
    4166                 : SWIGINTERN void OGRGeometryShadow_SetPoint_2D(OGRGeometryShadow *self,int point,double x,double y){
    4167               1 :     OGR_G_SetPoint_2D(self, point, x, y);
    4168                 :   }
    4169                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetGeometryRef(OGRGeometryShadow *self,int geom){
    4170            1559 :     return (OGRGeometryShadow*) OGR_G_GetGeometryRef(self, geom);
    4171                 :   }
    4172                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Simplify(OGRGeometryShadow *self,double tolerance){
    4173               1 :     return (OGRGeometryShadow*) OGR_G_Simplify(self, tolerance);
    4174                 :   }
    4175                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SimplifyPreserveTopology(OGRGeometryShadow *self,double tolerance){
    4176               1 :     return (OGRGeometryShadow*) OGR_G_SimplifyPreserveTopology(self, tolerance);
    4177                 :   }
    4178                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Boundary(OGRGeometryShadow *self){
    4179               1 :     return (OGRGeometryShadow*) OGR_G_Boundary(self);
    4180                 :   }
    4181                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetBoundary(OGRGeometryShadow *self){
    4182               5 :     return (OGRGeometryShadow*) OGR_G_Boundary(self);
    4183                 :   }
    4184                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConvexHull(OGRGeometryShadow *self){
    4185               1 :     return (OGRGeometryShadow*) OGR_G_ConvexHull(self);
    4186                 :   }
    4187                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer(OGRGeometryShadow *self,double distance,int quadsecs=30){
    4188               1 :     return (OGRGeometryShadow*) OGR_G_Buffer( self, distance, quadsecs );
    4189                 :   }
    4190                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Intersection(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4191              45 :     return (OGRGeometryShadow*) OGR_G_Intersection( self, other );
    4192                 :   }
    4193                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Union(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4194               3 :     return (OGRGeometryShadow*) OGR_G_Union( self, other );
    4195                 :   }
    4196                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_UnionCascaded(OGRGeometryShadow *self){
    4197               1 :     return (OGRGeometryShadow*) OGR_G_UnionCascaded( self );
    4198                 :   }
    4199                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Difference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4200               1 :     return (OGRGeometryShadow*) OGR_G_Difference( self, other );
    4201                 :   }
    4202                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4203               1 :     return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
    4204                 :   }
    4205                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymmetricDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4206               1 :     return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
    4207                 :   }
    4208                 : SWIGINTERN double OGRGeometryShadow_Distance(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4209               1 :     return OGR_G_Distance(self, other);
    4210                 :   }
    4211                 : SWIGINTERN void OGRGeometryShadow_Empty(OGRGeometryShadow *self){
    4212               2 :     OGR_G_Empty(self);
    4213                 :   }
    4214                 : SWIGINTERN bool OGRGeometryShadow_IsEmpty(OGRGeometryShadow *self){
    4215              58 :     return (OGR_G_IsEmpty(self) > 0);
    4216                 :   }
    4217                 : SWIGINTERN bool OGRGeometryShadow_IsValid(OGRGeometryShadow *self){
    4218               3 :     return (OGR_G_IsValid(self) > 0);
    4219                 :   }
    4220                 : SWIGINTERN bool OGRGeometryShadow_IsSimple(OGRGeometryShadow *self){
    4221               2 :     return (OGR_G_IsSimple(self) > 0);
    4222                 :   }
    4223                 : SWIGINTERN bool OGRGeometryShadow_IsRing(OGRGeometryShadow *self){
    4224               1 :     return (OGR_G_IsRing(self) > 0);
    4225                 :   }
    4226                 : SWIGINTERN bool OGRGeometryShadow_Intersects(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4227               0 :     return (OGR_G_Intersects(self, other) > 0);
    4228                 :   }
    4229                 : SWIGINTERN bool OGRGeometryShadow_Intersect(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4230               2 :     return (OGR_G_Intersects(self, other) > 0);
    4231                 :   }
    4232                 : SWIGINTERN bool OGRGeometryShadow_Equals(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4233           35546 :     return (OGR_G_Equals(self, other) > 0);
    4234                 :   }
    4235                 : SWIGINTERN bool OGRGeometryShadow_Equal(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4236               1 :     return (OGR_G_Equals(self, other) > 0);
    4237                 :   }
    4238                 : SWIGINTERN bool OGRGeometryShadow_Disjoint(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4239               2 :     return (OGR_G_Disjoint(self, other) > 0);
    4240                 :   }
    4241                 : SWIGINTERN bool OGRGeometryShadow_Touches(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4242               2 :     return (OGR_G_Touches(self, other) > 0);
    4243                 :   }
    4244                 : SWIGINTERN bool OGRGeometryShadow_Crosses(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4245               2 :     return (OGR_G_Crosses(self, other) > 0);
    4246                 :   }
    4247                 : SWIGINTERN bool OGRGeometryShadow_Within(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4248               3 :     return (OGR_G_Within(self, other) > 0);
    4249                 :   }
    4250                 : SWIGINTERN bool OGRGeometryShadow_Contains(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4251               2 :     return (OGR_G_Contains(self, other) > 0);
    4252                 :   }
    4253                 : SWIGINTERN bool OGRGeometryShadow_Overlaps(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4254               2 :     return (OGR_G_Overlaps(self, other) > 0);
    4255                 :   }
    4256                 : SWIGINTERN OGRErr OGRGeometryShadow_TransformTo(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    4257               1 :     return OGR_G_TransformTo(self, reference);
    4258                 :   }
    4259                 : SWIGINTERN OGRErr OGRGeometryShadow_Transform(OGRGeometryShadow *self,OSRCoordinateTransformationShadow *trans){
    4260              12 :     return OGR_G_Transform(self, trans);
    4261                 :   }
    4262                 : SWIGINTERN OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){
    4263              10 :     OGRSpatialReferenceH ref =  OGR_G_GetSpatialReference(self);
    4264              10 :     if( ref )
    4265              10 :         OSRReference(ref);
    4266              10 :     return (OSRSpatialReferenceShadow*) ref;
    4267                 :   }
    4268                 : SWIGINTERN void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    4269             332 :     OGR_G_AssignSpatialReference(self, reference);
    4270                 :   }
    4271                 : SWIGINTERN void OGRGeometryShadow_CloseRings(OGRGeometryShadow *self){
    4272               4 :     OGR_G_CloseRings(self);
    4273                 :   }
    4274                 : SWIGINTERN void OGRGeometryShadow_FlattenTo2D(OGRGeometryShadow *self){
    4275               1 :     OGR_G_FlattenTo2D(self);
    4276                 :   }
    4277                 : SWIGINTERN void OGRGeometryShadow_Segmentize(OGRGeometryShadow *self,double dfMaxLength){
    4278               1 :     OGR_G_Segmentize(self, dfMaxLength);
    4279                 :   }
    4280                 : SWIGINTERN void OGRGeometryShadow_GetEnvelope(OGRGeometryShadow *self,double argout[4]){
    4281           17471 :     OGR_G_GetEnvelope(self, (OGREnvelope*)argout);
    4282                 :   }
    4283                 : SWIGINTERN void OGRGeometryShadow_GetEnvelope3D(OGRGeometryShadow *self,double argout[6]){
    4284               7 :     OGR_G_GetEnvelope3D(self, (OGREnvelope3D*)argout);
    4285                 :   }
    4286                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
    4287               4 :     OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint );
    4288               4 :     OGR_G_Centroid( self, pt );
    4289               4 :     return pt;
    4290                 :   }
    4291                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_PointOnSurface(OGRGeometryShadow *self){
    4292               1 :     return (OGRGeometryShadow*) OGR_G_PointOnSurface( self );
    4293                 :   }
    4294                 : SWIGINTERN int OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
    4295               0 :     return OGR_G_WkbSize(self);
    4296                 :   }
    4297                 : SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
    4298              41 :     return OGR_G_GetCoordinateDimension(self);
    4299                 :   }
    4300                 : SWIGINTERN void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
    4301              20 :     OGR_G_SetCoordinateDimension(self, dimension);
    4302                 :   }
    4303                 : SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
    4304               1 :     return OGR_G_GetDimension(self);
    4305                 :   }
    4306                 : 
    4307               0 : char const *OGRDriverShadow_get_name( OGRDriverShadow *h ) {
    4308               0 :   return OGR_Dr_GetName( h );
    4309                 : }
    4310                 : 
    4311               0 : char const *OGRDataSourceShadow_get_name( OGRDataSourceShadow *h ) {
    4312               0 :   return OGR_DS_GetName( h );
    4313                 : }
    4314                 : 
    4315               0 : char const *OGRDriverShadow_name_get( OGRDriverShadow *h ) {
    4316               0 :   return OGR_Dr_GetName( h );
    4317                 : }
    4318                 : 
    4319               0 : char const *OGRDataSourceShadow_name_get( OGRDataSourceShadow *h ) {
    4320               0 :   return OGR_DS_GetName( h );
    4321                 : }
    4322                 : 
    4323                 : 
    4324               1 :   OGRDataSourceShadow* GetOpenDS(int ds_number) {
    4325               1 :     OGRDataSourceShadow* layer = (OGRDataSourceShadow*) OGRGetOpenDS(ds_number);
    4326               1 :     return layer;
    4327                 :   }
    4328                 : 
    4329                 : 
    4330             919 :   OGRDataSourceShadow* Open( const char *utf8_path, int update =0 ) {
    4331             919 :     CPLErrorReset();
    4332             919 :     OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpen(utf8_path,update,NULL);
    4333             919 :     if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    4334                 :     {
    4335                 :         CPLDebug( "SWIG", 
    4336                 :       "OGROpen() succeeded, but an error is posted, so we destroy"
    4337               3 :       " the datasource and fail at swig level." );
    4338               3 :         OGRReleaseDataSource(ds);
    4339               3 :         ds = NULL;
    4340                 :     }
    4341                 :   
    4342             919 :     return ds;
    4343                 :   }
    4344                 : 
    4345                 : 
    4346               9 :   OGRDataSourceShadow* OpenShared( const char *utf8_path, int update =0 ) {
    4347               9 :     CPLErrorReset();
    4348               9 :     OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpenShared(utf8_path,update,NULL);
    4349               9 :     if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    4350                 :     {
    4351               0 :         OGRReleaseDataSource(ds);
    4352               0 :         ds = NULL;
    4353                 :     }
    4354                 :   
    4355               9 :     return ds;
    4356                 :   }
    4357                 : 
    4358                 : 
    4359             532 : OGRDriverShadow* GetDriverByName( char const *name ) {
    4360             532 :   return (OGRDriverShadow*) OGRGetDriverByName( name );
    4361                 : }
    4362                 : 
    4363               0 : OGRDriverShadow* GetDriver(int driver_number) {
    4364               0 :   return (OGRDriverShadow*) OGRGetDriver(driver_number);
    4365                 : }
    4366                 : 
    4367                 : 
    4368              55 :   char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    4369                 :     int nResArgCount;
    4370                 : 
    4371                 :     nResArgCount = 
    4372              55 :       OGRGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions ); 
    4373                 : 
    4374              55 :     if( nResArgCount <= 0 )
    4375               0 :         return NULL;
    4376                 :     else
    4377              55 :         return papszArgv;
    4378                 :   }
    4379                 : 
    4380                 : 
    4381               0 : int GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
    4382               0 :   return GDALTermProgress( dfProgress, pszMessage, pData);
    4383                 : }
    4384                 : 
    4385                 : #ifdef __cplusplus
    4386                 : extern "C" {
    4387                 : #endif
    4388               0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4389               0 :   PyObject *resultobj = 0;
    4390                 :   int result;
    4391                 :   
    4392               0 :   if (!PyArg_ParseTuple(args,(char *)":GetUseExceptions")) SWIG_fail;
    4393               0 :   result = (int)GetUseExceptions();
    4394               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    4395               0 :   return resultobj;
    4396                 : fail:
    4397               0 :   return NULL;
    4398                 : }
    4399                 : 
    4400                 : 
    4401               0 : SWIGINTERN PyObject *_wrap_UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4402               0 :   PyObject *resultobj = 0;
    4403                 :   
    4404               0 :   if (!PyArg_ParseTuple(args,(char *)":UseExceptions")) SWIG_fail;
    4405               0 :   UseExceptions();
    4406               0 :   resultobj = SWIG_Py_Void();
    4407               0 :   return resultobj;
    4408                 : fail:
    4409               0 :   return NULL;
    4410                 : }
    4411                 : 
    4412                 : 
    4413               0 : SWIGINTERN PyObject *_wrap_DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4414               0 :   PyObject *resultobj = 0;
    4415                 :   
    4416               0 :   if (!PyArg_ParseTuple(args,(char *)":DontUseExceptions")) SWIG_fail;
    4417               0 :   DontUseExceptions();
    4418               0 :   resultobj = SWIG_Py_Void();
    4419               0 :   return resultobj;
    4420                 : fail:
    4421               0 :   return NULL;
    4422                 : }
    4423                 : 
    4424                 : 
    4425               0 : SWIGINTERN PyObject *_wrap_Driver_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4426               0 :   PyObject *resultobj = 0;
    4427               0 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4428               0 :   void *argp1 = 0 ;
    4429               0 :   int res1 = 0 ;
    4430               0 :   PyObject * obj0 = 0 ;
    4431               0 :   char *result = 0 ;
    4432                 :   
    4433               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_name_get",&obj0)) SWIG_fail;
    4434               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4435               0 :   if (!SWIG_IsOK(res1)) {
    4436               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_name_get" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4437                 :   }
    4438               0 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4439                 :   {
    4440               0 :     if ( bUseExceptions ) {
    4441               0 :       CPLErrorReset();
    4442                 :     }
    4443               0 :     result = (char *)OGRDriverShadow_name_get(arg1);
    4444               0 :     if ( bUseExceptions ) {
    4445               0 :       CPLErr eclass = CPLGetLastErrorType();
    4446               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4447               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4448                 :       }
    4449                 :     }
    4450                 :   }
    4451               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
    4452               0 :   return resultobj;
    4453                 : fail:
    4454               0 :   return NULL;
    4455                 : }
    4456                 : 
    4457                 : 
    4458             287 : SWIGINTERN PyObject *_wrap_Driver_CreateDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    4459             287 :   PyObject *resultobj = 0;
    4460             287 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4461             287 :   char *arg2 = (char *) 0 ;
    4462             287 :   char **arg3 = (char **) 0 ;
    4463             287 :   void *argp1 = 0 ;
    4464             287 :   int res1 = 0 ;
    4465             287 :   int bToFree2 = 0 ;
    4466             287 :   PyObject * obj0 = 0 ;
    4467             287 :   PyObject * obj1 = 0 ;
    4468             287 :   PyObject * obj2 = 0 ;
    4469                 :   char *  kwnames[] = {
    4470                 :     (char *) "self",(char *) "utf8_path",(char *) "options", NULL 
    4471             287 :   };
    4472             287 :   OGRDataSourceShadow *result = 0 ;
    4473                 :   
    4474             287 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Driver_CreateDataSource",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
    4475             287 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4476             287 :   if (!SWIG_IsOK(res1)) {
    4477               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4478                 :   }
    4479             287 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4480                 :   {
    4481                 :     /* %typemap(in) (const char *utf8_path) */
    4482             287 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    4483             287 :     if (arg2 == NULL)
    4484                 :     {
    4485               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    4486               0 :       SWIG_fail;
    4487                 :     }
    4488                 :   }
    4489             287 :   if (obj2) {
    4490                 :     {
    4491                 :       /* %typemap(in) char **options */
    4492                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    4493             106 :       if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
    4494                 :   #if PY_VERSION_HEX < 0x03000000
    4495                 :         || PyString_Check(obj2)
    4496                 :   #endif
    4497                 :         ) {
    4498               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    4499               0 :         SWIG_fail;
    4500                 :       }
    4501                 :       
    4502             106 :       int size = PySequence_Size(obj2);
    4503             184 :       for (int i = 0; i < size; i++) {
    4504              78 :         PyObject* pyObj = PySequence_GetItem(obj2,i);
    4505              78 :         if (PyUnicode_Check(pyObj))
    4506                 :         {
    4507                 :           char *pszStr;
    4508                 :           Py_ssize_t nLen;
    4509               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    4510                 : #if PY_VERSION_HEX >= 0x03000000
    4511                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4512                 : #else
    4513               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4514                 : #endif
    4515               0 :           arg3 = CSLAddString( arg3, pszStr );
    4516               0 :           Py_XDECREF(pyUTF8Str);
    4517                 :         }
    4518                 : #if PY_VERSION_HEX >= 0x03000000
    4519                 :         else if (PyBytes_Check(pyObj))
    4520                 :         arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
    4521                 : #else
    4522              78 :         else if (PyString_Check(pyObj))
    4523              78 :         arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
    4524                 : #endif
    4525                 :         else
    4526                 :         {
    4527               0 :           Py_DECREF(pyObj);
    4528               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    4529               0 :           SWIG_fail;
    4530                 :         }
    4531              78 :         Py_DECREF(pyObj);
    4532                 :       }
    4533                 :     }
    4534                 :   }
    4535                 :   {
    4536             287 :     if ( bUseExceptions ) {
    4537               0 :       CPLErrorReset();
    4538                 :     }
    4539             287 :     result = (OGRDataSourceShadow *)OGRDriverShadow_CreateDataSource(arg1,(char const *)arg2,arg3);
    4540             287 :     if ( bUseExceptions ) {
    4541               0 :       CPLErr eclass = CPLGetLastErrorType();
    4542               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4543               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4544                 :       }
    4545                 :     }
    4546                 :   }
    4547             287 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
    4548                 :   {
    4549                 :     /* %typemap(freearg) (const char *utf8_path) */
    4550             287 :     GDALPythonFreeCStr(arg2, bToFree2);
    4551                 :   }
    4552                 :   {
    4553                 :     /* %typemap(freearg) char **options */
    4554             287 :     CSLDestroy( arg3 );
    4555                 :   }
    4556             287 :   return resultobj;
    4557                 : fail:
    4558                 :   {
    4559                 :     /* %typemap(freearg) (const char *utf8_path) */
    4560               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    4561                 :   }
    4562                 :   {
    4563                 :     /* %typemap(freearg) char **options */
    4564               0 :     CSLDestroy( arg3 );
    4565                 :   }
    4566               0 :   return NULL;
    4567                 : }
    4568                 : 
    4569                 : 
    4570               1 : SWIGINTERN PyObject *_wrap_Driver_CopyDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    4571               1 :   PyObject *resultobj = 0;
    4572               1 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4573               1 :   OGRDataSourceShadow *arg2 = (OGRDataSourceShadow *) 0 ;
    4574               1 :   char *arg3 = (char *) 0 ;
    4575               1 :   char **arg4 = (char **) 0 ;
    4576               1 :   void *argp1 = 0 ;
    4577               1 :   int res1 = 0 ;
    4578               1 :   void *argp2 = 0 ;
    4579               1 :   int res2 = 0 ;
    4580               1 :   int bToFree3 = 0 ;
    4581               1 :   PyObject * obj0 = 0 ;
    4582               1 :   PyObject * obj1 = 0 ;
    4583               1 :   PyObject * obj2 = 0 ;
    4584               1 :   PyObject * obj3 = 0 ;
    4585                 :   char *  kwnames[] = {
    4586                 :     (char *) "self",(char *) "copy_ds",(char *) "utf8_path",(char *) "options", NULL 
    4587               1 :   };
    4588               1 :   OGRDataSourceShadow *result = 0 ;
    4589                 :   
    4590               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Driver_CopyDataSource",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    4591               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4592               1 :   if (!SWIG_IsOK(res1)) {
    4593               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4594                 :   }
    4595               1 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4596               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    4597               1 :   if (!SWIG_IsOK(res2)) {
    4598               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_CopyDataSource" "', argument " "2"" of type '" "OGRDataSourceShadow *""'"); 
    4599                 :   }
    4600               1 :   arg2 = reinterpret_cast< OGRDataSourceShadow * >(argp2);
    4601                 :   {
    4602                 :     /* %typemap(in) (const char *utf8_path) */
    4603               1 :     arg3 = GDALPythonObjectToCStr( obj2, &bToFree3 );
    4604               1 :     if (arg3 == NULL)
    4605                 :     {
    4606               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    4607               0 :       SWIG_fail;
    4608                 :     }
    4609                 :   }
    4610               1 :   if (obj3) {
    4611                 :     {
    4612                 :       /* %typemap(in) char **options */
    4613                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    4614               0 :       if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
    4615                 :   #if PY_VERSION_HEX < 0x03000000
    4616                 :         || PyString_Check(obj3)
    4617                 :   #endif
    4618                 :         ) {
    4619               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    4620               0 :         SWIG_fail;
    4621                 :       }
    4622                 :       
    4623               0 :       int size = PySequence_Size(obj3);
    4624               0 :       for (int i = 0; i < size; i++) {
    4625               0 :         PyObject* pyObj = PySequence_GetItem(obj3,i);
    4626               0 :         if (PyUnicode_Check(pyObj))
    4627                 :         {
    4628                 :           char *pszStr;
    4629                 :           Py_ssize_t nLen;
    4630               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    4631                 : #if PY_VERSION_HEX >= 0x03000000
    4632                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4633                 : #else
    4634               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4635                 : #endif
    4636               0 :           arg4 = CSLAddString( arg4, pszStr );
    4637               0 :           Py_XDECREF(pyUTF8Str);
    4638                 :         }
    4639                 : #if PY_VERSION_HEX >= 0x03000000
    4640                 :         else if (PyBytes_Check(pyObj))
    4641                 :         arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
    4642                 : #else
    4643               0 :         else if (PyString_Check(pyObj))
    4644               0 :         arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
    4645                 : #endif
    4646                 :         else
    4647                 :         {
    4648               0 :           Py_DECREF(pyObj);
    4649               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    4650               0 :           SWIG_fail;
    4651                 :         }
    4652               0 :         Py_DECREF(pyObj);
    4653                 :       }
    4654                 :     }
    4655                 :   }
    4656                 :   {
    4657               1 :     if ( bUseExceptions ) {
    4658               0 :       CPLErrorReset();
    4659                 :     }
    4660               1 :     result = (OGRDataSourceShadow *)OGRDriverShadow_CopyDataSource(arg1,arg2,(char const *)arg3,arg4);
    4661               1 :     if ( bUseExceptions ) {
    4662               0 :       CPLErr eclass = CPLGetLastErrorType();
    4663               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4664               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4665                 :       }
    4666                 :     }
    4667                 :   }
    4668               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
    4669                 :   {
    4670                 :     /* %typemap(freearg) (const char *utf8_path) */
    4671               1 :     GDALPythonFreeCStr(arg3, bToFree3);
    4672                 :   }
    4673                 :   {
    4674                 :     /* %typemap(freearg) char **options */
    4675               1 :     CSLDestroy( arg4 );
    4676                 :   }
    4677               1 :   return resultobj;
    4678                 : fail:
    4679                 :   {
    4680                 :     /* %typemap(freearg) (const char *utf8_path) */
    4681               0 :     GDALPythonFreeCStr(arg3, bToFree3);
    4682                 :   }
    4683                 :   {
    4684                 :     /* %typemap(freearg) char **options */
    4685               0 :     CSLDestroy( arg4 );
    4686                 :   }
    4687               0 :   return NULL;
    4688                 : }
    4689                 : 
    4690                 : 
    4691              56 : SWIGINTERN PyObject *_wrap_Driver_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    4692              56 :   PyObject *resultobj = 0;
    4693              56 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4694              56 :   char *arg2 = (char *) 0 ;
    4695              56 :   int arg3 = (int) 0 ;
    4696              56 :   void *argp1 = 0 ;
    4697              56 :   int res1 = 0 ;
    4698              56 :   int bToFree2 = 0 ;
    4699                 :   int val3 ;
    4700              56 :   int ecode3 = 0 ;
    4701              56 :   PyObject * obj0 = 0 ;
    4702              56 :   PyObject * obj1 = 0 ;
    4703              56 :   PyObject * obj2 = 0 ;
    4704                 :   char *  kwnames[] = {
    4705                 :     (char *) "self",(char *) "utf8_path",(char *) "update", NULL 
    4706              56 :   };
    4707              56 :   OGRDataSourceShadow *result = 0 ;
    4708                 :   
    4709              56 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Driver_Open",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
    4710              56 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4711              56 :   if (!SWIG_IsOK(res1)) {
    4712               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Open" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4713                 :   }
    4714              56 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4715                 :   {
    4716                 :     /* %typemap(in) (const char *utf8_path) */
    4717              56 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    4718              56 :     if (arg2 == NULL)
    4719                 :     {
    4720               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    4721               0 :       SWIG_fail;
    4722                 :     }
    4723                 :   }
    4724              56 :   if (obj2) {
    4725              48 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
    4726              48 :     if (!SWIG_IsOK(ecode3)) {
    4727               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Open" "', argument " "3"" of type '" "int""'");
    4728                 :     } 
    4729              48 :     arg3 = static_cast< int >(val3);
    4730                 :   }
    4731                 :   {
    4732              56 :     if ( bUseExceptions ) {
    4733               0 :       CPLErrorReset();
    4734                 :     }
    4735              56 :     result = (OGRDataSourceShadow *)OGRDriverShadow_Open(arg1,(char const *)arg2,arg3);
    4736              56 :     if ( bUseExceptions ) {
    4737               0 :       CPLErr eclass = CPLGetLastErrorType();
    4738               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4739               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4740                 :       }
    4741                 :     }
    4742                 :   }
    4743              56 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
    4744                 :   {
    4745                 :     /* %typemap(freearg) (const char *utf8_path) */
    4746              56 :     GDALPythonFreeCStr(arg2, bToFree2);
    4747                 :   }
    4748              56 :   return resultobj;
    4749                 : fail:
    4750                 :   {
    4751                 :     /* %typemap(freearg) (const char *utf8_path) */
    4752               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    4753                 :   }
    4754               0 :   return NULL;
    4755                 : }
    4756                 : 
    4757                 : 
    4758             164 : SWIGINTERN PyObject *_wrap_Driver_DeleteDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4759             164 :   PyObject *resultobj = 0;
    4760             164 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4761             164 :   char *arg2 = (char *) 0 ;
    4762             164 :   void *argp1 = 0 ;
    4763             164 :   int res1 = 0 ;
    4764             164 :   int bToFree2 = 0 ;
    4765             164 :   PyObject * obj0 = 0 ;
    4766             164 :   PyObject * obj1 = 0 ;
    4767                 :   int result;
    4768                 :   
    4769             164 :   if (!PyArg_ParseTuple(args,(char *)"OO:Driver_DeleteDataSource",&obj0,&obj1)) SWIG_fail;
    4770             164 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4771             164 :   if (!SWIG_IsOK(res1)) {
    4772               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_DeleteDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4773                 :   }
    4774             164 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4775                 :   {
    4776                 :     /* %typemap(in) (const char *utf8_path) */
    4777             164 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    4778             164 :     if (arg2 == NULL)
    4779                 :     {
    4780               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    4781               0 :       SWIG_fail;
    4782                 :     }
    4783                 :   }
    4784                 :   {
    4785             164 :     if ( bUseExceptions ) {
    4786               0 :       CPLErrorReset();
    4787                 :     }
    4788             164 :     result = (int)OGRDriverShadow_DeleteDataSource(arg1,(char const *)arg2);
    4789             164 :     if ( bUseExceptions ) {
    4790               0 :       CPLErr eclass = CPLGetLastErrorType();
    4791               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4792               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4793                 :       }
    4794                 :     }
    4795                 :   }
    4796             164 :   resultobj = SWIG_From_int(static_cast< int >(result));
    4797                 :   {
    4798                 :     /* %typemap(freearg) (const char *utf8_path) */
    4799             164 :     GDALPythonFreeCStr(arg2, bToFree2);
    4800                 :   }
    4801             164 :   return resultobj;
    4802                 : fail:
    4803                 :   {
    4804                 :     /* %typemap(freearg) (const char *utf8_path) */
    4805               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    4806                 :   }
    4807               0 :   return NULL;
    4808                 : }
    4809                 : 
    4810                 : 
    4811              41 : SWIGINTERN PyObject *_wrap_Driver_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4812              41 :   PyObject *resultobj = 0;
    4813              41 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4814              41 :   char *arg2 = (char *) 0 ;
    4815              41 :   void *argp1 = 0 ;
    4816              41 :   int res1 = 0 ;
    4817                 :   int res2 ;
    4818              41 :   char *buf2 = 0 ;
    4819              41 :   int alloc2 = 0 ;
    4820              41 :   PyObject * obj0 = 0 ;
    4821              41 :   PyObject * obj1 = 0 ;
    4822                 :   bool result;
    4823                 :   
    4824              41 :   if (!PyArg_ParseTuple(args,(char *)"OO:Driver_TestCapability",&obj0,&obj1)) SWIG_fail;
    4825              41 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4826              41 :   if (!SWIG_IsOK(res1)) {
    4827               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_TestCapability" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4828                 :   }
    4829              41 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4830              41 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    4831              41 :   if (!SWIG_IsOK(res2)) {
    4832               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'");
    4833                 :   }
    4834              41 :   arg2 = reinterpret_cast< char * >(buf2);
    4835                 :   {
    4836              41 :     if (!arg2) {
    4837               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    4838                 :     }
    4839                 :   }
    4840                 :   {
    4841              41 :     if ( bUseExceptions ) {
    4842               0 :       CPLErrorReset();
    4843                 :     }
    4844              41 :     result = (bool)OGRDriverShadow_TestCapability(arg1,(char const *)arg2);
    4845              41 :     if ( bUseExceptions ) {
    4846               0 :       CPLErr eclass = CPLGetLastErrorType();
    4847               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4848               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4849                 :       }
    4850                 :     }
    4851                 :   }
    4852              41 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
    4853              41 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    4854              41 :   return resultobj;
    4855                 : fail:
    4856               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    4857               0 :   return NULL;
    4858                 : }
    4859                 : 
    4860                 : 
    4861             141 : SWIGINTERN PyObject *_wrap_Driver_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4862             141 :   PyObject *resultobj = 0;
    4863             141 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4864             141 :   void *argp1 = 0 ;
    4865             141 :   int res1 = 0 ;
    4866             141 :   PyObject * obj0 = 0 ;
    4867             141 :   char *result = 0 ;
    4868                 :   
    4869             141 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_GetName",&obj0)) SWIG_fail;
    4870             141 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4871             141 :   if (!SWIG_IsOK(res1)) {
    4872               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_GetName" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4873                 :   }
    4874             141 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4875                 :   {
    4876             141 :     if ( bUseExceptions ) {
    4877               0 :       CPLErrorReset();
    4878                 :     }
    4879             141 :     result = (char *)OGRDriverShadow_GetName(arg1);
    4880             141 :     if ( bUseExceptions ) {
    4881               0 :       CPLErr eclass = CPLGetLastErrorType();
    4882               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4883               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4884                 :       }
    4885                 :     }
    4886                 :   }
    4887             141 :   resultobj = SWIG_FromCharPtr((const char *)result);
    4888             141 :   return resultobj;
    4889                 : fail:
    4890               0 :   return NULL;
    4891                 : }
    4892                 : 
    4893                 : 
    4894               5 : SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4895               5 :   PyObject *resultobj = 0;
    4896               5 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4897               5 :   void *argp1 = 0 ;
    4898               5 :   int res1 = 0 ;
    4899               5 :   PyObject * obj0 = 0 ;
    4900                 :   
    4901               5 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_Register",&obj0)) SWIG_fail;
    4902               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4903               5 :   if (!SWIG_IsOK(res1)) {
    4904               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4905                 :   }
    4906               5 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4907                 :   {
    4908               5 :     if ( bUseExceptions ) {
    4909               0 :       CPLErrorReset();
    4910                 :     }
    4911                 :     OGRDriverShadow_Register(arg1);
    4912               5 :     if ( bUseExceptions ) {
    4913               0 :       CPLErr eclass = CPLGetLastErrorType();
    4914               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4915               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4916                 :       }
    4917                 :     }
    4918                 :   }
    4919               5 :   resultobj = SWIG_Py_Void();
    4920               5 :   return resultobj;
    4921                 : fail:
    4922               0 :   return NULL;
    4923                 : }
    4924                 : 
    4925                 : 
    4926               5 : SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4927               5 :   PyObject *resultobj = 0;
    4928               5 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4929               5 :   void *argp1 = 0 ;
    4930               5 :   int res1 = 0 ;
    4931               5 :   PyObject * obj0 = 0 ;
    4932                 :   
    4933               5 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_Deregister",&obj0)) SWIG_fail;
    4934               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4935               5 :   if (!SWIG_IsOK(res1)) {
    4936               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4937                 :   }
    4938               5 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4939                 :   {
    4940               5 :     if ( bUseExceptions ) {
    4941               0 :       CPLErrorReset();
    4942                 :     }
    4943                 :     OGRDriverShadow_Deregister(arg1);
    4944               5 :     if ( bUseExceptions ) {
    4945               0 :       CPLErr eclass = CPLGetLastErrorType();
    4946               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4947               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4948                 :       }
    4949                 :     }
    4950                 :   }
    4951               5 :   resultobj = SWIG_Py_Void();
    4952               5 :   return resultobj;
    4953                 : fail:
    4954               0 :   return NULL;
    4955                 : }
    4956                 : 
    4957                 : 
    4958               2 : SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4959                 :   PyObject *obj;
    4960               2 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    4961               2 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRDriverShadow, SWIG_NewClientData(obj));
    4962               2 :   return SWIG_Py_Void();
    4963                 : }
    4964                 : 
    4965               0 : SWIGINTERN PyObject *_wrap_DataSource_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4966               0 :   PyObject *resultobj = 0;
    4967               0 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    4968               0 :   void *argp1 = 0 ;
    4969               0 :   int res1 = 0 ;
    4970               0 :   PyObject * obj0 = 0 ;
    4971               0 :   char *result = 0 ;
    4972                 :   
    4973               0 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_name_get",&obj0)) SWIG_fail;
    4974               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    4975               0 :   if (!SWIG_IsOK(res1)) {
    4976               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_name_get" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    4977                 :   }
    4978               0 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    4979                 :   {
    4980               0 :     if ( bUseExceptions ) {
    4981               0 :       CPLErrorReset();
    4982                 :     }
    4983               0 :     result = (char *)OGRDataSourceShadow_name_get(arg1);
    4984               0 :     if ( bUseExceptions ) {
    4985               0 :       CPLErr eclass = CPLGetLastErrorType();
    4986               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4987               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4988                 :       }
    4989                 :     }
    4990                 :   }
    4991               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
    4992               0 :   return resultobj;
    4993                 : fail:
    4994               0 :   return NULL;
    4995                 : }
    4996                 : 
    4997                 : 
    4998            1249 : SWIGINTERN PyObject *_wrap_delete_DataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4999            1249 :   PyObject *resultobj = 0;
    5000            1249 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5001            1249 :   void *argp1 = 0 ;
    5002            1249 :   int res1 = 0 ;
    5003            1249 :   PyObject * obj0 = 0 ;
    5004                 :   
    5005            1249 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_DataSource",&obj0)) SWIG_fail;
    5006            1249 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_DISOWN |  0 );
    5007            1249 :   if (!SWIG_IsOK(res1)) {
    5008               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DataSource" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5009                 :   }
    5010            1249 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5011                 :   {
    5012            1249 :     if ( bUseExceptions ) {
    5013               0 :       CPLErrorReset();
    5014                 :     }
    5015                 :     delete_OGRDataSourceShadow(arg1);
    5016            1249 :     if ( bUseExceptions ) {
    5017               0 :       CPLErr eclass = CPLGetLastErrorType();
    5018               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5019               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5020                 :       }
    5021                 :     }
    5022                 :   }
    5023            1249 :   resultobj = SWIG_Py_Void();
    5024            1249 :   return resultobj;
    5025                 : fail:
    5026               0 :   return NULL;
    5027                 : }
    5028                 : 
    5029                 : 
    5030               4 : SWIGINTERN PyObject *_wrap_DataSource_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5031               4 :   PyObject *resultobj = 0;
    5032               4 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5033               4 :   void *argp1 = 0 ;
    5034               4 :   int res1 = 0 ;
    5035               4 :   PyObject * obj0 = 0 ;
    5036                 :   int result;
    5037                 :   
    5038               4 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetRefCount",&obj0)) SWIG_fail;
    5039               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5040               4 :   if (!SWIG_IsOK(res1)) {
    5041               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetRefCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5042                 :   }
    5043               4 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5044                 :   {
    5045               4 :     if ( bUseExceptions ) {
    5046               0 :       CPLErrorReset();
    5047                 :     }
    5048               4 :     result = (int)OGRDataSourceShadow_GetRefCount(arg1);
    5049               4 :     if ( bUseExceptions ) {
    5050               0 :       CPLErr eclass = CPLGetLastErrorType();
    5051               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5052               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5053                 :       }
    5054                 :     }
    5055                 :   }
    5056               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5057               4 :   return resultobj;
    5058                 : fail:
    5059               0 :   return NULL;
    5060                 : }
    5061                 : 
    5062                 : 
    5063               0 : SWIGINTERN PyObject *_wrap_DataSource_GetSummaryRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5064               0 :   PyObject *resultobj = 0;
    5065               0 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5066               0 :   void *argp1 = 0 ;
    5067               0 :   int res1 = 0 ;
    5068               0 :   PyObject * obj0 = 0 ;
    5069                 :   int result;
    5070                 :   
    5071               0 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetSummaryRefCount",&obj0)) SWIG_fail;
    5072               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5073               0 :   if (!SWIG_IsOK(res1)) {
    5074               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetSummaryRefCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5075                 :   }
    5076               0 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5077                 :   {
    5078               0 :     if ( bUseExceptions ) {
    5079               0 :       CPLErrorReset();
    5080                 :     }
    5081               0 :     result = (int)OGRDataSourceShadow_GetSummaryRefCount(arg1);
    5082               0 :     if ( bUseExceptions ) {
    5083               0 :       CPLErr eclass = CPLGetLastErrorType();
    5084               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5085               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5086                 :       }
    5087                 :     }
    5088                 :   }
    5089               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5090               0 :   return resultobj;
    5091                 : fail:
    5092               0 :   return NULL;
    5093                 : }
    5094                 : 
    5095                 : 
    5096             231 : SWIGINTERN PyObject *_wrap_DataSource_GetLayerCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5097             231 :   PyObject *resultobj = 0;
    5098             231 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5099             231 :   void *argp1 = 0 ;
    5100             231 :   int res1 = 0 ;
    5101             231 :   PyObject * obj0 = 0 ;
    5102                 :   int result;
    5103                 :   
    5104             231 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetLayerCount",&obj0)) SWIG_fail;
    5105             231 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5106             231 :   if (!SWIG_IsOK(res1)) {
    5107               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5108                 :   }
    5109             231 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5110                 :   {
    5111             231 :     if ( bUseExceptions ) {
    5112               0 :       CPLErrorReset();
    5113                 :     }
    5114             231 :     result = (int)OGRDataSourceShadow_GetLayerCount(arg1);
    5115             231 :     if ( bUseExceptions ) {
    5116               0 :       CPLErr eclass = CPLGetLastErrorType();
    5117               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5118               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5119                 :       }
    5120                 :     }
    5121                 :   }
    5122             231 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5123             231 :   return resultobj;
    5124                 : fail:
    5125               0 :   return NULL;
    5126                 : }
    5127                 : 
    5128                 : 
    5129             110 : SWIGINTERN PyObject *_wrap_DataSource_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5130             110 :   PyObject *resultobj = 0;
    5131             110 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5132             110 :   void *argp1 = 0 ;
    5133             110 :   int res1 = 0 ;
    5134             110 :   PyObject * obj0 = 0 ;
    5135             110 :   OGRDriverShadow *result = 0 ;
    5136                 :   
    5137             110 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetDriver",&obj0)) SWIG_fail;
    5138             110 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5139             110 :   if (!SWIG_IsOK(res1)) {
    5140               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetDriver" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5141                 :   }
    5142             110 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5143                 :   {
    5144             110 :     if ( bUseExceptions ) {
    5145               0 :       CPLErrorReset();
    5146                 :     }
    5147             110 :     result = (OGRDriverShadow *)OGRDataSourceShadow_GetDriver(arg1);
    5148             110 :     if ( bUseExceptions ) {
    5149               0 :       CPLErr eclass = CPLGetLastErrorType();
    5150               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5151               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5152                 :       }
    5153                 :     }
    5154                 :   }
    5155             110 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    5156             110 :   return resultobj;
    5157                 : fail:
    5158               0 :   return NULL;
    5159                 : }
    5160                 : 
    5161                 : 
    5162              11 : SWIGINTERN PyObject *_wrap_DataSource_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5163              11 :   PyObject *resultobj = 0;
    5164              11 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5165              11 :   void *argp1 = 0 ;
    5166              11 :   int res1 = 0 ;
    5167              11 :   PyObject * obj0 = 0 ;
    5168              11 :   char *result = 0 ;
    5169                 :   
    5170              11 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetName",&obj0)) SWIG_fail;
    5171              11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5172              11 :   if (!SWIG_IsOK(res1)) {
    5173               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetName" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5174                 :   }
    5175              11 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5176                 :   {
    5177              11 :     if ( bUseExceptions ) {
    5178               0 :       CPLErrorReset();
    5179                 :     }
    5180              11 :     result = (char *)OGRDataSourceShadow_GetName(arg1);
    5181              11 :     if ( bUseExceptions ) {
    5182               0 :       CPLErr eclass = CPLGetLastErrorType();
    5183               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5184               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5185                 :       }
    5186                 :     }
    5187                 :   }
    5188              11 :   resultobj = SWIG_FromCharPtr((const char *)result);
    5189              11 :   return resultobj;
    5190                 : fail:
    5191               0 :   return NULL;
    5192                 : }
    5193                 : 
    5194                 : 
    5195              15 : SWIGINTERN PyObject *_wrap_DataSource_DeleteLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5196              15 :   PyObject *resultobj = 0;
    5197              15 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5198                 :   int arg2 ;
    5199              15 :   void *argp1 = 0 ;
    5200              15 :   int res1 = 0 ;
    5201                 :   int val2 ;
    5202              15 :   int ecode2 = 0 ;
    5203              15 :   PyObject * obj0 = 0 ;
    5204              15 :   PyObject * obj1 = 0 ;
    5205                 :   OGRErr result;
    5206                 :   
    5207              15 :   if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_DeleteLayer",&obj0,&obj1)) SWIG_fail;
    5208              15 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5209              15 :   if (!SWIG_IsOK(res1)) {
    5210               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_DeleteLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5211                 :   }
    5212              15 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5213              15 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    5214              15 :   if (!SWIG_IsOK(ecode2)) {
    5215               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataSource_DeleteLayer" "', argument " "2"" of type '" "int""'");
    5216                 :   } 
    5217              15 :   arg2 = static_cast< int >(val2);
    5218                 :   {
    5219              15 :     if ( bUseExceptions ) {
    5220               0 :       CPLErrorReset();
    5221                 :     }
    5222              15 :     result = (OGRErr)OGRDataSourceShadow_DeleteLayer(arg1,arg2);
    5223              15 :     if ( bUseExceptions ) {
    5224               0 :       CPLErr eclass = CPLGetLastErrorType();
    5225               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5226               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5227                 :       }
    5228                 :     }
    5229                 :   }
    5230                 :   {
    5231                 :     /* %typemap(out) OGRErr */
    5232              15 :     if ( result != 0 && bUseExceptions) {
    5233               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    5234               0 :       SWIG_fail;
    5235                 :     }
    5236                 :   }
    5237                 :   {
    5238                 :     /* %typemap(ret) OGRErr */
    5239              15 :     if (resultobj == Py_None ) {
    5240               0 :       Py_DECREF(resultobj);
    5241               0 :       resultobj = 0;
    5242                 :     }
    5243              15 :     if (resultobj == 0) {
    5244              15 :       resultobj = PyInt_FromLong( result );
    5245                 :     }
    5246                 :   }
    5247              15 :   return resultobj;
    5248                 : fail:
    5249               0 :   return NULL;
    5250                 : }
    5251                 : 
    5252                 : 
    5253               0 : SWIGINTERN PyObject *_wrap_DataSource_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5254               0 :   PyObject *resultobj = 0;
    5255               0 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5256               0 :   void *argp1 = 0 ;
    5257               0 :   int res1 = 0 ;
    5258               0 :   PyObject * obj0 = 0 ;
    5259                 :   OGRErr result;
    5260                 :   
    5261               0 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_SyncToDisk",&obj0)) SWIG_fail;
    5262               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5263               0 :   if (!SWIG_IsOK(res1)) {
    5264               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_SyncToDisk" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5265                 :   }
    5266               0 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5267                 :   {
    5268               0 :     if ( bUseExceptions ) {
    5269               0 :       CPLErrorReset();
    5270                 :     }
    5271               0 :     result = (OGRErr)OGRDataSourceShadow_SyncToDisk(arg1);
    5272               0 :     if ( bUseExceptions ) {
    5273               0 :       CPLErr eclass = CPLGetLastErrorType();
    5274               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5275               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5276                 :       }
    5277                 :     }
    5278                 :   }
    5279                 :   {
    5280                 :     /* %typemap(out) OGRErr */
    5281               0 :     if ( result != 0 && bUseExceptions) {
    5282               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    5283               0 :       SWIG_fail;
    5284                 :     }
    5285                 :   }
    5286                 :   {
    5287                 :     /* %typemap(ret) OGRErr */
    5288               0 :     if (resultobj == Py_None ) {
    5289               0 :       Py_DECREF(resultobj);
    5290               0 :       resultobj = 0;
    5291                 :     }
    5292               0 :     if (resultobj == 0) {
    5293               0 :       resultobj = PyInt_FromLong( result );
    5294                 :     }
    5295                 :   }
    5296               0 :   return resultobj;
    5297                 : fail:
    5298               0 :   return NULL;
    5299                 : }
    5300                 : 
    5301                 : 
    5302            1558 : SWIGINTERN PyObject *_wrap_DataSource_CreateLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    5303            1558 :   PyObject *resultobj = 0;
    5304            1558 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5305            1558 :   char *arg2 = (char *) 0 ;
    5306            1558 :   OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
    5307            1558 :   OGRwkbGeometryType arg4 = (OGRwkbGeometryType) wkbUnknown ;
    5308            1558 :   char **arg5 = (char **) 0 ;
    5309            1558 :   void *argp1 = 0 ;
    5310            1558 :   int res1 = 0 ;
    5311                 :   int res2 ;
    5312            1558 :   char *buf2 = 0 ;
    5313            1558 :   int alloc2 = 0 ;
    5314            1558 :   void *argp3 = 0 ;
    5315            1558 :   int res3 = 0 ;
    5316                 :   int val4 ;
    5317            1558 :   int ecode4 = 0 ;
    5318            1558 :   PyObject * obj0 = 0 ;
    5319            1558 :   PyObject * obj1 = 0 ;
    5320            1558 :   PyObject * obj2 = 0 ;
    5321            1558 :   PyObject * obj3 = 0 ;
    5322            1558 :   PyObject * obj4 = 0 ;
    5323                 :   char *  kwnames[] = {
    5324                 :     (char *) "self",(char *) "name",(char *) "srs",(char *) "geom_type",(char *) "options", NULL 
    5325            1558 :   };
    5326            1558 :   OGRLayerShadow *result = 0 ;
    5327                 :   
    5328            1558 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:DataSource_CreateLayer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
    5329            1558 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5330            1558 :   if (!SWIG_IsOK(res1)) {
    5331               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_CreateLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5332                 :   }
    5333            1558 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5334            1558 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5335            1558 :   if (!SWIG_IsOK(res2)) {
    5336               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_CreateLayer" "', argument " "2"" of type '" "char const *""'");
    5337                 :   }
    5338            1558 :   arg2 = reinterpret_cast< char * >(buf2);
    5339            1558 :   if (obj2) {
    5340             253 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
    5341             253 :     if (!SWIG_IsOK(res3)) {
    5342               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_CreateLayer" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
    5343                 :     }
    5344             253 :     arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
    5345                 :   }
    5346            1558 :   if (obj3) {
    5347             268 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
    5348             268 :     if (!SWIG_IsOK(ecode4)) {
    5349               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DataSource_CreateLayer" "', argument " "4"" of type '" "OGRwkbGeometryType""'");
    5350                 :     } 
    5351             268 :     arg4 = static_cast< OGRwkbGeometryType >(val4);
    5352                 :   }
    5353            1558 :   if (obj4) {
    5354                 :     {
    5355                 :       /* %typemap(in) char **options */
    5356                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    5357             164 :       if ( ! PySequence_Check(obj4) || PyUnicode_Check(obj4)
    5358                 :   #if PY_VERSION_HEX < 0x03000000
    5359                 :         || PyString_Check(obj4)
    5360                 :   #endif
    5361                 :         ) {
    5362               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    5363               0 :         SWIG_fail;
    5364                 :       }
    5365                 :       
    5366             164 :       int size = PySequence_Size(obj4);
    5367             274 :       for (int i = 0; i < size; i++) {
    5368             110 :         PyObject* pyObj = PySequence_GetItem(obj4,i);
    5369             110 :         if (PyUnicode_Check(pyObj))
    5370                 :         {
    5371                 :           char *pszStr;
    5372                 :           Py_ssize_t nLen;
    5373               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    5374                 : #if PY_VERSION_HEX >= 0x03000000
    5375                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    5376                 : #else
    5377               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    5378                 : #endif
    5379               0 :           arg5 = CSLAddString( arg5, pszStr );
    5380               0 :           Py_XDECREF(pyUTF8Str);
    5381                 :         }
    5382                 : #if PY_VERSION_HEX >= 0x03000000
    5383                 :         else if (PyBytes_Check(pyObj))
    5384                 :         arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
    5385                 : #else
    5386             110 :         else if (PyString_Check(pyObj))
    5387             110 :         arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
    5388                 : #endif
    5389                 :         else
    5390                 :         {
    5391               0 :           Py_DECREF(pyObj);
    5392               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    5393               0 :           SWIG_fail;
    5394                 :         }
    5395             110 :         Py_DECREF(pyObj);
    5396                 :       }
    5397                 :     }
    5398                 :   }
    5399                 :   {
    5400            1558 :     if (!arg2) {
    5401               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    5402                 :     }
    5403                 :   }
    5404                 :   {
    5405            1558 :     if ( bUseExceptions ) {
    5406               0 :       CPLErrorReset();
    5407                 :     }
    5408            1558 :     result = (OGRLayerShadow *)OGRDataSourceShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
    5409            1558 :     if ( bUseExceptions ) {
    5410               0 :       CPLErr eclass = CPLGetLastErrorType();
    5411               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5412               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5413                 :       }
    5414                 :     }
    5415                 :   }
    5416            1558 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5417            1558 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5418                 :   {
    5419                 :     /* %typemap(freearg) char **options */
    5420            1558 :     CSLDestroy( arg5 );
    5421                 :   }
    5422            1558 :   return resultobj;
    5423                 : fail:
    5424               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5425                 :   {
    5426                 :     /* %typemap(freearg) char **options */
    5427               0 :     CSLDestroy( arg5 );
    5428                 :   }
    5429               0 :   return NULL;
    5430                 : }
    5431                 : 
    5432                 : 
    5433               4 : SWIGINTERN PyObject *_wrap_DataSource_CopyLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    5434               4 :   PyObject *resultobj = 0;
    5435               4 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5436               4 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    5437               4 :   char *arg3 = (char *) 0 ;
    5438               4 :   char **arg4 = (char **) 0 ;
    5439               4 :   void *argp1 = 0 ;
    5440               4 :   int res1 = 0 ;
    5441               4 :   void *argp2 = 0 ;
    5442               4 :   int res2 = 0 ;
    5443                 :   int res3 ;
    5444               4 :   char *buf3 = 0 ;
    5445               4 :   int alloc3 = 0 ;
    5446               4 :   PyObject * obj0 = 0 ;
    5447               4 :   PyObject * obj1 = 0 ;
    5448               4 :   PyObject * obj2 = 0 ;
    5449               4 :   PyObject * obj3 = 0 ;
    5450                 :   char *  kwnames[] = {
    5451                 :     (char *) "self",(char *) "src_layer",(char *) "new_name",(char *) "options", NULL 
    5452               4 :   };
    5453               4 :   OGRLayerShadow *result = 0 ;
    5454                 :   
    5455               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:DataSource_CopyLayer",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    5456               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5457               4 :   if (!SWIG_IsOK(res1)) {
    5458               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_CopyLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5459                 :   }
    5460               4 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5461               4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5462               4 :   if (!SWIG_IsOK(res2)) {
    5463               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_CopyLayer" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
    5464                 :   }
    5465               4 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
    5466               4 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    5467               4 :   if (!SWIG_IsOK(res3)) {
    5468               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_CopyLayer" "', argument " "3"" of type '" "char const *""'");
    5469                 :   }
    5470               4 :   arg3 = reinterpret_cast< char * >(buf3);
    5471               4 :   if (obj3) {
    5472                 :     {
    5473                 :       /* %typemap(in) char **options */
    5474                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    5475               0 :       if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
    5476                 :   #if PY_VERSION_HEX < 0x03000000
    5477                 :         || PyString_Check(obj3)
    5478                 :   #endif
    5479                 :         ) {
    5480               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    5481               0 :         SWIG_fail;
    5482                 :       }
    5483                 :       
    5484               0 :       int size = PySequence_Size(obj3);
    5485               0 :       for (int i = 0; i < size; i++) {
    5486               0 :         PyObject* pyObj = PySequence_GetItem(obj3,i);
    5487               0 :         if (PyUnicode_Check(pyObj))
    5488                 :         {
    5489                 :           char *pszStr;
    5490                 :           Py_ssize_t nLen;
    5491               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    5492                 : #if PY_VERSION_HEX >= 0x03000000
    5493                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    5494                 : #else
    5495               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    5496                 : #endif
    5497               0 :           arg4 = CSLAddString( arg4, pszStr );
    5498               0 :           Py_XDECREF(pyUTF8Str);
    5499                 :         }
    5500                 : #if PY_VERSION_HEX >= 0x03000000
    5501                 :         else if (PyBytes_Check(pyObj))
    5502                 :         arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
    5503                 : #else
    5504               0 :         else if (PyString_Check(pyObj))
    5505               0 :         arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
    5506                 : #endif
    5507                 :         else
    5508                 :         {
    5509               0 :           Py_DECREF(pyObj);
    5510               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    5511               0 :           SWIG_fail;
    5512                 :         }
    5513               0 :         Py_DECREF(pyObj);
    5514                 :       }
    5515                 :     }
    5516                 :   }
    5517                 :   {
    5518               4 :     if (!arg2) {
    5519               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    5520                 :     }
    5521                 :   }
    5522                 :   {
    5523               4 :     if ( bUseExceptions ) {
    5524               0 :       CPLErrorReset();
    5525                 :     }
    5526               4 :     result = (OGRLayerShadow *)OGRDataSourceShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
    5527               4 :     if ( bUseExceptions ) {
    5528               0 :       CPLErr eclass = CPLGetLastErrorType();
    5529               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5530               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5531                 :       }
    5532                 :     }
    5533                 :   }
    5534               4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5535               4 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    5536                 :   {
    5537                 :     /* %typemap(freearg) char **options */
    5538               4 :     CSLDestroy( arg4 );
    5539                 :   }
    5540               4 :   return resultobj;
    5541                 : fail:
    5542               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    5543                 :   {
    5544                 :     /* %typemap(freearg) char **options */
    5545               0 :     CSLDestroy( arg4 );
    5546                 :   }
    5547               0 :   return NULL;
    5548                 : }
    5549                 : 
    5550                 : 
    5551            4656 : SWIGINTERN PyObject *_wrap_DataSource_GetLayerByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5552            4656 :   PyObject *resultobj = 0;
    5553            4656 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5554            4656 :   int arg2 = (int) 0 ;
    5555            4656 :   void *argp1 = 0 ;
    5556            4656 :   int res1 = 0 ;
    5557                 :   int val2 ;
    5558            4656 :   int ecode2 = 0 ;
    5559            4656 :   PyObject * obj0 = 0 ;
    5560            4656 :   PyObject * obj1 = 0 ;
    5561            4656 :   OGRLayerShadow *result = 0 ;
    5562                 :   
    5563            4656 :   if (!PyArg_ParseTuple(args,(char *)"O|O:DataSource_GetLayerByIndex",&obj0,&obj1)) SWIG_fail;
    5564            4656 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5565            4656 :   if (!SWIG_IsOK(res1)) {
    5566               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerByIndex" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5567                 :   }
    5568            4656 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5569            4656 :   if (obj1) {
    5570            4656 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
    5571            4656 :     if (!SWIG_IsOK(ecode2)) {
    5572               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataSource_GetLayerByIndex" "', argument " "2"" of type '" "int""'");
    5573                 :     } 
    5574            4656 :     arg2 = static_cast< int >(val2);
    5575                 :   }
    5576                 :   {
    5577            4656 :     if ( bUseExceptions ) {
    5578               0 :       CPLErrorReset();
    5579                 :     }
    5580            4656 :     result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByIndex(arg1,arg2);
    5581            4656 :     if ( bUseExceptions ) {
    5582               0 :       CPLErr eclass = CPLGetLastErrorType();
    5583               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5584               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5585                 :       }
    5586                 :     }
    5587                 :   }
    5588            4656 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5589            4656 :   return resultobj;
    5590                 : fail:
    5591               0 :   return NULL;
    5592                 : }
    5593                 : 
    5594                 : 
    5595            1713 : SWIGINTERN PyObject *_wrap_DataSource_GetLayerByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5596            1713 :   PyObject *resultobj = 0;
    5597            1713 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5598            1713 :   char *arg2 = (char *) 0 ;
    5599            1713 :   void *argp1 = 0 ;
    5600            1713 :   int res1 = 0 ;
    5601                 :   int res2 ;
    5602            1713 :   char *buf2 = 0 ;
    5603            1713 :   int alloc2 = 0 ;
    5604            1713 :   PyObject * obj0 = 0 ;
    5605            1713 :   PyObject * obj1 = 0 ;
    5606            1713 :   OGRLayerShadow *result = 0 ;
    5607                 :   
    5608            1713 :   if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_GetLayerByName",&obj0,&obj1)) SWIG_fail;
    5609            1713 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5610            1713 :   if (!SWIG_IsOK(res1)) {
    5611               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerByName" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5612                 :   }
    5613            1713 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5614            1713 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5615            1713 :   if (!SWIG_IsOK(res2)) {
    5616               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_GetLayerByName" "', argument " "2"" of type '" "char const *""'");
    5617                 :   }
    5618            1713 :   arg2 = reinterpret_cast< char * >(buf2);
    5619                 :   {
    5620            1713 :     if ( bUseExceptions ) {
    5621               0 :       CPLErrorReset();
    5622                 :     }
    5623            1713 :     result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByName(arg1,(char const *)arg2);
    5624            1713 :     if ( bUseExceptions ) {
    5625               0 :       CPLErr eclass = CPLGetLastErrorType();
    5626               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5627               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5628                 :       }
    5629                 :     }
    5630                 :   }
    5631            1713 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5632            1713 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5633            1713 :   return resultobj;
    5634                 : fail:
    5635               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5636               0 :   return NULL;
    5637                 : }
    5638                 : 
    5639                 : 
    5640              54 : SWIGINTERN PyObject *_wrap_DataSource_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5641              54 :   PyObject *resultobj = 0;
    5642              54 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5643              54 :   char *arg2 = (char *) 0 ;
    5644              54 :   void *argp1 = 0 ;
    5645              54 :   int res1 = 0 ;
    5646                 :   int res2 ;
    5647              54 :   char *buf2 = 0 ;
    5648              54 :   int alloc2 = 0 ;
    5649              54 :   PyObject * obj0 = 0 ;
    5650              54 :   PyObject * obj1 = 0 ;
    5651                 :   bool result;
    5652                 :   
    5653              54 :   if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_TestCapability",&obj0,&obj1)) SWIG_fail;
    5654              54 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5655              54 :   if (!SWIG_IsOK(res1)) {
    5656               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_TestCapability" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5657                 :   }
    5658              54 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5659              54 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5660              54 :   if (!SWIG_IsOK(res2)) {
    5661               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_TestCapability" "', argument " "2"" of type '" "char const *""'");
    5662                 :   }
    5663              54 :   arg2 = reinterpret_cast< char * >(buf2);
    5664                 :   {
    5665              54 :     if (!arg2) {
    5666               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    5667                 :     }
    5668                 :   }
    5669                 :   {
    5670              54 :     if ( bUseExceptions ) {
    5671               0 :       CPLErrorReset();
    5672                 :     }
    5673              54 :     result = (bool)OGRDataSourceShadow_TestCapability(arg1,(char const *)arg2);
    5674              54 :     if ( bUseExceptions ) {
    5675               0 :       CPLErr eclass = CPLGetLastErrorType();
    5676               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5677               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5678                 :       }
    5679                 :     }
    5680                 :   }
    5681              54 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
    5682              54 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5683              54 :   return resultobj;
    5684                 : fail:
    5685               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5686               0 :   return NULL;
    5687                 : }
    5688                 : 
    5689                 : 
    5690            1803 : SWIGINTERN PyObject *_wrap_DataSource_ExecuteSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    5691            1803 :   PyObject *resultobj = 0;
    5692            1803 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5693            1803 :   char *arg2 = (char *) 0 ;
    5694            1803 :   OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
    5695            1803 :   char *arg4 = (char *) "" ;
    5696            1803 :   void *argp1 = 0 ;
    5697            1803 :   int res1 = 0 ;
    5698                 :   int res2 ;
    5699            1803 :   char *buf2 = 0 ;
    5700            1803 :   int alloc2 = 0 ;
    5701            1803 :   void *argp3 = 0 ;
    5702            1803 :   int res3 = 0 ;
    5703                 :   int res4 ;
    5704            1803 :   char *buf4 = 0 ;
    5705            1803 :   int alloc4 = 0 ;
    5706            1803 :   PyObject * obj0 = 0 ;
    5707            1803 :   PyObject * obj1 = 0 ;
    5708            1803 :   PyObject * obj2 = 0 ;
    5709            1803 :   PyObject * obj3 = 0 ;
    5710                 :   char *  kwnames[] = {
    5711                 :     (char *) "self",(char *) "statement",(char *) "spatialFilter",(char *) "dialect", NULL 
    5712            1803 :   };
    5713            1803 :   OGRLayerShadow *result = 0 ;
    5714                 :   
    5715            1803 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DataSource_ExecuteSQL",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    5716            1803 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5717            1803 :   if (!SWIG_IsOK(res1)) {
    5718               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_ExecuteSQL" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5719                 :   }
    5720            1803 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5721            1803 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5722            1803 :   if (!SWIG_IsOK(res2)) {
    5723               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_ExecuteSQL" "', argument " "2"" of type '" "char const *""'");
    5724                 :   }
    5725            1803 :   arg2 = reinterpret_cast< char * >(buf2);
    5726            1803 :   if (obj2) {
    5727               6 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    5728               6 :     if (!SWIG_IsOK(res3)) {
    5729               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_ExecuteSQL" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
    5730                 :     }
    5731               6 :     arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
    5732                 :   }
    5733            1803 :   if (obj3) {
    5734             234 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
    5735             234 :     if (!SWIG_IsOK(res4)) {
    5736               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DataSource_ExecuteSQL" "', argument " "4"" of type '" "char const *""'");
    5737                 :     }
    5738             234 :     arg4 = reinterpret_cast< char * >(buf4);
    5739                 :   }
    5740                 :   {
    5741            1803 :     if (!arg2) {
    5742               1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    5743                 :     }
    5744                 :   }
    5745                 :   {
    5746            1802 :     if ( bUseExceptions ) {
    5747               0 :       CPLErrorReset();
    5748                 :     }
    5749            1802 :     result = (OGRLayerShadow *)OGRDataSourceShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
    5750            1802 :     if ( bUseExceptions ) {
    5751               0 :       CPLErr eclass = CPLGetLastErrorType();
    5752               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5753               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5754                 :       }
    5755                 :     }
    5756                 :   }
    5757            1802 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5758            1802 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5759            1802 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
    5760            1802 :   return resultobj;
    5761                 : fail:
    5762               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5763               1 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
    5764               1 :   return NULL;
    5765                 : }
    5766                 : 
    5767                 : 
    5768             762 : SWIGINTERN PyObject *_wrap_DataSource_ReleaseResultSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5769             762 :   PyObject *resultobj = 0;
    5770             762 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5771             762 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    5772             762 :   void *argp1 = 0 ;
    5773             762 :   int res1 = 0 ;
    5774             762 :   int res2 = 0 ;
    5775             762 :   PyObject * obj0 = 0 ;
    5776             762 :   PyObject * obj1 = 0 ;
    5777                 :   
    5778             762 :   if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_ReleaseResultSet",&obj0,&obj1)) SWIG_fail;
    5779             762 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5780             762 :   if (!SWIG_IsOK(res1)) {
    5781               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_ReleaseResultSet" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5782                 :   }
    5783             762 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5784             762 :   res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRLayerShadow, SWIG_POINTER_DISOWN |  0 );
    5785             762 :   if (!SWIG_IsOK(res2)) {
    5786               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_ReleaseResultSet" "', argument " "2"" of type '" "OGRLayerShadow *""'");
    5787                 :   }
    5788                 :   {
    5789             762 :     if ( bUseExceptions ) {
    5790               0 :       CPLErrorReset();
    5791                 :     }
    5792             762 :     OGRDataSourceShadow_ReleaseResultSet(arg1,arg2);
    5793             762 :     if ( bUseExceptions ) {
    5794               0 :       CPLErr eclass = CPLGetLastErrorType();
    5795               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5796               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5797                 :       }
    5798                 :     }
    5799                 :   }
    5800             762 :   resultobj = SWIG_Py_Void();
    5801             762 :   return resultobj;
    5802                 : fail:
    5803               0 :   return NULL;
    5804                 : }
    5805                 : 
    5806                 : 
    5807               2 : SWIGINTERN PyObject *DataSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5808                 :   PyObject *obj;
    5809               2 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    5810               2 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRDataSourceShadow, SWIG_NewClientData(obj));
    5811               2 :   return SWIG_Py_Void();
    5812                 : }
    5813                 : 
    5814               0 : SWIGINTERN PyObject *_wrap_Layer_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5815               0 :   PyObject *resultobj = 0;
    5816               0 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5817               0 :   void *argp1 = 0 ;
    5818               0 :   int res1 = 0 ;
    5819               0 :   PyObject * obj0 = 0 ;
    5820                 :   int result;
    5821                 :   
    5822               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetRefCount",&obj0)) SWIG_fail;
    5823               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5824               0 :   if (!SWIG_IsOK(res1)) {
    5825               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetRefCount" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    5826                 :   }
    5827               0 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    5828                 :   {
    5829               0 :     if ( bUseExceptions ) {
    5830               0 :       CPLErrorReset();
    5831                 :     }
    5832               0 :     result = (int)OGRLayerShadow_GetRefCount(arg1);
    5833               0 :     if ( bUseExceptions ) {
    5834               0 :       CPLErr eclass = CPLGetLastErrorType();
    5835               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5836               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5837                 :       }
    5838                 :     }
    5839                 :   }
    5840               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5841               0 :   return resultobj;
    5842                 : fail:
    5843               0 :   return NULL;
    5844                 : }
    5845                 : 
    5846                 : 
    5847              65 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5848              65 :   PyObject *resultobj = 0;
    5849              65 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5850              65 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    5851              65 :   void *argp1 = 0 ;
    5852              65 :   int res1 = 0 ;
    5853              65 :   void *argp2 = 0 ;
    5854              65 :   int res2 = 0 ;
    5855              65 :   PyObject * obj0 = 0 ;
    5856              65 :   PyObject * obj1 = 0 ;
    5857                 :   
    5858              65 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetSpatialFilter",&obj0,&obj1)) SWIG_fail;
    5859              65 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5860              65 :   if (!SWIG_IsOK(res1)) {
    5861               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    5862                 :   }
    5863              65 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    5864              65 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    5865              65 :   if (!SWIG_IsOK(res2)) {
    5866               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetSpatialFilter" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
    5867                 :   }
    5868              65 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
    5869                 :   {
    5870              65 :     if ( bUseExceptions ) {
    5871               0 :       CPLErrorReset();
    5872                 :     }
    5873                 :     OGRLayerShadow_SetSpatialFilter(arg1,arg2);
    5874              65 :     if ( bUseExceptions ) {
    5875               0 :       CPLErr eclass = CPLGetLastErrorType();
    5876               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5877               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5878                 :       }
    5879                 :     }
    5880                 :   }
    5881              65 :   resultobj = SWIG_Py_Void();
    5882              65 :   return resultobj;
    5883                 : fail:
    5884               0 :   return NULL;
    5885                 : }
    5886                 : 
    5887                 : 
    5888           17519 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5889           17519 :   PyObject *resultobj = 0;
    5890           17519 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5891                 :   double arg2 ;
    5892                 :   double arg3 ;
    5893                 :   double arg4 ;
    5894                 :   double arg5 ;
    5895           17519 :   void *argp1 = 0 ;
    5896           17519 :   int res1 = 0 ;
    5897                 :   double val2 ;
    5898           17519 :   int ecode2 = 0 ;
    5899                 :   double val3 ;
    5900           17519 :   int ecode3 = 0 ;
    5901                 :   double val4 ;
    5902           17519 :   int ecode4 = 0 ;
    5903                 :   double val5 ;
    5904           17519 :   int ecode5 = 0 ;
    5905           17519 :   PyObject * obj0 = 0 ;
    5906           17519 :   PyObject * obj1 = 0 ;
    5907           17519 :   PyObject * obj2 = 0 ;
    5908           17519 :   PyObject * obj3 = 0 ;
    5909           17519 :   PyObject * obj4 = 0 ;
    5910                 :   
    5911           17519 :   if (!PyArg_ParseTuple(args,(char *)"OOOOO:Layer_SetSpatialFilterRect",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
    5912           17519 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5913           17519 :   if (!SWIG_IsOK(res1)) {
    5914               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilterRect" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    5915                 :   }
    5916           17519 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    5917           17519 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    5918           17519 :   if (!SWIG_IsOK(ecode2)) {
    5919               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilterRect" "', argument " "2"" of type '" "double""'");
    5920                 :   } 
    5921           17519 :   arg2 = static_cast< double >(val2);
    5922           17519 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
    5923           17519 :   if (!SWIG_IsOK(ecode3)) {
    5924               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_SetSpatialFilterRect" "', argument " "3"" of type '" "double""'");
    5925                 :   } 
    5926           17519 :   arg3 = static_cast< double >(val3);
    5927           17519 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
    5928           17519 :   if (!SWIG_IsOK(ecode4)) {
    5929               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_SetSpatialFilterRect" "', argument " "4"" of type '" "double""'");
    5930                 :   } 
    5931           17519 :   arg4 = static_cast< double >(val4);
    5932           17519 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
    5933           17519 :   if (!SWIG_IsOK(ecode5)) {
    5934               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_SetSpatialFilterRect" "', argument " "5"" of type '" "double""'");
    5935                 :   } 
    5936           17519 :   arg5 = static_cast< double >(val5);
    5937                 :   {
    5938           17519 :     if ( bUseExceptions ) {
    5939               0 :       CPLErrorReset();
    5940                 :     }
    5941                 :     OGRLayerShadow_SetSpatialFilterRect(arg1,arg2,arg3,arg4,arg5);
    5942           17519 :     if ( bUseExceptions ) {
    5943               0 :       CPLErr eclass = CPLGetLastErrorType();
    5944               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5945               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5946                 :       }
    5947                 :     }
    5948                 :   }
    5949           17519 :   resultobj = SWIG_Py_Void();
    5950           17519 :   return resultobj;
    5951                 : fail:
    5952               0 :   return NULL;
    5953                 : }
    5954                 : 
    5955                 : 
    5956               0 : SWIGINTERN PyObject *_wrap_Layer_GetSpatialFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5957               0 :   PyObject *resultobj = 0;
    5958               0 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5959               0 :   void *argp1 = 0 ;
    5960               0 :   int res1 = 0 ;
    5961               0 :   PyObject * obj0 = 0 ;
    5962               0 :   OGRGeometryShadow *result = 0 ;
    5963                 :   
    5964               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetSpatialFilter",&obj0)) SWIG_fail;
    5965               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5966               0 :   if (!SWIG_IsOK(res1)) {
    5967               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    5968                 :   }
    5969               0 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    5970                 :   {
    5971               0 :     if ( bUseExceptions ) {
    5972               0 :       CPLErrorReset();
    5973                 :     }
    5974               0 :     result = (OGRGeometryShadow *)OGRLayerShadow_GetSpatialFilter(arg1);
    5975               0 :     if ( bUseExceptions ) {
    5976               0 :       CPLErr eclass = CPLGetLastErrorType();
    5977               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5978               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5979                 :       }
    5980                 :     }
    5981                 :   }
    5982               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    5983               0 :   return resultobj;
    5984                 : fail:
    5985               0 :   return NULL;
    5986                 : }
    5987                 : 
    5988                 : 
    5989             240 : SWIGINTERN PyObject *_wrap_Layer_SetAttributeFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5990             240 :   PyObject *resultobj = 0;
    5991             240 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5992             240 :   char *arg2 = (char *) 0 ;
    5993             240 :   void *argp1 = 0 ;
    5994             240 :   int res1 = 0 ;
    5995                 :   int res2 ;
    5996             240 :   char *buf2 = 0 ;
    5997             240 :   int alloc2 = 0 ;
    5998             240 :   PyObject * obj0 = 0 ;
    5999             240 :   PyObject * obj1 = 0 ;
    6000                 :   OGRErr result;
    6001                 :   
    6002             240 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetAttributeFilter",&obj0,&obj1)) SWIG_fail;
    6003             240 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6004             240 :   if (!SWIG_IsOK(res1)) {
    6005               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetAttributeFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6006                 :   }
    6007             240 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6008             240 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6009             240 :   if (!SWIG_IsOK(res2)) {
    6010               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetAttributeFilter" "', argument " "2"" of type '" "char *""'");
    6011                 :   }
    6012             240 :   arg2 = reinterpret_cast< char * >(buf2);
    6013                 :   {
    6014             240 :     if ( bUseExceptions ) {
    6015               0 :       CPLErrorReset();
    6016                 :     }
    6017             240 :     result = (OGRErr)OGRLayerShadow_SetAttributeFilter(arg1,arg2);
    6018             240 :     if ( bUseExceptions ) {
    6019               0 :       CPLErr eclass = CPLGetLastErrorType();
    6020               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6021               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6022                 :       }
    6023                 :     }
    6024                 :   }
    6025                 :   {
    6026                 :     /* %typemap(out) OGRErr */
    6027             240 :     if ( result != 0 && bUseExceptions) {
    6028               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6029               0 :       SWIG_fail;
    6030                 :     }
    6031                 :   }
    6032             240 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6033                 :   {
    6034                 :     /* %typemap(ret) OGRErr */
    6035             240 :     if (resultobj == Py_None ) {
    6036               0 :       Py_DECREF(resultobj);
    6037               0 :       resultobj = 0;
    6038                 :     }
    6039             240 :     if (resultobj == 0) {
    6040             240 :       resultobj = PyInt_FromLong( result );
    6041                 :     }
    6042                 :   }
    6043             240 :   return resultobj;
    6044                 : fail:
    6045               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6046               0 :   return NULL;
    6047                 : }
    6048                 : 
    6049                 : 
    6050           18939 : SWIGINTERN PyObject *_wrap_Layer_ResetReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6051           18939 :   PyObject *resultobj = 0;
    6052           18939 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6053           18939 :   void *argp1 = 0 ;
    6054           18939 :   int res1 = 0 ;
    6055           18939 :   PyObject * obj0 = 0 ;
    6056                 :   
    6057           18939 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_ResetReading",&obj0)) SWIG_fail;
    6058           18939 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6059           18939 :   if (!SWIG_IsOK(res1)) {
    6060               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ResetReading" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6061                 :   }
    6062           18939 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6063                 :   {
    6064           18939 :     if ( bUseExceptions ) {
    6065               0 :       CPLErrorReset();
    6066                 :     }
    6067                 :     OGRLayerShadow_ResetReading(arg1);
    6068           18939 :     if ( bUseExceptions ) {
    6069               0 :       CPLErr eclass = CPLGetLastErrorType();
    6070               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6071               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6072                 :       }
    6073                 :     }
    6074                 :   }
    6075           18939 :   resultobj = SWIG_Py_Void();
    6076           18939 :   return resultobj;
    6077                 : fail:
    6078               0 :   return NULL;
    6079                 : }
    6080                 : 
    6081                 : 
    6082            4158 : SWIGINTERN PyObject *_wrap_Layer_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6083            4158 :   PyObject *resultobj = 0;
    6084            4158 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6085            4158 :   void *argp1 = 0 ;
    6086            4158 :   int res1 = 0 ;
    6087            4158 :   PyObject * obj0 = 0 ;
    6088            4158 :   char *result = 0 ;
    6089                 :   
    6090            4158 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetName",&obj0)) SWIG_fail;
    6091            4158 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6092            4158 :   if (!SWIG_IsOK(res1)) {
    6093               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetName" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6094                 :   }
    6095            4158 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6096                 :   {
    6097            4158 :     if ( bUseExceptions ) {
    6098               0 :       CPLErrorReset();
    6099                 :     }
    6100            4158 :     result = (char *)OGRLayerShadow_GetName(arg1);
    6101            4158 :     if ( bUseExceptions ) {
    6102               0 :       CPLErr eclass = CPLGetLastErrorType();
    6103               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6104               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6105                 :       }
    6106                 :     }
    6107                 :   }
    6108            4158 :   resultobj = SWIG_FromCharPtr((const char *)result);
    6109            4158 :   return resultobj;
    6110                 : fail:
    6111               0 :   return NULL;
    6112                 : }
    6113                 : 
    6114                 : 
    6115             113 : SWIGINTERN PyObject *_wrap_Layer_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6116             113 :   PyObject *resultobj = 0;
    6117             113 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6118             113 :   void *argp1 = 0 ;
    6119             113 :   int res1 = 0 ;
    6120             113 :   PyObject * obj0 = 0 ;
    6121                 :   OGRwkbGeometryType result;
    6122                 :   
    6123             113 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetGeomType",&obj0)) SWIG_fail;
    6124             113 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6125             113 :   if (!SWIG_IsOK(res1)) {
    6126               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeomType" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6127                 :   }
    6128             113 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6129                 :   {
    6130             113 :     if ( bUseExceptions ) {
    6131               0 :       CPLErrorReset();
    6132                 :     }
    6133             113 :     result = (OGRwkbGeometryType)OGRLayerShadow_GetGeomType(arg1);
    6134             113 :     if ( bUseExceptions ) {
    6135               0 :       CPLErr eclass = CPLGetLastErrorType();
    6136               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6137               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6138                 :       }
    6139                 :     }
    6140                 :   }
    6141             226 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6142             113 :   return resultobj;
    6143                 : fail:
    6144               0 :   return NULL;
    6145                 : }
    6146                 : 
    6147                 : 
    6148              29 : SWIGINTERN PyObject *_wrap_Layer_GetGeometryColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6149              29 :   PyObject *resultobj = 0;
    6150              29 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6151              29 :   void *argp1 = 0 ;
    6152              29 :   int res1 = 0 ;
    6153              29 :   PyObject * obj0 = 0 ;
    6154              29 :   char *result = 0 ;
    6155                 :   
    6156              29 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetGeometryColumn",&obj0)) SWIG_fail;
    6157              29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6158              29 :   if (!SWIG_IsOK(res1)) {
    6159               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeometryColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6160                 :   }
    6161              29 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6162                 :   {
    6163              29 :     if ( bUseExceptions ) {
    6164               0 :       CPLErrorReset();
    6165                 :     }
    6166              29 :     result = (char *)OGRLayerShadow_GetGeometryColumn(arg1);
    6167              29 :     if ( bUseExceptions ) {
    6168               0 :       CPLErr eclass = CPLGetLastErrorType();
    6169               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6170               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6171                 :       }
    6172                 :     }
    6173                 :   }
    6174              29 :   resultobj = SWIG_FromCharPtr((const char *)result);
    6175              29 :   return resultobj;
    6176                 : fail:
    6177               0 :   return NULL;
    6178                 : }
    6179                 : 
    6180                 : 
    6181              21 : SWIGINTERN PyObject *_wrap_Layer_GetFIDColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6182              21 :   PyObject *resultobj = 0;
    6183              21 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6184              21 :   void *argp1 = 0 ;
    6185              21 :   int res1 = 0 ;
    6186              21 :   PyObject * obj0 = 0 ;
    6187              21 :   char *result = 0 ;
    6188                 :   
    6189              21 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetFIDColumn",&obj0)) SWIG_fail;
    6190              21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6191              21 :   if (!SWIG_IsOK(res1)) {
    6192               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFIDColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6193                 :   }
    6194              21 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6195                 :   {
    6196              21 :     if ( bUseExceptions ) {
    6197               0 :       CPLErrorReset();
    6198                 :     }
    6199              21 :     result = (char *)OGRLayerShadow_GetFIDColumn(arg1);
    6200              21 :     if ( bUseExceptions ) {
    6201               0 :       CPLErr eclass = CPLGetLastErrorType();
    6202               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6203               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6204                 :       }
    6205                 :     }
    6206                 :   }
    6207              21 :   resultobj = SWIG_FromCharPtr((const char *)result);
    6208              21 :   return resultobj;
    6209                 : fail:
    6210               0 :   return NULL;
    6211                 : }
    6212                 : 
    6213                 : 
    6214              97 : SWIGINTERN PyObject *_wrap_Layer_GetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6215              97 :   PyObject *resultobj = 0;
    6216              97 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6217                 :   long arg2 ;
    6218              97 :   void *argp1 = 0 ;
    6219              97 :   int res1 = 0 ;
    6220                 :   long val2 ;
    6221              97 :   int ecode2 = 0 ;
    6222              97 :   PyObject * obj0 = 0 ;
    6223              97 :   PyObject * obj1 = 0 ;
    6224              97 :   OGRFeatureShadow *result = 0 ;
    6225                 :   
    6226              97 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_GetFeature",&obj0,&obj1)) SWIG_fail;
    6227              97 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6228              97 :   if (!SWIG_IsOK(res1)) {
    6229               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6230                 :   }
    6231              97 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6232              97 :   ecode2 = SWIG_AsVal_long(obj1, &val2);
    6233              97 :   if (!SWIG_IsOK(ecode2)) {
    6234               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_GetFeature" "', argument " "2"" of type '" "long""'");
    6235                 :   } 
    6236              97 :   arg2 = static_cast< long >(val2);
    6237                 :   {
    6238              97 :     if ( bUseExceptions ) {
    6239               0 :       CPLErrorReset();
    6240                 :     }
    6241              97 :     result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
    6242              97 :     if ( bUseExceptions ) {
    6243               0 :       CPLErr eclass = CPLGetLastErrorType();
    6244               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6245               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6246                 :       }
    6247                 :     }
    6248                 :   }
    6249              97 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
    6250              97 :   return resultobj;
    6251                 : fail:
    6252               0 :   return NULL;
    6253                 : }
    6254                 : 
    6255                 : 
    6256           60559 : SWIGINTERN PyObject *_wrap_Layer_GetNextFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6257           60559 :   PyObject *resultobj = 0;
    6258           60559 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6259           60559 :   void *argp1 = 0 ;
    6260           60559 :   int res1 = 0 ;
    6261           60559 :   PyObject * obj0 = 0 ;
    6262           60559 :   OGRFeatureShadow *result = 0 ;
    6263                 :   
    6264           60559 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetNextFeature",&obj0)) SWIG_fail;
    6265           60559 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6266           60559 :   if (!SWIG_IsOK(res1)) {
    6267               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetNextFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6268                 :   }
    6269           60559 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6270                 :   {
    6271           60559 :     if ( bUseExceptions ) {
    6272               0 :       CPLErrorReset();
    6273                 :     }
    6274           60559 :     result = (OGRFeatureShadow *)OGRLayerShadow_GetNextFeature(arg1);
    6275           60559 :     if ( bUseExceptions ) {
    6276               0 :       CPLErr eclass = CPLGetLastErrorType();
    6277               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6278               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6279                 :       }
    6280                 :     }
    6281                 :   }
    6282           60559 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
    6283           60559 :   return resultobj;
    6284                 : fail:
    6285               0 :   return NULL;
    6286                 : }
    6287                 : 
    6288                 : 
    6289              10 : SWIGINTERN PyObject *_wrap_Layer_SetNextByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6290              10 :   PyObject *resultobj = 0;
    6291              10 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6292                 :   long arg2 ;
    6293              10 :   void *argp1 = 0 ;
    6294              10 :   int res1 = 0 ;
    6295                 :   long val2 ;
    6296              10 :   int ecode2 = 0 ;
    6297              10 :   PyObject * obj0 = 0 ;
    6298              10 :   PyObject * obj1 = 0 ;
    6299                 :   OGRErr result;
    6300                 :   
    6301              10 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetNextByIndex",&obj0,&obj1)) SWIG_fail;
    6302              10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6303              10 :   if (!SWIG_IsOK(res1)) {
    6304               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetNextByIndex" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6305                 :   }
    6306              10 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6307              10 :   ecode2 = SWIG_AsVal_long(obj1, &val2);
    6308              10 :   if (!SWIG_IsOK(ecode2)) {
    6309               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetNextByIndex" "', argument " "2"" of type '" "long""'");
    6310                 :   } 
    6311              10 :   arg2 = static_cast< long >(val2);
    6312                 :   {
    6313              10 :     if ( bUseExceptions ) {
    6314               0 :       CPLErrorReset();
    6315                 :     }
    6316              10 :     result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,arg2);
    6317              10 :     if ( bUseExceptions ) {
    6318               0 :       CPLErr eclass = CPLGetLastErrorType();
    6319               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6320               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6321                 :       }
    6322                 :     }
    6323                 :   }
    6324                 :   {
    6325                 :     /* %typemap(out) OGRErr */
    6326              10 :     if ( result != 0 && bUseExceptions) {
    6327               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6328               0 :       SWIG_fail;
    6329                 :     }
    6330                 :   }
    6331                 :   {
    6332                 :     /* %typemap(ret) OGRErr */
    6333              10 :     if (resultobj == Py_None ) {
    6334               0 :       Py_DECREF(resultobj);
    6335               0 :       resultobj = 0;
    6336                 :     }
    6337              10 :     if (resultobj == 0) {
    6338              10 :       resultobj = PyInt_FromLong( result );
    6339                 :     }
    6340                 :   }
    6341              10 :   return resultobj;
    6342                 : fail:
    6343               0 :   return NULL;
    6344                 : }
    6345                 : 
    6346                 : 
    6347            2057 : SWIGINTERN PyObject *_wrap_Layer_SetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6348            2057 :   PyObject *resultobj = 0;
    6349            2057 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6350            2057 :   OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    6351            2057 :   void *argp1 = 0 ;
    6352            2057 :   int res1 = 0 ;
    6353            2057 :   void *argp2 = 0 ;
    6354            2057 :   int res2 = 0 ;
    6355            2057 :   PyObject * obj0 = 0 ;
    6356            2057 :   PyObject * obj1 = 0 ;
    6357                 :   OGRErr result;
    6358                 :   
    6359            2057 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetFeature",&obj0,&obj1)) SWIG_fail;
    6360            2057 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6361            2057 :   if (!SWIG_IsOK(res1)) {
    6362               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6363                 :   }
    6364            2057 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6365            2057 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    6366            2057 :   if (!SWIG_IsOK(res2)) {
    6367               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
    6368                 :   }
    6369            2057 :   arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
    6370                 :   {
    6371            2057 :     if (!arg2) {
    6372               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    6373                 :     }
    6374                 :   }
    6375                 :   {
    6376            2057 :     if ( bUseExceptions ) {
    6377               0 :       CPLErrorReset();
    6378                 :     }
    6379            2057 :     result = (OGRErr)OGRLayerShadow_SetFeature(arg1,arg2);
    6380            2057 :     if ( bUseExceptions ) {
    6381               0 :       CPLErr eclass = CPLGetLastErrorType();
    6382               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6383               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6384                 :       }
    6385                 :     }
    6386                 :   }
    6387                 :   {
    6388                 :     /* %typemap(out) OGRErr */
    6389            2057 :     if ( result != 0 && bUseExceptions) {
    6390               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6391               0 :       SWIG_fail;
    6392                 :     }
    6393                 :   }
    6394                 :   {
    6395                 :     /* %typemap(ret) OGRErr */
    6396            2057 :     if (resultobj == Py_None ) {
    6397               0 :       Py_DECREF(resultobj);
    6398               0 :       resultobj = 0;
    6399                 :     }
    6400            2057 :     if (resultobj == 0) {
    6401            2057 :       resultobj = PyInt_FromLong( result );
    6402                 :     }
    6403                 :   }
    6404            2057 :   return resultobj;
    6405                 : fail:
    6406               0 :   return NULL;
    6407                 : }
    6408                 : 
    6409                 : 
    6410           32957 : SWIGINTERN PyObject *_wrap_Layer_CreateFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6411           32957 :   PyObject *resultobj = 0;
    6412           32957 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6413           32957 :   OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    6414           32957 :   void *argp1 = 0 ;
    6415           32957 :   int res1 = 0 ;
    6416           32957 :   void *argp2 = 0 ;
    6417           32957 :   int res2 = 0 ;
    6418           32957 :   PyObject * obj0 = 0 ;
    6419           32957 :   PyObject * obj1 = 0 ;
    6420                 :   OGRErr result;
    6421                 :   
    6422           32957 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_CreateFeature",&obj0,&obj1)) SWIG_fail;
    6423           32957 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6424           32957 :   if (!SWIG_IsOK(res1)) {
    6425               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6426                 :   }
    6427           32957 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6428           32957 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    6429           32957 :   if (!SWIG_IsOK(res2)) {
    6430               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
    6431                 :   }
    6432           32957 :   arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
    6433                 :   {
    6434           32957 :     if (!arg2) {
    6435               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    6436                 :     }
    6437                 :   }
    6438                 :   {
    6439           32957 :     if ( bUseExceptions ) {
    6440               0 :       CPLErrorReset();
    6441                 :     }
    6442           32957 :     result = (OGRErr)OGRLayerShadow_CreateFeature(arg1,arg2);
    6443           32957 :     if ( bUseExceptions ) {
    6444               0 :       CPLErr eclass = CPLGetLastErrorType();
    6445               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6446               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6447                 :       }
    6448                 :     }
    6449                 :   }
    6450                 :   {
    6451                 :     /* %typemap(out) OGRErr */
    6452           32957 :     if ( result != 0 && bUseExceptions) {
    6453               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6454               0 :       SWIG_fail;
    6455                 :     }
    6456                 :   }
    6457                 :   {
    6458                 :     /* %typemap(ret) OGRErr */
    6459           32957 :     if (resultobj == Py_None ) {
    6460               0 :       Py_DECREF(resultobj);
    6461               0 :       resultobj = 0;
    6462                 :     }
    6463           32957 :     if (resultobj == 0) {
    6464           32957 :       resultobj = PyInt_FromLong( result );
    6465                 :     }
    6466                 :   }
    6467           32957 :   return resultobj;
    6468                 : fail:
    6469               0 :   return NULL;
    6470                 : }
    6471                 : 
    6472                 : 
    6473              38 : SWIGINTERN PyObject *_wrap_Layer_DeleteFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6474              38 :   PyObject *resultobj = 0;
    6475              38 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6476                 :   long arg2 ;
    6477              38 :   void *argp1 = 0 ;
    6478              38 :   int res1 = 0 ;
    6479                 :   long val2 ;
    6480              38 :   int ecode2 = 0 ;
    6481              38 :   PyObject * obj0 = 0 ;
    6482              38 :   PyObject * obj1 = 0 ;
    6483                 :   OGRErr result;
    6484                 :   
    6485              38 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_DeleteFeature",&obj0,&obj1)) SWIG_fail;
    6486              38 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6487              38 :   if (!SWIG_IsOK(res1)) {
    6488               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6489                 :   }
    6490              38 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6491              38 :   ecode2 = SWIG_AsVal_long(obj1, &val2);
    6492              38 :   if (!SWIG_IsOK(ecode2)) {
    6493               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_DeleteFeature" "', argument " "2"" of type '" "long""'");
    6494                 :   } 
    6495              38 :   arg2 = static_cast< long >(val2);
    6496                 :   {
    6497              38 :     if ( bUseExceptions ) {
    6498               0 :       CPLErrorReset();
    6499                 :     }
    6500              38 :     result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,arg2);
    6501              38 :     if ( bUseExceptions ) {
    6502               0 :       CPLErr eclass = CPLGetLastErrorType();
    6503               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6504               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6505                 :       }
    6506                 :     }
    6507                 :   }
    6508                 :   {
    6509                 :     /* %typemap(out) OGRErr */
    6510              38 :     if ( result != 0 && bUseExceptions) {
    6511               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6512               0 :       SWIG_fail;
    6513                 :     }
    6514                 :   }
    6515                 :   {
    6516                 :     /* %typemap(ret) OGRErr */
    6517              38 :     if (resultobj == Py_None ) {
    6518               0 :       Py_DECREF(resultobj);
    6519               0 :       resultobj = 0;
    6520                 :     }
    6521              38 :     if (resultobj == 0) {
    6522              38 :       resultobj = PyInt_FromLong( result );
    6523                 :     }
    6524                 :   }
    6525              38 :   return resultobj;
    6526                 : fail:
    6527               0 :   return NULL;
    6528                 : }
    6529                 : 
    6530                 : 
    6531               3 : SWIGINTERN PyObject *_wrap_Layer_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6532               3 :   PyObject *resultobj = 0;
    6533               3 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6534               3 :   void *argp1 = 0 ;
    6535               3 :   int res1 = 0 ;
    6536               3 :   PyObject * obj0 = 0 ;
    6537                 :   OGRErr result;
    6538                 :   
    6539               3 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_SyncToDisk",&obj0)) SWIG_fail;
    6540               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6541               3 :   if (!SWIG_IsOK(res1)) {
    6542               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SyncToDisk" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6543                 :   }
    6544               3 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6545                 :   {
    6546               3 :     if ( bUseExceptions ) {
    6547               0 :       CPLErrorReset();
    6548                 :     }
    6549               3 :     result = (OGRErr)OGRLayerShadow_SyncToDisk(arg1);
    6550               3 :     if ( bUseExceptions ) {
    6551               0 :       CPLErr eclass = CPLGetLastErrorType();
    6552               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6553               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6554                 :       }
    6555                 :     }
    6556                 :   }
    6557                 :   {
    6558                 :     /* %typemap(out) OGRErr */
    6559               3 :     if ( result != 0 && bUseExceptions) {
    6560               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6561               0 :       SWIG_fail;
    6562                 :     }
    6563                 :   }
    6564                 :   {
    6565                 :     /* %typemap(ret) OGRErr */
    6566               3 :     if (resultobj == Py_None ) {
    6567               0 :       Py_DECREF(resultobj);
    6568               0 :       resultobj = 0;
    6569                 :     }
    6570               3 :     if (resultobj == 0) {
    6571               3 :       resultobj = PyInt_FromLong( result );
    6572                 :     }
    6573                 :   }
    6574               3 :   return resultobj;
    6575                 : fail:
    6576               0 :   return NULL;
    6577                 : }
    6578                 : 
    6579                 : 
    6580           31806 : SWIGINTERN PyObject *_wrap_Layer_GetLayerDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6581           31806 :   PyObject *resultobj = 0;
    6582           31806 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6583           31806 :   void *argp1 = 0 ;
    6584           31806 :   int res1 = 0 ;
    6585           31806 :   PyObject * obj0 = 0 ;
    6586           31806 :   OGRFeatureDefnShadow *result = 0 ;
    6587                 :   
    6588           31806 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetLayerDefn",&obj0)) SWIG_fail;
    6589           31806 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6590           31806 :   if (!SWIG_IsOK(res1)) {
    6591               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetLayerDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6592                 :   }
    6593           31806 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6594                 :   {
    6595           31806 :     if ( bUseExceptions ) {
    6596               0 :       CPLErrorReset();
    6597                 :     }
    6598           31806 :     result = (OGRFeatureDefnShadow *)OGRLayerShadow_GetLayerDefn(arg1);
    6599           31806 :     if ( bUseExceptions ) {
    6600               0 :       CPLErr eclass = CPLGetLastErrorType();
    6601               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6602               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6603                 :       }
    6604                 :     }
    6605                 :   }
    6606           31806 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
    6607           31806 :   return resultobj;
    6608                 : fail:
    6609               0 :   return NULL;
    6610                 : }
    6611                 : 
    6612                 : 
    6613             670 : SWIGINTERN PyObject *_wrap_Layer_GetFeatureCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    6614             670 :   PyObject *resultobj = 0;
    6615             670 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6616             670 :   int arg2 = (int) 1 ;
    6617             670 :   void *argp1 = 0 ;
    6618             670 :   int res1 = 0 ;
    6619                 :   int val2 ;
    6620             670 :   int ecode2 = 0 ;
    6621             670 :   PyObject * obj0 = 0 ;
    6622             670 :   PyObject * obj1 = 0 ;
    6623                 :   char *  kwnames[] = {
    6624                 :     (char *) "self",(char *) "force", NULL 
    6625             670 :   };
    6626                 :   int result;
    6627                 :   
    6628             670 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Layer_GetFeatureCount",kwnames,&obj0,&obj1)) SWIG_fail;
    6629             670 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6630             670 :   if (!SWIG_IsOK(res1)) {
    6631               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeatureCount" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6632                 :   }
    6633             670 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6634             670 :   if (obj1) {
    6635              13 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
    6636              13 :     if (!SWIG_IsOK(ecode2)) {
    6637               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_GetFeatureCount" "', argument " "2"" of type '" "int""'");
    6638                 :     } 
    6639              13 :     arg2 = static_cast< int >(val2);
    6640                 :   }
    6641                 :   {
    6642             670 :     if ( bUseExceptions ) {
    6643               0 :       CPLErrorReset();
    6644                 :     }
    6645             670 :     result = (int)OGRLayerShadow_GetFeatureCount(arg1,arg2);
    6646             670 :     if ( bUseExceptions ) {
    6647               0 :       CPLErr eclass = CPLGetLastErrorType();
    6648               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6649               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6650                 :       }
    6651                 :     }
    6652                 :   }
    6653             670 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6654             670 :   return resultobj;
    6655                 : fail:
    6656               0 :   return NULL;
    6657                 : }
    6658                 : 
    6659                 : 
    6660              90 : SWIGINTERN PyObject *_wrap_Layer_GetExtent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    6661              90 :   PyObject *resultobj = 0;
    6662              90 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6663                 :   double *arg2 ;
    6664              90 :   int *arg3 = (int *) NULL ;
    6665              90 :   int arg4 = (int) 1 ;
    6666              90 :   int arg5 = (int) 0 ;
    6667              90 :   void *argp1 = 0 ;
    6668              90 :   int res1 = 0 ;
    6669                 :   double argout2[6] ;
    6670                 :   int isvalid2 ;
    6671                 :   int val4 ;
    6672              90 :   int ecode4 = 0 ;
    6673                 :   int val5 ;
    6674              90 :   int ecode5 = 0 ;
    6675              90 :   PyObject * obj0 = 0 ;
    6676              90 :   PyObject * obj1 = 0 ;
    6677              90 :   PyObject * obj2 = 0 ;
    6678                 :   char *  kwnames[] = {
    6679                 :     (char *) "self",(char *) "force",(char *) "can_return_null", NULL 
    6680              90 :   };
    6681                 :   
    6682                 :   {
    6683                 :     /* %typemap(in) (double argout2[4], int* isvalid2) */
    6684              90 :     arg2 = argout2;
    6685              90 :     arg3 = &isvalid2;
    6686                 :   }
    6687              90 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Layer_GetExtent",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
    6688              90 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6689              90 :   if (!SWIG_IsOK(res1)) {
    6690               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetExtent" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6691                 :   }
    6692              90 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6693              90 :   if (obj1) {
    6694               9 :     ecode4 = SWIG_AsVal_int(obj1, &val4);
    6695               9 :     if (!SWIG_IsOK(ecode4)) {
    6696               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetExtent" "', argument " "4"" of type '" "int""'");
    6697                 :     } 
    6698               9 :     arg4 = static_cast< int >(val4);
    6699                 :   }
    6700              90 :   if (obj2) {
    6701               9 :     ecode5 = SWIG_AsVal_int(obj2, &val5);
    6702               9 :     if (!SWIG_IsOK(ecode5)) {
    6703               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_GetExtent" "', argument " "5"" of type '" "int""'");
    6704                 :     } 
    6705               9 :     arg5 = static_cast< int >(val5);
    6706                 :   }
    6707                 :   {
    6708              90 :     if ( bUseExceptions ) {
    6709               0 :       CPLErrorReset();
    6710                 :     }
    6711                 :     OGRLayerShadow_GetExtent(arg1,arg2,arg3,arg4,arg5);
    6712              90 :     if ( bUseExceptions ) {
    6713               0 :       CPLErr eclass = CPLGetLastErrorType();
    6714               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6715               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6716                 :       }
    6717                 :     }
    6718                 :   }
    6719              90 :   resultobj = SWIG_Py_Void();
    6720                 :   {
    6721                 :     /* %typemap(argout) (double argout[4], int* isvalid)  */
    6722                 :     PyObject *r;
    6723              90 :     if ( !*arg3 ) {
    6724               0 :       Py_INCREF(Py_None);
    6725               0 :       r = Py_None;
    6726                 :     }
    6727                 :     else {
    6728              90 :       r = CreateTupleFromDoubleArray(arg2, 4);
    6729                 :     }
    6730              90 :     resultobj = t_output_helper(resultobj,r);
    6731                 :   }
    6732              90 :   return resultobj;
    6733                 : fail:
    6734               0 :   return NULL;
    6735                 : }
    6736                 : 
    6737                 : 
    6738             123 : SWIGINTERN PyObject *_wrap_Layer_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6739             123 :   PyObject *resultobj = 0;
    6740             123 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6741             123 :   char *arg2 = (char *) 0 ;
    6742             123 :   void *argp1 = 0 ;
    6743             123 :   int res1 = 0 ;
    6744                 :   int res2 ;
    6745             123 :   char *buf2 = 0 ;
    6746             123 :   int alloc2 = 0 ;
    6747             123 :   PyObject * obj0 = 0 ;
    6748             123 :   PyObject * obj1 = 0 ;
    6749                 :   bool result;
    6750                 :   
    6751             123 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_TestCapability",&obj0,&obj1)) SWIG_fail;
    6752             123 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6753             123 :   if (!SWIG_IsOK(res1)) {
    6754               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_TestCapability" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6755                 :   }
    6756             123 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6757             123 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6758             123 :   if (!SWIG_IsOK(res2)) {
    6759               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_TestCapability" "', argument " "2"" of type '" "char const *""'");
    6760                 :   }
    6761             123 :   arg2 = reinterpret_cast< char * >(buf2);
    6762                 :   {
    6763             123 :     if (!arg2) {
    6764               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    6765                 :     }
    6766                 :   }
    6767                 :   {
    6768             123 :     if ( bUseExceptions ) {
    6769               0 :       CPLErrorReset();
    6770                 :     }
    6771             123 :     result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
    6772             123 :     if ( bUseExceptions ) {
    6773               0 :       CPLErr eclass = CPLGetLastErrorType();
    6774               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6775               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6776                 :       }
    6777                 :     }
    6778                 :   }
    6779             123 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
    6780             123 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6781             123 :   return resultobj;
    6782                 : fail:
    6783               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6784               0 :   return NULL;
    6785                 : }
    6786                 : 
    6787                 : 
    6788            4741 : SWIGINTERN PyObject *_wrap_Layer_CreateField(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    6789            4741 :   PyObject *resultobj = 0;
    6790            4741 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6791            4741 :   OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
    6792            4741 :   int arg3 = (int) 1 ;
    6793            4741 :   void *argp1 = 0 ;
    6794            4741 :   int res1 = 0 ;
    6795            4741 :   void *argp2 = 0 ;
    6796            4741 :   int res2 = 0 ;
    6797                 :   int val3 ;
    6798            4741 :   int ecode3 = 0 ;
    6799            4741 :   PyObject * obj0 = 0 ;
    6800            4741 :   PyObject * obj1 = 0 ;
    6801            4741 :   PyObject * obj2 = 0 ;
    6802                 :   char *  kwnames[] = {
    6803                 :     (char *) "self",(char *) "field_def",(char *) "approx_ok", NULL 
    6804            4741 :   };
    6805                 :   OGRErr result;
    6806                 :   
    6807            4741 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Layer_CreateField",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
    6808            4741 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6809            4741 :   if (!SWIG_IsOK(res1)) {
    6810               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateField" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6811                 :   }
    6812            4741 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6813            4741 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
    6814            4741 :   if (!SWIG_IsOK(res2)) {
    6815               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateField" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'"); 
    6816                 :   }
    6817            4741 :   arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
    6818            4741 :   if (obj2) {
    6819               0 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
    6820               0 :     if (!SWIG_IsOK(ecode3)) {
    6821               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_CreateField" "', argument " "3"" of type '" "int""'");
    6822                 :     } 
    6823               0 :     arg3 = static_cast< int >(val3);
    6824                 :   }
    6825                 :   {
    6826            4741 :     if (!arg2) {
    6827               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    6828                 :     }
    6829                 :   }
    6830                 :   {
    6831            4741 :     if ( bUseExceptions ) {
    6832               0 :       CPLErrorReset();
    6833                 :     }
    6834            4741 :     result = (OGRErr)OGRLayerShadow_CreateField(arg1,arg2,arg3);
    6835            4741 :     if ( bUseExceptions ) {
    6836               0 :       CPLErr eclass = CPLGetLastErrorType();
    6837               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6838               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6839                 :       }
    6840                 :     }
    6841                 :   }
    6842                 :   {
    6843                 :     /* %typemap(out) OGRErr */
    6844            4741 :     if ( result != 0 && bUseExceptions) {
    6845               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6846               0 :       SWIG_fail;
    6847                 :     }
    6848                 :   }
    6849                 :   {
    6850                 :     /* %typemap(ret) OGRErr */
    6851            4741 :     if (resultobj == Py_None ) {
    6852               0 :       Py_DECREF(resultobj);
    6853               0 :       resultobj = 0;
    6854                 :     }
    6855            4741 :     if (resultobj == 0) {
    6856            4741 :       resultobj = PyInt_FromLong( result );
    6857                 :     }
    6858                 :   }
    6859            4741 :   return resultobj;
    6860                 : fail:
    6861               0 :   return NULL;
    6862                 : }
    6863                 : 
    6864                 : 
    6865              29 : SWIGINTERN PyObject *_wrap_Layer_DeleteField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6866              29 :   PyObject *resultobj = 0;
    6867              29 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6868                 :   int arg2 ;
    6869              29 :   void *argp1 = 0 ;
    6870              29 :   int res1 = 0 ;
    6871                 :   int val2 ;
    6872              29 :   int ecode2 = 0 ;
    6873              29 :   PyObject * obj0 = 0 ;
    6874              29 :   PyObject * obj1 = 0 ;
    6875                 :   OGRErr result;
    6876                 :   
    6877              29 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_DeleteField",&obj0,&obj1)) SWIG_fail;
    6878              29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6879              29 :   if (!SWIG_IsOK(res1)) {
    6880               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteField" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6881                 :   }
    6882              29 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6883              29 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    6884              29 :   if (!SWIG_IsOK(ecode2)) {
    6885               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_DeleteField" "', argument " "2"" of type '" "int""'");
    6886                 :   } 
    6887              29 :   arg2 = static_cast< int >(val2);
    6888                 :   {
    6889              29 :     if ( bUseExceptions ) {
    6890               0 :       CPLErrorReset();
    6891                 :     }
    6892              29 :     result = (OGRErr)OGRLayerShadow_DeleteField(arg1,arg2);
    6893              29 :     if ( bUseExceptions ) {
    6894               0 :       CPLErr eclass = CPLGetLastErrorType();
    6895               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6896               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6897                 :       }
    6898                 :     }
    6899                 :   }
    6900                 :   {
    6901                 :     /* %typemap(out) OGRErr */
    6902              29 :     if ( result != 0 && bUseExceptions) {
    6903               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6904               0 :       SWIG_fail;
    6905                 :     }
    6906                 :   }
    6907                 :   {
    6908                 :     /* %typemap(ret) OGRErr */
    6909              29 :     if (resultobj == Py_None ) {
    6910               0 :       Py_DECREF(resultobj);
    6911               0 :       resultobj = 0;
    6912                 :     }
    6913              29 :     if (resultobj == 0) {
    6914              29 :       resultobj = PyInt_FromLong( result );
    6915                 :     }
    6916                 :   }
    6917              29 :   return resultobj;
    6918                 : fail:
    6919               0 :   return NULL;
    6920                 : }
    6921                 : 
    6922                 : 
    6923              24 : SWIGINTERN PyObject *_wrap_Layer_ReorderField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6924              24 :   PyObject *resultobj = 0;
    6925              24 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6926                 :   int arg2 ;
    6927                 :   int arg3 ;
    6928              24 :   void *argp1 = 0 ;
    6929              24 :   int res1 = 0 ;
    6930                 :   int val2 ;
    6931              24 :   int ecode2 = 0 ;
    6932                 :   int val3 ;
    6933              24 :   int ecode3 = 0 ;
    6934              24 :   PyObject * obj0 = 0 ;
    6935              24 :   PyObject * obj1 = 0 ;
    6936              24 :   PyObject * obj2 = 0 ;
    6937                 :   OGRErr result;
    6938                 :   
    6939              24 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Layer_ReorderField",&obj0,&obj1,&obj2)) SWIG_fail;
    6940              24 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6941              24 :   if (!SWIG_IsOK(res1)) {
    6942               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderField" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6943                 :   }
    6944              24 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6945              24 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    6946              24 :   if (!SWIG_IsOK(ecode2)) {
    6947               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_ReorderField" "', argument " "2"" of type '" "int""'");
    6948                 :   } 
    6949              24 :   arg2 = static_cast< int >(val2);
    6950              24 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    6951              24 :   if (!SWIG_IsOK(ecode3)) {
    6952               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_ReorderField" "', argument " "3"" of type '" "int""'");
    6953                 :   } 
    6954              24 :   arg3 = static_cast< int >(val3);
    6955                 :   {
    6956              24 :     if ( bUseExceptions ) {
    6957               0 :       CPLErrorReset();
    6958                 :     }
    6959              24 :     result = (OGRErr)OGRLayerShadow_ReorderField(arg1,arg2,arg3);
    6960              24 :     if ( bUseExceptions ) {
    6961               0 :       CPLErr eclass = CPLGetLastErrorType();
    6962               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6963               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6964                 :       }
    6965                 :     }
    6966                 :   }
    6967                 :   {
    6968                 :     /* %typemap(out) OGRErr */
    6969              24 :     if ( result != 0 && bUseExceptions) {
    6970               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6971               0 :       SWIG_fail;
    6972                 :     }
    6973                 :   }
    6974                 :   {
    6975                 :     /* %typemap(ret) OGRErr */
    6976              24 :     if (resultobj == Py_None ) {
    6977               0 :       Py_DECREF(resultobj);
    6978               0 :       resultobj = 0;
    6979                 :     }
    6980              24 :     if (resultobj == 0) {
    6981              24 :       resultobj = PyInt_FromLong( result );
    6982                 :     }
    6983                 :   }
    6984              24 :   return resultobj;
    6985                 : fail:
    6986               0 :   return NULL;
    6987                 : }
    6988                 : 
    6989                 : 
    6990              15 : SWIGINTERN PyObject *_wrap_Layer_ReorderFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6991              15 :   PyObject *resultobj = 0;
    6992              15 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6993                 :   int arg2 ;
    6994              15 :   int *arg3 = (int *) 0 ;
    6995              15 :   void *argp1 = 0 ;
    6996              15 :   int res1 = 0 ;
    6997              15 :   PyObject * obj0 = 0 ;
    6998              15 :   PyObject * obj1 = 0 ;
    6999                 :   OGRErr result;
    7000                 :   
    7001              15 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_ReorderFields",&obj0,&obj1)) SWIG_fail;
    7002              15 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7003              15 :   if (!SWIG_IsOK(res1)) {
    7004               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderFields" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7005                 :   }
    7006              15 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7007                 :   {
    7008                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    7009                 :     /* check if is List */
    7010              15 :     if ( !PySequence_Check(obj1) ) {
    7011               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    7012               0 :       SWIG_fail;
    7013                 :     }
    7014              15 :     arg2 = PySequence_Size(obj1);
    7015              15 :     arg3 = (int*) malloc(arg2*sizeof(int));
    7016              53 :     for( int i = 0; i<arg2; i++ ) {
    7017              38 :       PyObject *o = PySequence_GetItem(obj1,i);
    7018              38 :       if ( !PyArg_Parse(o,"i",&arg3[i]) ) {
    7019               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    7020               0 :         Py_DECREF(o);
    7021                 :         SWIG_fail;
    7022                 :       }
    7023              38 :       Py_DECREF(o);
    7024                 :     }
    7025                 :   }
    7026                 :   {
    7027              15 :     if ( bUseExceptions ) {
    7028               0 :       CPLErrorReset();
    7029                 :     }
    7030              15 :     result = (OGRErr)OGRLayerShadow_ReorderFields(arg1,arg2,arg3);
    7031              15 :     if ( bUseExceptions ) {
    7032               0 :       CPLErr eclass = CPLGetLastErrorType();
    7033               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7034               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7035                 :       }
    7036                 :     }
    7037                 :   }
    7038                 :   {
    7039                 :     /* %typemap(out) OGRErr */
    7040              15 :     if ( result != 0 && bUseExceptions) {
    7041               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7042               0 :       SWIG_fail;
    7043                 :     }
    7044                 :   }
    7045                 :   {
    7046                 :     /* %typemap(freearg) (int nList, int* pList) */
    7047              15 :     if (arg3) {
    7048              15 :       free((void*) arg3);
    7049                 :     }
    7050                 :   }
    7051                 :   {
    7052                 :     /* %typemap(ret) OGRErr */
    7053              15 :     if (resultobj == Py_None ) {
    7054               0 :       Py_DECREF(resultobj);
    7055               0 :       resultobj = 0;
    7056                 :     }
    7057              15 :     if (resultobj == 0) {
    7058              15 :       resultobj = PyInt_FromLong( result );
    7059                 :     }
    7060                 :   }
    7061              15 :   return resultobj;
    7062                 : fail:
    7063                 :   {
    7064                 :     /* %typemap(freearg) (int nList, int* pList) */
    7065               0 :     if (arg3) {
    7066               0 :       free((void*) arg3);
    7067                 :     }
    7068                 :   }
    7069               0 :   return NULL;
    7070                 : }
    7071                 : 
    7072                 : 
    7073              34 : SWIGINTERN PyObject *_wrap_Layer_AlterFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7074              34 :   PyObject *resultobj = 0;
    7075              34 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7076                 :   int arg2 ;
    7077              34 :   OGRFieldDefnShadow *arg3 = (OGRFieldDefnShadow *) 0 ;
    7078                 :   int arg4 ;
    7079              34 :   void *argp1 = 0 ;
    7080              34 :   int res1 = 0 ;
    7081                 :   int val2 ;
    7082              34 :   int ecode2 = 0 ;
    7083              34 :   void *argp3 = 0 ;
    7084              34 :   int res3 = 0 ;
    7085                 :   int val4 ;
    7086              34 :   int ecode4 = 0 ;
    7087              34 :   PyObject * obj0 = 0 ;
    7088              34 :   PyObject * obj1 = 0 ;
    7089              34 :   PyObject * obj2 = 0 ;
    7090              34 :   PyObject * obj3 = 0 ;
    7091                 :   OGRErr result;
    7092                 :   
    7093              34 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:Layer_AlterFieldDefn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    7094              34 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7095              34 :   if (!SWIG_IsOK(res1)) {
    7096               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_AlterFieldDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7097                 :   }
    7098              34 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7099              34 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    7100              34 :   if (!SWIG_IsOK(ecode2)) {
    7101               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_AlterFieldDefn" "', argument " "2"" of type '" "int""'");
    7102                 :   } 
    7103              34 :   arg2 = static_cast< int >(val2);
    7104              34 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
    7105              34 :   if (!SWIG_IsOK(res3)) {
    7106               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_AlterFieldDefn" "', argument " "3"" of type '" "OGRFieldDefnShadow *""'"); 
    7107                 :   }
    7108              34 :   arg3 = reinterpret_cast< OGRFieldDefnShadow * >(argp3);
    7109              34 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
    7110              34 :   if (!SWIG_IsOK(ecode4)) {
    7111               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_AlterFieldDefn" "', argument " "4"" of type '" "int""'");
    7112                 :   } 
    7113              34 :   arg4 = static_cast< int >(val4);
    7114                 :   {
    7115              34 :     if (!arg3) {
    7116               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7117                 :     }
    7118                 :   }
    7119                 :   {
    7120              34 :     if ( bUseExceptions ) {
    7121               0 :       CPLErrorReset();
    7122                 :     }
    7123              34 :     result = (OGRErr)OGRLayerShadow_AlterFieldDefn(arg1,arg2,arg3,arg4);
    7124              34 :     if ( bUseExceptions ) {
    7125               0 :       CPLErr eclass = CPLGetLastErrorType();
    7126               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7127               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7128                 :       }
    7129                 :     }
    7130                 :   }
    7131                 :   {
    7132                 :     /* %typemap(out) OGRErr */
    7133              34 :     if ( result != 0 && bUseExceptions) {
    7134               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7135               0 :       SWIG_fail;
    7136                 :     }
    7137                 :   }
    7138                 :   {
    7139                 :     /* %typemap(ret) OGRErr */
    7140              34 :     if (resultobj == Py_None ) {
    7141               0 :       Py_DECREF(resultobj);
    7142               0 :       resultobj = 0;
    7143                 :     }
    7144              34 :     if (resultobj == 0) {
    7145              34 :       resultobj = PyInt_FromLong( result );
    7146                 :     }
    7147                 :   }
    7148              34 :   return resultobj;
    7149                 : fail:
    7150               0 :   return NULL;
    7151                 : }
    7152                 : 
    7153                 : 
    7154              71 : SWIGINTERN PyObject *_wrap_Layer_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7155              71 :   PyObject *resultobj = 0;
    7156              71 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7157              71 :   void *argp1 = 0 ;
    7158              71 :   int res1 = 0 ;
    7159              71 :   PyObject * obj0 = 0 ;
    7160                 :   OGRErr result;
    7161                 :   
    7162              71 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_StartTransaction",&obj0)) SWIG_fail;
    7163              71 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7164              71 :   if (!SWIG_IsOK(res1)) {
    7165               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_StartTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7166                 :   }
    7167              71 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7168                 :   {
    7169              71 :     if ( bUseExceptions ) {
    7170               0 :       CPLErrorReset();
    7171                 :     }
    7172              71 :     result = (OGRErr)OGRLayerShadow_StartTransaction(arg1);
    7173              71 :     if ( bUseExceptions ) {
    7174               0 :       CPLErr eclass = CPLGetLastErrorType();
    7175               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7176               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7177                 :       }
    7178                 :     }
    7179                 :   }
    7180                 :   {
    7181                 :     /* %typemap(out) OGRErr */
    7182              71 :     if ( result != 0 && bUseExceptions) {
    7183               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7184               0 :       SWIG_fail;
    7185                 :     }
    7186                 :   }
    7187                 :   {
    7188                 :     /* %typemap(ret) OGRErr */
    7189              71 :     if (resultobj == Py_None ) {
    7190               0 :       Py_DECREF(resultobj);
    7191               0 :       resultobj = 0;
    7192                 :     }
    7193              71 :     if (resultobj == 0) {
    7194              71 :       resultobj = PyInt_FromLong( result );
    7195                 :     }
    7196                 :   }
    7197              71 :   return resultobj;
    7198                 : fail:
    7199               0 :   return NULL;
    7200                 : }
    7201                 : 
    7202                 : 
    7203              68 : SWIGINTERN PyObject *_wrap_Layer_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7204              68 :   PyObject *resultobj = 0;
    7205              68 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7206              68 :   void *argp1 = 0 ;
    7207              68 :   int res1 = 0 ;
    7208              68 :   PyObject * obj0 = 0 ;
    7209                 :   OGRErr result;
    7210                 :   
    7211              68 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_CommitTransaction",&obj0)) SWIG_fail;
    7212              68 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7213              68 :   if (!SWIG_IsOK(res1)) {
    7214               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CommitTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7215                 :   }
    7216              68 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7217                 :   {
    7218              68 :     if ( bUseExceptions ) {
    7219               0 :       CPLErrorReset();
    7220                 :     }
    7221              68 :     result = (OGRErr)OGRLayerShadow_CommitTransaction(arg1);
    7222              68 :     if ( bUseExceptions ) {
    7223               0 :       CPLErr eclass = CPLGetLastErrorType();
    7224               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7225               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7226                 :       }
    7227                 :     }
    7228                 :   }
    7229                 :   {
    7230                 :     /* %typemap(out) OGRErr */
    7231              68 :     if ( result != 0 && bUseExceptions) {
    7232               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7233               0 :       SWIG_fail;
    7234                 :     }
    7235                 :   }
    7236                 :   {
    7237                 :     /* %typemap(ret) OGRErr */
    7238              68 :     if (resultobj == Py_None ) {
    7239               0 :       Py_DECREF(resultobj);
    7240               0 :       resultobj = 0;
    7241                 :     }
    7242              68 :     if (resultobj == 0) {
    7243              68 :       resultobj = PyInt_FromLong( result );
    7244                 :     }
    7245                 :   }
    7246              68 :   return resultobj;
    7247                 : fail:
    7248               0 :   return NULL;
    7249                 : }
    7250                 : 
    7251                 : 
    7252               4 : SWIGINTERN PyObject *_wrap_Layer_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7253               4 :   PyObject *resultobj = 0;
    7254               4 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7255               4 :   void *argp1 = 0 ;
    7256               4 :   int res1 = 0 ;
    7257               4 :   PyObject * obj0 = 0 ;
    7258                 :   OGRErr result;
    7259                 :   
    7260               4 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_RollbackTransaction",&obj0)) SWIG_fail;
    7261               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7262               4 :   if (!SWIG_IsOK(res1)) {
    7263               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_RollbackTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7264                 :   }
    7265               4 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7266                 :   {
    7267               4 :     if ( bUseExceptions ) {
    7268               0 :       CPLErrorReset();
    7269                 :     }
    7270               4 :     result = (OGRErr)OGRLayerShadow_RollbackTransaction(arg1);
    7271               4 :     if ( bUseExceptions ) {
    7272               0 :       CPLErr eclass = CPLGetLastErrorType();
    7273               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7274               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7275                 :       }
    7276                 :     }
    7277                 :   }
    7278                 :   {
    7279                 :     /* %typemap(out) OGRErr */
    7280               4 :     if ( result != 0 && bUseExceptions) {
    7281               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7282               0 :       SWIG_fail;
    7283                 :     }
    7284                 :   }
    7285                 :   {
    7286                 :     /* %typemap(ret) OGRErr */
    7287               4 :     if (resultobj == Py_None ) {
    7288               0 :       Py_DECREF(resultobj);
    7289               0 :       resultobj = 0;
    7290                 :     }
    7291               4 :     if (resultobj == 0) {
    7292               4 :       resultobj = PyInt_FromLong( result );
    7293                 :     }
    7294                 :   }
    7295               4 :   return resultobj;
    7296                 : fail:
    7297               0 :   return NULL;
    7298                 : }
    7299                 : 
    7300                 : 
    7301             253 : SWIGINTERN PyObject *_wrap_Layer_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7302             253 :   PyObject *resultobj = 0;
    7303             253 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7304             253 :   void *argp1 = 0 ;
    7305             253 :   int res1 = 0 ;
    7306             253 :   PyObject * obj0 = 0 ;
    7307             253 :   OSRSpatialReferenceShadow *result = 0 ;
    7308                 :   
    7309             253 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetSpatialRef",&obj0)) SWIG_fail;
    7310             253 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7311             253 :   if (!SWIG_IsOK(res1)) {
    7312               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialRef" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7313                 :   }
    7314             253 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7315                 :   {
    7316             253 :     if ( bUseExceptions ) {
    7317               0 :       CPLErrorReset();
    7318                 :     }
    7319             253 :     result = (OSRSpatialReferenceShadow *)OGRLayerShadow_GetSpatialRef(arg1);
    7320             253 :     if ( bUseExceptions ) {
    7321               0 :       CPLErr eclass = CPLGetLastErrorType();
    7322               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7323               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7324                 :       }
    7325                 :     }
    7326                 :   }
    7327             253 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
    7328             253 :   return resultobj;
    7329                 : fail:
    7330               0 :   return NULL;
    7331                 : }
    7332                 : 
    7333                 : 
    7334               0 : SWIGINTERN PyObject *_wrap_Layer_GetFeaturesRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7335               0 :   PyObject *resultobj = 0;
    7336               0 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7337               0 :   void *argp1 = 0 ;
    7338               0 :   int res1 = 0 ;
    7339               0 :   PyObject * obj0 = 0 ;
    7340                 :   GIntBig result;
    7341                 :   
    7342               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetFeaturesRead",&obj0)) SWIG_fail;
    7343               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7344               0 :   if (!SWIG_IsOK(res1)) {
    7345               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeaturesRead" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7346                 :   }
    7347               0 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7348                 :   {
    7349               0 :     if ( bUseExceptions ) {
    7350               0 :       CPLErrorReset();
    7351                 :     }
    7352               0 :     result = OGRLayerShadow_GetFeaturesRead(arg1);
    7353               0 :     if ( bUseExceptions ) {
    7354               0 :       CPLErr eclass = CPLGetLastErrorType();
    7355               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7356               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7357                 :       }
    7358                 :     }
    7359                 :   }
    7360               0 :   resultobj = SWIG_NewPointerObj((new GIntBig(static_cast< const GIntBig& >(result))), SWIGTYPE_p_GIntBig, SWIG_POINTER_OWN |  0 );
    7361               0 :   return resultobj;
    7362                 : fail:
    7363               0 :   return NULL;
    7364                 : }
    7365                 : 
    7366                 : 
    7367               4 : SWIGINTERN PyObject *_wrap_Layer_SetIgnoredFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7368               4 :   PyObject *resultobj = 0;
    7369               4 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7370               4 :   char **arg2 = (char **) 0 ;
    7371               4 :   void *argp1 = 0 ;
    7372               4 :   int res1 = 0 ;
    7373               4 :   PyObject * obj0 = 0 ;
    7374               4 :   PyObject * obj1 = 0 ;
    7375                 :   OGRErr result;
    7376                 :   
    7377               4 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetIgnoredFields",&obj0,&obj1)) SWIG_fail;
    7378               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7379               4 :   if (!SWIG_IsOK(res1)) {
    7380               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetIgnoredFields" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7381                 :   }
    7382               4 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7383                 :   {
    7384                 :     /* %typemap(in) char **options */
    7385                 :     /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    7386               4 :     if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
    7387                 :   #if PY_VERSION_HEX < 0x03000000
    7388                 :       || PyString_Check(obj1)
    7389                 :   #endif
    7390                 :       ) {
    7391               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
    7392               0 :       SWIG_fail;
    7393                 :     }
    7394                 :     
    7395               4 :     int size = PySequence_Size(obj1);
    7396               8 :     for (int i = 0; i < size; i++) {
    7397               4 :       PyObject* pyObj = PySequence_GetItem(obj1,i);
    7398               4 :       if (PyUnicode_Check(pyObj))
    7399                 :       {
    7400                 :         char *pszStr;
    7401                 :         Py_ssize_t nLen;
    7402               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    7403                 : #if PY_VERSION_HEX >= 0x03000000
    7404                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7405                 : #else
    7406               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7407                 : #endif
    7408               0 :         arg2 = CSLAddString( arg2, pszStr );
    7409               0 :         Py_XDECREF(pyUTF8Str);
    7410                 :       }
    7411                 : #if PY_VERSION_HEX >= 0x03000000
    7412                 :       else if (PyBytes_Check(pyObj))
    7413                 :       arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
    7414                 : #else
    7415               4 :       else if (PyString_Check(pyObj))
    7416               4 :       arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
    7417                 : #endif
    7418                 :       else
    7419                 :       {
    7420               0 :         Py_DECREF(pyObj);
    7421               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    7422               0 :         SWIG_fail;
    7423                 :       }
    7424               4 :       Py_DECREF(pyObj);
    7425                 :     }
    7426                 :   }
    7427                 :   {
    7428               4 :     if ( bUseExceptions ) {
    7429               0 :       CPLErrorReset();
    7430                 :     }
    7431               4 :     result = (OGRErr)OGRLayerShadow_SetIgnoredFields(arg1,(char const **)arg2);
    7432               4 :     if ( bUseExceptions ) {
    7433               0 :       CPLErr eclass = CPLGetLastErrorType();
    7434               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7435               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7436                 :       }
    7437                 :     }
    7438                 :   }
    7439                 :   {
    7440                 :     /* %typemap(out) OGRErr */
    7441               4 :     if ( result != 0 && bUseExceptions) {
    7442               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7443               0 :       SWIG_fail;
    7444                 :     }
    7445                 :   }
    7446                 :   {
    7447                 :     /* %typemap(freearg) char **options */
    7448               4 :     CSLDestroy( arg2 );
    7449                 :   }
    7450                 :   {
    7451                 :     /* %typemap(ret) OGRErr */
    7452               4 :     if (resultobj == Py_None ) {
    7453               0 :       Py_DECREF(resultobj);
    7454               0 :       resultobj = 0;
    7455                 :     }
    7456               4 :     if (resultobj == 0) {
    7457               4 :       resultobj = PyInt_FromLong( result );
    7458                 :     }
    7459                 :   }
    7460               4 :   return resultobj;
    7461                 : fail:
    7462                 :   {
    7463                 :     /* %typemap(freearg) char **options */
    7464               0 :     CSLDestroy( arg2 );
    7465                 :   }
    7466               0 :   return NULL;
    7467                 : }
    7468                 : 
    7469                 : 
    7470               1 : SWIGINTERN PyObject *_wrap_Layer_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    7471               1 :   PyObject *resultobj = 0;
    7472               1 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7473               1 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    7474               1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    7475               1 :   char **arg4 = (char **) NULL ;
    7476               1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
    7477               1 :   void *arg6 = (void *) NULL ;
    7478               1 :   void *argp1 = 0 ;
    7479               1 :   int res1 = 0 ;
    7480               1 :   void *argp2 = 0 ;
    7481               1 :   int res2 = 0 ;
    7482               1 :   void *argp3 = 0 ;
    7483               1 :   int res3 = 0 ;
    7484               1 :   PyObject * obj0 = 0 ;
    7485               1 :   PyObject * obj1 = 0 ;
    7486               1 :   PyObject * obj2 = 0 ;
    7487               1 :   PyObject * obj3 = 0 ;
    7488               1 :   PyObject * obj4 = 0 ;
    7489               1 :   PyObject * obj5 = 0 ;
    7490                 :   char *  kwnames[] = {
    7491                 :     (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
    7492               1 :   };
    7493                 :   OGRErr result;
    7494                 :   
    7495                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
    7496                 :   PyProgressData *psProgressInfo;
    7497               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
    7498               1 :   psProgressInfo->nLastReported = -1;
    7499               1 :   psProgressInfo->psPyCallback = NULL;
    7500               1 :   psProgressInfo->psPyCallbackData = NULL;
    7501               1 :   arg6 = psProgressInfo;
    7502               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Intersection",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
    7503               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7504               1 :   if (!SWIG_IsOK(res1)) {
    7505               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Intersection" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7506                 :   }
    7507               1 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7508               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7509               1 :   if (!SWIG_IsOK(res2)) {
    7510               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Intersection" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
    7511                 :   }
    7512               1 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
    7513               1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7514               1 :   if (!SWIG_IsOK(res3)) {
    7515               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Intersection" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
    7516                 :   }
    7517               1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
    7518               1 :   if (obj3) {
    7519                 :     {
    7520                 :       /* %typemap(in) char **options */
    7521                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    7522               0 :       if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
    7523                 :   #if PY_VERSION_HEX < 0x03000000
    7524                 :         || PyString_Check(obj3)
    7525                 :   #endif
    7526                 :         ) {
    7527               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    7528               0 :         SWIG_fail;
    7529                 :       }
    7530                 :       
    7531               0 :       int size = PySequence_Size(obj3);
    7532               0 :       for (int i = 0; i < size; i++) {
    7533               0 :         PyObject* pyObj = PySequence_GetItem(obj3,i);
    7534               0 :         if (PyUnicode_Check(pyObj))
    7535                 :         {
    7536                 :           char *pszStr;
    7537                 :           Py_ssize_t nLen;
    7538               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    7539                 : #if PY_VERSION_HEX >= 0x03000000
    7540                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7541                 : #else
    7542               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7543                 : #endif
    7544               0 :           arg4 = CSLAddString( arg4, pszStr );
    7545               0 :           Py_XDECREF(pyUTF8Str);
    7546                 :         }
    7547                 : #if PY_VERSION_HEX >= 0x03000000
    7548                 :         else if (PyBytes_Check(pyObj))
    7549                 :         arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
    7550                 : #else
    7551               0 :         else if (PyString_Check(pyObj))
    7552               0 :         arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
    7553                 : #endif
    7554                 :         else
    7555                 :         {
    7556               0 :           Py_DECREF(pyObj);
    7557               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    7558               0 :           SWIG_fail;
    7559                 :         }
    7560               0 :         Py_DECREF(pyObj);
    7561                 :       }
    7562                 :     }
    7563                 :   }
    7564               1 :   if (obj4) {
    7565                 :     {
    7566                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
    7567                 :       /* callback_func typemap */
    7568               0 :       if (obj4 && obj4 != Py_None ) {
    7569               0 :         void* cbfunction = NULL;
    7570                 :         SWIG_ConvertPtr( obj4, 
    7571                 :           (void**)&cbfunction,
    7572                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
    7573               0 :           SWIG_POINTER_EXCEPTION | 0 );
    7574                 :         
    7575               0 :         if ( cbfunction == GDALTermProgress ) {
    7576               0 :           arg5 = GDALTermProgress;
    7577                 :         } else {
    7578               0 :           if (!PyCallable_Check(obj4)) {
    7579                 :             PyErr_SetString( PyExc_RuntimeError, 
    7580               0 :               "Object given is not a Python function" );
    7581               0 :             SWIG_fail;
    7582                 :           }
    7583               0 :           psProgressInfo->psPyCallback = obj4;
    7584               0 :           arg5 = PyProgressProxy;
    7585                 :         }
    7586                 :         
    7587                 :       }
    7588                 :       
    7589                 :     }
    7590                 :   }
    7591               1 :   if (obj5) {
    7592                 :     {
    7593                 :       /* %typemap(in) ( void* callback_data=NULL)  */
    7594               0 :       psProgressInfo->psPyCallbackData = obj5 ;
    7595                 :     }
    7596                 :   }
    7597                 :   {
    7598               1 :     if ( bUseExceptions ) {
    7599               0 :       CPLErrorReset();
    7600                 :     }
    7601               1 :     result = (OGRErr)OGRLayerShadow_Intersection(arg1,arg2,arg3,arg4,arg5,arg6);
    7602               1 :     if ( bUseExceptions ) {
    7603               0 :       CPLErr eclass = CPLGetLastErrorType();
    7604               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7605               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7606                 :       }
    7607                 :     }
    7608                 :   }
    7609                 :   {
    7610                 :     /* %typemap(out) OGRErr */
    7611               1 :     if ( result != 0 && bUseExceptions) {
    7612               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7613               0 :       SWIG_fail;
    7614                 :     }
    7615                 :   }
    7616                 :   {
    7617                 :     /* %typemap(freearg) char **options */
    7618               1 :     CSLDestroy( arg4 );
    7619                 :   }
    7620                 :   {
    7621                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    7622                 :     
    7623               1 :     CPLFree(psProgressInfo);
    7624                 :     
    7625                 :   }
    7626                 :   {
    7627                 :     /* %typemap(ret) OGRErr */
    7628               1 :     if (resultobj == Py_None ) {
    7629               0 :       Py_DECREF(resultobj);
    7630               0 :       resultobj = 0;
    7631                 :     }
    7632               1 :     if (resultobj == 0) {
    7633               1 :       resultobj = PyInt_FromLong( result );
    7634                 :     }
    7635                 :   }
    7636               1 :   return resultobj;
    7637                 : fail:
    7638                 :   {
    7639                 :     /* %typemap(freearg) char **options */
    7640               0 :     CSLDestroy( arg4 );
    7641                 :   }
    7642                 :   {
    7643                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    7644                 :     
    7645               0 :     CPLFree(psProgressInfo);
    7646                 :     
    7647                 :   }
    7648               0 :   return NULL;
    7649                 : }
    7650                 : 
    7651                 : 
    7652               1 : SWIGINTERN PyObject *_wrap_Layer_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    7653               1 :   PyObject *resultobj = 0;
    7654               1 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7655               1 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    7656               1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    7657               1 :   char **arg4 = (char **) NULL ;
    7658               1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
    7659               1 :   void *arg6 = (void *) NULL ;
    7660               1 :   void *argp1 = 0 ;
    7661               1 :   int res1 = 0 ;
    7662               1 :   void *argp2 = 0 ;
    7663               1 :   int res2 = 0 ;
    7664               1 :   void *argp3 = 0 ;
    7665               1 :   int res3 = 0 ;
    7666               1 :   PyObject * obj0 = 0 ;
    7667               1 :   PyObject * obj1 = 0 ;
    7668               1 :   PyObject * obj2 = 0 ;
    7669               1 :   PyObject * obj3 = 0 ;
    7670               1 :   PyObject * obj4 = 0 ;
    7671               1 :   PyObject * obj5 = 0 ;
    7672                 :   char *  kwnames[] = {
    7673                 :     (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
    7674               1 :   };
    7675                 :   OGRErr result;
    7676                 :   
    7677                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
    7678                 :   PyProgressData *psProgressInfo;
    7679               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
    7680               1 :   psProgressInfo->nLastReported = -1;
    7681               1 :   psProgressInfo->psPyCallback = NULL;
    7682               1 :   psProgressInfo->psPyCallbackData = NULL;
    7683               1 :   arg6 = psProgressInfo;
    7684               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Union",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
    7685               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7686               1 :   if (!SWIG_IsOK(res1)) {
    7687               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Union" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7688                 :   }
    7689               1 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7690               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7691               1 :   if (!SWIG_IsOK(res2)) {
    7692               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Union" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
    7693                 :   }
    7694               1 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
    7695               1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7696               1 :   if (!SWIG_IsOK(res3)) {
    7697               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Union" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
    7698                 :   }
    7699               1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
    7700               1 :   if (obj3) {
    7701                 :     {
    7702                 :       /* %typemap(in) char **options */
    7703                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    7704               0 :       if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
    7705                 :   #if PY_VERSION_HEX < 0x03000000
    7706                 :         || PyString_Check(obj3)
    7707                 :   #endif
    7708                 :         ) {
    7709               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    7710               0 :         SWIG_fail;
    7711                 :       }
    7712                 :       
    7713               0 :       int size = PySequence_Size(obj3);
    7714               0 :       for (int i = 0; i < size; i++) {
    7715               0 :         PyObject* pyObj = PySequence_GetItem(obj3,i);
    7716               0 :         if (PyUnicode_Check(pyObj))
    7717                 :         {
    7718                 :           char *pszStr;
    7719                 :           Py_ssize_t nLen;
    7720               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    7721                 : #if PY_VERSION_HEX >= 0x03000000
    7722                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7723                 : #else
    7724               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7725                 : #endif
    7726               0 :           arg4 = CSLAddString( arg4, pszStr );
    7727               0 :           Py_XDECREF(pyUTF8Str);
    7728                 :         }
    7729                 : #if PY_VERSION_HEX >= 0x03000000
    7730                 :         else if (PyBytes_Check(pyObj))
    7731                 :         arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
    7732                 : #else
    7733               0 :         else if (PyString_Check(pyObj))
    7734               0 :         arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
    7735                 : #endif
    7736                 :         else
    7737                 :         {
    7738               0 :           Py_DECREF(pyObj);
    7739               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    7740               0 :           SWIG_fail;
    7741                 :         }
    7742               0 :         Py_DECREF(pyObj);
    7743                 :       }
    7744                 :     }
    7745                 :   }
    7746               1 :   if (obj4) {
    7747                 :     {
    7748                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
    7749                 :       /* callback_func typemap */
    7750               0 :       if (obj4 && obj4 != Py_None ) {
    7751               0 :         void* cbfunction = NULL;
    7752                 :         SWIG_ConvertPtr( obj4, 
    7753                 :           (void**)&cbfunction,
    7754                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
    7755               0 :           SWIG_POINTER_EXCEPTION | 0 );
    7756                 :         
    7757               0 :         if ( cbfunction == GDALTermProgress ) {
    7758               0 :           arg5 = GDALTermProgress;
    7759                 :         } else {
    7760               0 :           if (!PyCallable_Check(obj4)) {
    7761                 :             PyErr_SetString( PyExc_RuntimeError, 
    7762               0 :               "Object given is not a Python function" );
    7763               0 :             SWIG_fail;
    7764                 :           }
    7765               0 :           psProgressInfo->psPyCallback = obj4;
    7766               0 :           arg5 = PyProgressProxy;
    7767                 :         }
    7768                 :         
    7769                 :       }
    7770                 :       
    7771                 :     }
    7772                 :   }
    7773               1 :   if (obj5) {
    7774                 :     {
    7775                 :       /* %typemap(in) ( void* callback_data=NULL)  */
    7776               0 :       psProgressInfo->psPyCallbackData = obj5 ;
    7777                 :     }
    7778                 :   }
    7779                 :   {
    7780               1 :     if ( bUseExceptions ) {
    7781               0 :       CPLErrorReset();
    7782                 :     }
    7783               1 :     result = (OGRErr)OGRLayerShadow_Union(arg1,arg2,arg3,arg4,arg5,arg6);
    7784               1 :     if ( bUseExceptions ) {
    7785               0 :       CPLErr eclass = CPLGetLastErrorType();
    7786               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7787               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7788                 :       }
    7789                 :     }
    7790                 :   }
    7791                 :   {
    7792                 :     /* %typemap(out) OGRErr */
    7793               1 :     if ( result != 0 && bUseExceptions) {
    7794               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7795               0 :       SWIG_fail;
    7796                 :     }
    7797                 :   }
    7798                 :   {
    7799                 :     /* %typemap(freearg) char **options */
    7800               1 :     CSLDestroy( arg4 );
    7801                 :   }
    7802                 :   {
    7803                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    7804                 :     
    7805               1 :     CPLFree(psProgressInfo);
    7806                 :     
    7807                 :   }
    7808                 :   {
    7809                 :     /* %typemap(ret) OGRErr */
    7810               1 :     if (resultobj == Py_None ) {
    7811               0 :       Py_DECREF(resultobj);
    7812               0 :       resultobj = 0;
    7813                 :     }
    7814               1 :     if (resultobj == 0) {
    7815               1 :       resultobj = PyInt_FromLong( result );
    7816                 :     }
    7817                 :   }
    7818               1 :   return resultobj;
    7819                 : fail:
    7820                 :   {
    7821                 :     /* %typemap(freearg) char **options */
    7822               0 :     CSLDestroy( arg4 );
    7823                 :   }
    7824                 :   {
    7825                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    7826                 :     
    7827               0 :     CPLFree(psProgressInfo);
    7828                 :     
    7829                 :   }
    7830               0 :   return NULL;
    7831                 : }
    7832                 : 
    7833                 : 
    7834               1 : SWIGINTERN PyObject *_wrap_Layer_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    7835               1 :   PyObject *resultobj = 0;
    7836               1 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7837               1 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    7838               1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    7839               1 :   char **arg4 = (char **) NULL ;
    7840               1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
    7841               1 :   void *arg6 = (void *) NULL ;
    7842               1 :   void *argp1 = 0 ;
    7843               1 :   int res1 = 0 ;
    7844               1 :   void *argp2 = 0 ;
    7845               1 :   int res2 = 0 ;
    7846               1 :   void *argp3 = 0 ;
    7847               1 :   int res3 = 0 ;
    7848               1 :   PyObject * obj0 = 0 ;
    7849               1 :   PyObject * obj1 = 0 ;
    7850               1 :   PyObject * obj2 = 0 ;
    7851               1 :   PyObject * obj3 = 0 ;
    7852               1 :   PyObject * obj4 = 0 ;
    7853               1 :   PyObject * obj5 = 0 ;
    7854                 :   char *  kwnames[] = {
    7855                 :     (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
    7856               1 :   };
    7857                 :   OGRErr result;
    7858                 :   
    7859                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
    7860                 :   PyProgressData *psProgressInfo;
    7861               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
    7862               1 :   psProgressInfo->nLastReported = -1;
    7863               1 :   psProgressInfo->psPyCallback = NULL;
    7864               1 :   psProgressInfo->psPyCallbackData = NULL;
    7865               1 :   arg6 = psProgressInfo;
    7866               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_SymDifference",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
    7867               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7868               1 :   if (!SWIG_IsOK(res1)) {
    7869               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SymDifference" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7870                 :   }
    7871               1 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7872               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7873               1 :   if (!SWIG_IsOK(res2)) {
    7874               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SymDifference" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
    7875                 :   }
    7876               1 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
    7877               1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7878               1 :   if (!SWIG_IsOK(res3)) {
    7879               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SymDifference" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
    7880                 :   }
    7881               1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
    7882               1 :   if (obj3) {
    7883                 :     {
    7884                 :       /* %typemap(in) char **options */
    7885                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    7886               0 :       if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
    7887                 :   #if PY_VERSION_HEX < 0x03000000
    7888                 :         || PyString_Check(obj3)
    7889                 :   #endif
    7890                 :         ) {
    7891               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    7892               0 :         SWIG_fail;
    7893                 :       }
    7894                 :       
    7895               0 :       int size = PySequence_Size(obj3);
    7896               0 :       for (int i = 0; i < size; i++) {
    7897               0 :         PyObject* pyObj = PySequence_GetItem(obj3,i);
    7898               0 :         if (PyUnicode_Check(pyObj))
    7899                 :         {
    7900                 :           char *pszStr;
    7901                 :           Py_ssize_t nLen;
    7902               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    7903                 : #if PY_VERSION_HEX >= 0x03000000
    7904                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7905                 : #else
    7906               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7907                 : #endif
    7908               0 :           arg4 = CSLAddString( arg4, pszStr );
    7909               0 :           Py_XDECREF(pyUTF8Str);
    7910                 :         }
    7911                 : #if PY_VERSION_HEX >= 0x03000000
    7912                 :         else if (PyBytes_Check(pyObj))
    7913                 :         arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
    7914                 : #else
    7915               0 :         else if (PyString_Check(pyObj))
    7916               0 :         arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
    7917                 : #endif
    7918                 :         else
    7919                 :         {
    7920               0 :           Py_DECREF(pyObj);
    7921               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    7922               0 :           SWIG_fail;
    7923                 :         }
    7924               0 :         Py_DECREF(pyObj);
    7925                 :       }
    7926                 :     }
    7927                 :   }
    7928               1 :   if (obj4) {
    7929                 :     {
    7930                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
    7931                 :       /* callback_func typemap */
    7932               0 :       if (obj4 && obj4 != Py_None ) {
    7933               0 :         void* cbfunction = NULL;
    7934                 :         SWIG_ConvertPtr( obj4, 
    7935                 :           (void**)&cbfunction,
    7936                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
    7937               0 :           SWIG_POINTER_EXCEPTION | 0 );
    7938                 :         
    7939               0 :         if ( cbfunction == GDALTermProgress ) {
    7940               0 :           arg5 = GDALTermProgress;
    7941                 :         } else {
    7942               0 :           if (!PyCallable_Check(obj4)) {
    7943                 :             PyErr_SetString( PyExc_RuntimeError, 
    7944               0 :               "Object given is not a Python function" );
    7945               0 :             SWIG_fail;
    7946                 :           }
    7947               0 :           psProgressInfo->psPyCallback = obj4;
    7948               0 :           arg5 = PyProgressProxy;
    7949                 :         }
    7950                 :         
    7951                 :       }
    7952                 :       
    7953                 :     }
    7954                 :   }
    7955               1 :   if (obj5) {
    7956                 :     {
    7957                 :       /* %typemap(in) ( void* callback_data=NULL)  */
    7958               0 :       psProgressInfo->psPyCallbackData = obj5 ;
    7959                 :     }
    7960                 :   }
    7961                 :   {
    7962               1 :     if ( bUseExceptions ) {
    7963               0 :       CPLErrorReset();
    7964                 :     }
    7965               1 :     result = (OGRErr)OGRLayerShadow_SymDifference(arg1,arg2,arg3,arg4,arg5,arg6);
    7966               1 :     if ( bUseExceptions ) {
    7967               0 :       CPLErr eclass = CPLGetLastErrorType();
    7968               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7969               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7970                 :       }
    7971                 :     }
    7972                 :   }
    7973                 :   {
    7974                 :     /* %typemap(out) OGRErr */
    7975               1 :     if ( result != 0 && bUseExceptions) {
    7976               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7977               0 :       SWIG_fail;
    7978                 :     }
    7979                 :   }
    7980                 :   {
    7981                 :     /* %typemap(freearg) char **options */
    7982               1 :     CSLDestroy( arg4 );
    7983                 :   }
    7984                 :   {
    7985                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    7986                 :     
    7987               1 :     CPLFree(psProgressInfo);
    7988                 :     
    7989                 :   }
    7990                 :   {
    7991                 :     /* %typemap(ret) OGRErr */
    7992               1 :     if (resultobj == Py_None ) {
    7993               0 :       Py_DECREF(resultobj);
    7994               0 :       resultobj = 0;
    7995                 :     }
    7996               1 :     if (resultobj == 0) {
    7997               1 :       resultobj = PyInt_FromLong( result );
    7998                 :     }
    7999                 :   }
    8000               1 :   return resultobj;
    8001                 : fail:
    8002                 :   {
    8003                 :     /* %typemap(freearg) char **options */
    8004               0 :     CSLDestroy( arg4 );
    8005                 :   }
    8006                 :   {
    8007                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8008                 :     
    8009               0 :     CPLFree(psProgressInfo);
    8010                 :     
    8011                 :   }
    8012               0 :   return NULL;
    8013                 : }
    8014                 : 
    8015                 : 
    8016               1 : SWIGINTERN PyObject *_wrap_Layer_Identity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    8017               1 :   PyObject *resultobj = 0;
    8018               1 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    8019               1 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    8020               1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    8021               1 :   char **arg4 = (char **) NULL ;
    8022               1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
    8023               1 :   void *arg6 = (void *) NULL ;
    8024               1 :   void *argp1 = 0 ;
    8025               1 :   int res1 = 0 ;
    8026               1 :   void *argp2 = 0 ;
    8027               1 :   int res2 = 0 ;
    8028               1 :   void *argp3 = 0 ;
    8029               1 :   int res3 = 0 ;
    8030               1 :   PyObject * obj0 = 0 ;
    8031               1 :   PyObject * obj1 = 0 ;
    8032               1 :   PyObject * obj2 = 0 ;
    8033               1 :   PyObject * obj3 = 0 ;
    8034               1 :   PyObject * obj4 = 0 ;
    8035               1 :   PyObject * obj5 = 0 ;
    8036                 :   char *  kwnames[] = {
    8037                 :     (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
    8038               1 :   };
    8039                 :   OGRErr result;
    8040                 :   
    8041                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
    8042                 :   PyProgressData *psProgressInfo;
    8043               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
    8044               1 :   psProgressInfo->nLastReported = -1;
    8045               1 :   psProgressInfo->psPyCallback = NULL;
    8046               1 :   psProgressInfo->psPyCallbackData = NULL;
    8047               1 :   arg6 = psProgressInfo;
    8048               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Identity",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
    8049               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8050               1 :   if (!SWIG_IsOK(res1)) {
    8051               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Identity" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    8052                 :   }
    8053               1 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    8054               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8055               1 :   if (!SWIG_IsOK(res2)) {
    8056               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Identity" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
    8057                 :   }
    8058               1 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
    8059               1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8060               1 :   if (!SWIG_IsOK(res3)) {
    8061               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Identity" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
    8062                 :   }
    8063               1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
    8064               1 :   if (obj3) {
    8065                 :     {
    8066                 :       /* %typemap(in) char **options */
    8067                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    8068               0 :       if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
    8069                 :   #if PY_VERSION_HEX < 0x03000000
    8070                 :         || PyString_Check(obj3)
    8071                 :   #endif
    8072                 :         ) {
    8073               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    8074               0 :         SWIG_fail;
    8075                 :       }
    8076                 :       
    8077               0 :       int size = PySequence_Size(obj3);
    8078               0 :       for (int i = 0; i < size; i++) {
    8079               0 :         PyObject* pyObj = PySequence_GetItem(obj3,i);
    8080               0 :         if (PyUnicode_Check(pyObj))
    8081                 :         {
    8082                 :           char *pszStr;
    8083                 :           Py_ssize_t nLen;
    8084               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    8085                 : #if PY_VERSION_HEX >= 0x03000000
    8086                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8087                 : #else
    8088               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8089                 : #endif
    8090               0 :           arg4 = CSLAddString( arg4, pszStr );
    8091               0 :           Py_XDECREF(pyUTF8Str);
    8092                 :         }
    8093                 : #if PY_VERSION_HEX >= 0x03000000
    8094                 :         else if (PyBytes_Check(pyObj))
    8095                 :         arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
    8096                 : #else
    8097               0 :         else if (PyString_Check(pyObj))
    8098               0 :         arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
    8099                 : #endif
    8100                 :         else
    8101                 :         {
    8102               0 :           Py_DECREF(pyObj);
    8103               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    8104               0 :           SWIG_fail;
    8105                 :         }
    8106               0 :         Py_DECREF(pyObj);
    8107                 :       }
    8108                 :     }
    8109                 :   }
    8110               1 :   if (obj4) {
    8111                 :     {
    8112                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
    8113                 :       /* callback_func typemap */
    8114               0 :       if (obj4 && obj4 != Py_None ) {
    8115               0 :         void* cbfunction = NULL;
    8116                 :         SWIG_ConvertPtr( obj4, 
    8117                 :           (void**)&cbfunction,
    8118                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
    8119               0 :           SWIG_POINTER_EXCEPTION | 0 );
    8120                 :         
    8121               0 :         if ( cbfunction == GDALTermProgress ) {
    8122               0 :           arg5 = GDALTermProgress;
    8123                 :         } else {
    8124               0 :           if (!PyCallable_Check(obj4)) {
    8125                 :             PyErr_SetString( PyExc_RuntimeError, 
    8126               0 :               "Object given is not a Python function" );
    8127               0 :             SWIG_fail;
    8128                 :           }
    8129               0 :           psProgressInfo->psPyCallback = obj4;
    8130               0 :           arg5 = PyProgressProxy;
    8131                 :         }
    8132                 :         
    8133                 :       }
    8134                 :       
    8135                 :     }
    8136                 :   }
    8137               1 :   if (obj5) {
    8138                 :     {
    8139                 :       /* %typemap(in) ( void* callback_data=NULL)  */
    8140               0 :       psProgressInfo->psPyCallbackData = obj5 ;
    8141                 :     }
    8142                 :   }
    8143                 :   {
    8144               1 :     if ( bUseExceptions ) {
    8145               0 :       CPLErrorReset();
    8146                 :     }
    8147               1 :     result = (OGRErr)OGRLayerShadow_Identity(arg1,arg2,arg3,arg4,arg5,arg6);
    8148               1 :     if ( bUseExceptions ) {
    8149               0 :       CPLErr eclass = CPLGetLastErrorType();
    8150               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8151               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8152                 :       }
    8153                 :     }
    8154                 :   }
    8155                 :   {
    8156                 :     /* %typemap(out) OGRErr */
    8157               1 :     if ( result != 0 && bUseExceptions) {
    8158               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    8159               0 :       SWIG_fail;
    8160                 :     }
    8161                 :   }
    8162                 :   {
    8163                 :     /* %typemap(freearg) char **options */
    8164               1 :     CSLDestroy( arg4 );
    8165                 :   }
    8166                 :   {
    8167                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8168                 :     
    8169               1 :     CPLFree(psProgressInfo);
    8170                 :     
    8171                 :   }
    8172                 :   {
    8173                 :     /* %typemap(ret) OGRErr */
    8174               1 :     if (resultobj == Py_None ) {
    8175               0 :       Py_DECREF(resultobj);
    8176               0 :       resultobj = 0;
    8177                 :     }
    8178               1 :     if (resultobj == 0) {
    8179               1 :       resultobj = PyInt_FromLong( result );
    8180                 :     }
    8181                 :   }
    8182               1 :   return resultobj;
    8183                 : fail:
    8184                 :   {
    8185                 :     /* %typemap(freearg) char **options */
    8186               0 :     CSLDestroy( arg4 );
    8187                 :   }
    8188                 :   {
    8189                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8190                 :     
    8191               0 :     CPLFree(psProgressInfo);
    8192                 :     
    8193                 :   }
    8194               0 :   return NULL;
    8195                 : }
    8196                 : 
    8197                 : 
    8198               1 : SWIGINTERN PyObject *_wrap_Layer_Update(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    8199               1 :   PyObject *resultobj = 0;
    8200               1 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    8201               1 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    8202               1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    8203               1 :   char **arg4 = (char **) NULL ;
    8204               1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
    8205               1 :   void *arg6 = (void *) NULL ;
    8206               1 :   void *argp1 = 0 ;
    8207               1 :   int res1 = 0 ;
    8208               1 :   void *argp2 = 0 ;
    8209               1 :   int res2 = 0 ;
    8210               1 :   void *argp3 = 0 ;
    8211               1 :   int res3 = 0 ;
    8212               1 :   PyObject * obj0 = 0 ;
    8213               1 :   PyObject * obj1 = 0 ;
    8214               1 :   PyObject * obj2 = 0 ;
    8215               1 :   PyObject * obj3 = 0 ;
    8216               1 :   PyObject * obj4 = 0 ;
    8217               1 :   PyObject * obj5 = 0 ;
    8218                 :   char *  kwnames[] = {
    8219                 :     (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
    8220               1 :   };
    8221                 :   OGRErr result;
    8222                 :   
    8223                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
    8224                 :   PyProgressData *psProgressInfo;
    8225               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
    8226               1 :   psProgressInfo->nLastReported = -1;
    8227               1 :   psProgressInfo->psPyCallback = NULL;
    8228               1 :   psProgressInfo->psPyCallbackData = NULL;
    8229               1 :   arg6 = psProgressInfo;
    8230               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Update",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
    8231               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8232               1 :   if (!SWIG_IsOK(res1)) {
    8233               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Update" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    8234                 :   }
    8235               1 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    8236               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8237               1 :   if (!SWIG_IsOK(res2)) {
    8238               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Update" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
    8239                 :   }
    8240               1 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
    8241               1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8242               1 :   if (!SWIG_IsOK(res3)) {
    8243               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Update" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
    8244                 :   }
    8245               1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
    8246               1 :   if (obj3) {
    8247                 :     {
    8248                 :       /* %typemap(in) char **options */
    8249                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    8250               0 :       if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
    8251                 :   #if PY_VERSION_HEX < 0x03000000
    8252                 :         || PyString_Check(obj3)
    8253                 :   #endif
    8254                 :         ) {
    8255               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    8256               0 :         SWIG_fail;
    8257                 :       }
    8258                 :       
    8259               0 :       int size = PySequence_Size(obj3);
    8260               0 :       for (int i = 0; i < size; i++) {
    8261               0 :         PyObject* pyObj = PySequence_GetItem(obj3,i);
    8262               0 :         if (PyUnicode_Check(pyObj))
    8263                 :         {
    8264                 :           char *pszStr;
    8265                 :           Py_ssize_t nLen;
    8266               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    8267                 : #if PY_VERSION_HEX >= 0x03000000
    8268                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8269                 : #else
    8270               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8271                 : #endif
    8272               0 :           arg4 = CSLAddString( arg4, pszStr );
    8273               0 :           Py_XDECREF(pyUTF8Str);
    8274                 :         }
    8275                 : #if PY_VERSION_HEX >= 0x03000000
    8276                 :         else if (PyBytes_Check(pyObj))
    8277                 :         arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
    8278                 : #else
    8279               0 :         else if (PyString_Check(pyObj))
    8280               0 :         arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
    8281                 : #endif
    8282                 :         else
    8283                 :         {
    8284               0 :           Py_DECREF(pyObj);
    8285               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    8286               0 :           SWIG_fail;
    8287                 :         }
    8288               0 :         Py_DECREF(pyObj);
    8289                 :       }
    8290                 :     }
    8291                 :   }
    8292               1 :   if (obj4) {
    8293                 :     {
    8294                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
    8295                 :       /* callback_func typemap */
    8296               0 :       if (obj4 && obj4 != Py_None ) {
    8297               0 :         void* cbfunction = NULL;
    8298                 :         SWIG_ConvertPtr( obj4, 
    8299                 :           (void**)&cbfunction,
    8300                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
    8301               0 :           SWIG_POINTER_EXCEPTION | 0 );
    8302                 :         
    8303               0 :         if ( cbfunction == GDALTermProgress ) {
    8304               0 :           arg5 = GDALTermProgress;
    8305                 :         } else {
    8306               0 :           if (!PyCallable_Check(obj4)) {
    8307                 :             PyErr_SetString( PyExc_RuntimeError, 
    8308               0 :               "Object given is not a Python function" );
    8309               0 :             SWIG_fail;
    8310                 :           }
    8311               0 :           psProgressInfo->psPyCallback = obj4;
    8312               0 :           arg5 = PyProgressProxy;
    8313                 :         }
    8314                 :         
    8315                 :       }
    8316                 :       
    8317                 :     }
    8318                 :   }
    8319               1 :   if (obj5) {
    8320                 :     {
    8321                 :       /* %typemap(in) ( void* callback_data=NULL)  */
    8322               0 :       psProgressInfo->psPyCallbackData = obj5 ;
    8323                 :     }
    8324                 :   }
    8325                 :   {
    8326               1 :     if ( bUseExceptions ) {
    8327               0 :       CPLErrorReset();
    8328                 :     }
    8329               1 :     result = (OGRErr)OGRLayerShadow_Update(arg1,arg2,arg3,arg4,arg5,arg6);
    8330               1 :     if ( bUseExceptions ) {
    8331               0 :       CPLErr eclass = CPLGetLastErrorType();
    8332               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8333               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8334                 :       }
    8335                 :     }
    8336                 :   }
    8337                 :   {
    8338                 :     /* %typemap(out) OGRErr */
    8339               1 :     if ( result != 0 && bUseExceptions) {
    8340               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    8341               0 :       SWIG_fail;
    8342                 :     }
    8343                 :   }
    8344                 :   {
    8345                 :     /* %typemap(freearg) char **options */
    8346               1 :     CSLDestroy( arg4 );
    8347                 :   }
    8348                 :   {
    8349                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8350                 :     
    8351               1 :     CPLFree(psProgressInfo);
    8352                 :     
    8353                 :   }
    8354                 :   {
    8355                 :     /* %typemap(ret) OGRErr */
    8356               1 :     if (resultobj == Py_None ) {
    8357               0 :       Py_DECREF(resultobj);
    8358               0 :       resultobj = 0;
    8359                 :     }
    8360               1 :     if (resultobj == 0) {
    8361               1 :       resultobj = PyInt_FromLong( result );
    8362                 :     }
    8363                 :   }
    8364               1 :   return resultobj;
    8365                 : fail:
    8366                 :   {
    8367                 :     /* %typemap(freearg) char **options */
    8368               0 :     CSLDestroy( arg4 );
    8369                 :   }
    8370                 :   {
    8371                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8372                 :     
    8373               0 :     CPLFree(psProgressInfo);
    8374                 :     
    8375                 :   }
    8376               0 :   return NULL;
    8377                 : }
    8378                 : 
    8379                 : 
    8380               1 : SWIGINTERN PyObject *_wrap_Layer_Clip(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    8381               1 :   PyObject *resultobj = 0;
    8382               1 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    8383               1 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    8384               1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    8385               1 :   char **arg4 = (char **) NULL ;
    8386               1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
    8387               1 :   void *arg6 = (void *) NULL ;
    8388               1 :   void *argp1 = 0 ;
    8389               1 :   int res1 = 0 ;
    8390               1 :   void *argp2 = 0 ;
    8391               1 :   int res2 = 0 ;
    8392               1 :   void *argp3 = 0 ;
    8393               1 :   int res3 = 0 ;
    8394               1 :   PyObject * obj0 = 0 ;
    8395               1 :   PyObject * obj1 = 0 ;
    8396               1 :   PyObject * obj2 = 0 ;
    8397               1 :   PyObject * obj3 = 0 ;
    8398               1 :   PyObject * obj4 = 0 ;
    8399               1 :   PyObject * obj5 = 0 ;
    8400                 :   char *  kwnames[] = {
    8401                 :     (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
    8402               1 :   };
    8403                 :   OGRErr result;
    8404                 :   
    8405                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
    8406                 :   PyProgressData *psProgressInfo;
    8407               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
    8408               1 :   psProgressInfo->nLastReported = -1;
    8409               1 :   psProgressInfo->psPyCallback = NULL;
    8410               1 :   psProgressInfo->psPyCallbackData = NULL;
    8411               1 :   arg6 = psProgressInfo;
    8412               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Clip",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
    8413               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8414               1 :   if (!SWIG_IsOK(res1)) {
    8415               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Clip" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    8416                 :   }
    8417               1 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    8418               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8419               1 :   if (!SWIG_IsOK(res2)) {
    8420               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Clip" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
    8421                 :   }
    8422               1 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
    8423               1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8424               1 :   if (!SWIG_IsOK(res3)) {
    8425               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Clip" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
    8426                 :   }
    8427               1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
    8428               1 :   if (obj3) {
    8429                 :     {
    8430                 :       /* %typemap(in) char **options */
    8431                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    8432               0 :       if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
    8433                 :   #if PY_VERSION_HEX < 0x03000000
    8434                 :         || PyString_Check(obj3)
    8435                 :   #endif
    8436                 :         ) {
    8437               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    8438               0 :         SWIG_fail;
    8439                 :       }
    8440                 :       
    8441               0 :       int size = PySequence_Size(obj3);
    8442               0 :       for (int i = 0; i < size; i++) {
    8443               0 :         PyObject* pyObj = PySequence_GetItem(obj3,i);
    8444               0 :         if (PyUnicode_Check(pyObj))
    8445                 :         {
    8446                 :           char *pszStr;
    8447                 :           Py_ssize_t nLen;
    8448               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    8449                 : #if PY_VERSION_HEX >= 0x03000000
    8450                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8451                 : #else
    8452               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8453                 : #endif
    8454               0 :           arg4 = CSLAddString( arg4, pszStr );
    8455               0 :           Py_XDECREF(pyUTF8Str);
    8456                 :         }
    8457                 : #if PY_VERSION_HEX >= 0x03000000
    8458                 :         else if (PyBytes_Check(pyObj))
    8459                 :         arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
    8460                 : #else
    8461               0 :         else if (PyString_Check(pyObj))
    8462               0 :         arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
    8463                 : #endif
    8464                 :         else
    8465                 :         {
    8466               0 :           Py_DECREF(pyObj);
    8467               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    8468               0 :           SWIG_fail;
    8469                 :         }
    8470               0 :         Py_DECREF(pyObj);
    8471                 :       }
    8472                 :     }
    8473                 :   }
    8474               1 :   if (obj4) {
    8475                 :     {
    8476                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
    8477                 :       /* callback_func typemap */
    8478               0 :       if (obj4 && obj4 != Py_None ) {
    8479               0 :         void* cbfunction = NULL;
    8480                 :         SWIG_ConvertPtr( obj4, 
    8481                 :           (void**)&cbfunction,
    8482                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
    8483               0 :           SWIG_POINTER_EXCEPTION | 0 );
    8484                 :         
    8485               0 :         if ( cbfunction == GDALTermProgress ) {
    8486               0 :           arg5 = GDALTermProgress;
    8487                 :         } else {
    8488               0 :           if (!PyCallable_Check(obj4)) {
    8489                 :             PyErr_SetString( PyExc_RuntimeError, 
    8490               0 :               "Object given is not a Python function" );
    8491               0 :             SWIG_fail;
    8492                 :           }
    8493               0 :           psProgressInfo->psPyCallback = obj4;
    8494               0 :           arg5 = PyProgressProxy;
    8495                 :         }
    8496                 :         
    8497                 :       }
    8498                 :       
    8499                 :     }
    8500                 :   }
    8501               1 :   if (obj5) {
    8502                 :     {
    8503                 :       /* %typemap(in) ( void* callback_data=NULL)  */
    8504               0 :       psProgressInfo->psPyCallbackData = obj5 ;
    8505                 :     }
    8506                 :   }
    8507                 :   {
    8508               1 :     if ( bUseExceptions ) {
    8509               0 :       CPLErrorReset();
    8510                 :     }
    8511               1 :     result = (OGRErr)OGRLayerShadow_Clip(arg1,arg2,arg3,arg4,arg5,arg6);
    8512               1 :     if ( bUseExceptions ) {
    8513               0 :       CPLErr eclass = CPLGetLastErrorType();
    8514               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8515               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8516                 :       }
    8517                 :     }
    8518                 :   }
    8519                 :   {
    8520                 :     /* %typemap(out) OGRErr */
    8521               1 :     if ( result != 0 && bUseExceptions) {
    8522               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    8523               0 :       SWIG_fail;
    8524                 :     }
    8525                 :   }
    8526                 :   {
    8527                 :     /* %typemap(freearg) char **options */
    8528               1 :     CSLDestroy( arg4 );
    8529                 :   }
    8530                 :   {
    8531                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8532                 :     
    8533               1 :     CPLFree(psProgressInfo);
    8534                 :     
    8535                 :   }
    8536                 :   {
    8537                 :     /* %typemap(ret) OGRErr */
    8538               1 :     if (resultobj == Py_None ) {
    8539               0 :       Py_DECREF(resultobj);
    8540               0 :       resultobj = 0;
    8541                 :     }
    8542               1 :     if (resultobj == 0) {
    8543               1 :       resultobj = PyInt_FromLong( result );
    8544                 :     }
    8545                 :   }
    8546               1 :   return resultobj;
    8547                 : fail:
    8548                 :   {
    8549                 :     /* %typemap(freearg) char **options */
    8550               0 :     CSLDestroy( arg4 );
    8551                 :   }
    8552                 :   {
    8553                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8554                 :     
    8555               0 :     CPLFree(psProgressInfo);
    8556                 :     
    8557                 :   }
    8558               0 :   return NULL;
    8559                 : }
    8560                 : 
    8561                 : 
    8562               1 : SWIGINTERN PyObject *_wrap_Layer_Erase(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    8563               1 :   PyObject *resultobj = 0;
    8564               1 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    8565               1 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    8566               1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    8567               1 :   char **arg4 = (char **) NULL ;
    8568               1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
    8569               1 :   void *arg6 = (void *) NULL ;
    8570               1 :   void *argp1 = 0 ;
    8571               1 :   int res1 = 0 ;
    8572               1 :   void *argp2 = 0 ;
    8573               1 :   int res2 = 0 ;
    8574               1 :   void *argp3 = 0 ;
    8575               1 :   int res3 = 0 ;
    8576               1 :   PyObject * obj0 = 0 ;
    8577               1 :   PyObject * obj1 = 0 ;
    8578               1 :   PyObject * obj2 = 0 ;
    8579               1 :   PyObject * obj3 = 0 ;
    8580               1 :   PyObject * obj4 = 0 ;
    8581               1 :   PyObject * obj5 = 0 ;
    8582                 :   char *  kwnames[] = {
    8583                 :     (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
    8584               1 :   };
    8585                 :   OGRErr result;
    8586                 :   
    8587                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
    8588                 :   PyProgressData *psProgressInfo;
    8589               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
    8590               1 :   psProgressInfo->nLastReported = -1;
    8591               1 :   psProgressInfo->psPyCallback = NULL;
    8592               1 :   psProgressInfo->psPyCallbackData = NULL;
    8593               1 :   arg6 = psProgressInfo;
    8594               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Erase",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
    8595               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8596               1 :   if (!SWIG_IsOK(res1)) {
    8597               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Erase" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    8598                 :   }
    8599               1 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    8600               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8601               1 :   if (!SWIG_IsOK(res2)) {
    8602               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Erase" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
    8603                 :   }
    8604               1 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
    8605               1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    8606               1 :   if (!SWIG_IsOK(res3)) {
    8607               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Erase" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
    8608                 :   }
    8609               1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
    8610               1 :   if (obj3) {
    8611                 :     {
    8612                 :       /* %typemap(in) char **options */
    8613                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    8614               0 :       if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
    8615                 :   #if PY_VERSION_HEX < 0x03000000
    8616                 :         || PyString_Check(obj3)
    8617                 :   #endif
    8618                 :         ) {
    8619               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    8620               0 :         SWIG_fail;
    8621                 :       }
    8622                 :       
    8623               0 :       int size = PySequence_Size(obj3);
    8624               0 :       for (int i = 0; i < size; i++) {
    8625               0 :         PyObject* pyObj = PySequence_GetItem(obj3,i);
    8626               0 :         if (PyUnicode_Check(pyObj))
    8627                 :         {
    8628                 :           char *pszStr;
    8629                 :           Py_ssize_t nLen;
    8630               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    8631                 : #if PY_VERSION_HEX >= 0x03000000
    8632                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8633                 : #else
    8634               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    8635                 : #endif
    8636               0 :           arg4 = CSLAddString( arg4, pszStr );
    8637               0 :           Py_XDECREF(pyUTF8Str);
    8638                 :         }
    8639                 : #if PY_VERSION_HEX >= 0x03000000
    8640                 :         else if (PyBytes_Check(pyObj))
    8641                 :         arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
    8642                 : #else
    8643               0 :         else if (PyString_Check(pyObj))
    8644               0 :         arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
    8645                 : #endif
    8646                 :         else
    8647                 :         {
    8648               0 :           Py_DECREF(pyObj);
    8649               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    8650               0 :           SWIG_fail;
    8651                 :         }
    8652               0 :         Py_DECREF(pyObj);
    8653                 :       }
    8654                 :     }
    8655                 :   }
    8656               1 :   if (obj4) {
    8657                 :     {
    8658                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
    8659                 :       /* callback_func typemap */
    8660               0 :       if (obj4 && obj4 != Py_None ) {
    8661               0 :         void* cbfunction = NULL;
    8662                 :         SWIG_ConvertPtr( obj4, 
    8663                 :           (void**)&cbfunction,
    8664                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
    8665               0 :           SWIG_POINTER_EXCEPTION | 0 );
    8666                 :         
    8667               0 :         if ( cbfunction == GDALTermProgress ) {
    8668               0 :           arg5 = GDALTermProgress;
    8669                 :         } else {
    8670               0 :           if (!PyCallable_Check(obj4)) {
    8671                 :             PyErr_SetString( PyExc_RuntimeError, 
    8672               0 :               "Object given is not a Python function" );
    8673               0 :             SWIG_fail;
    8674                 :           }
    8675               0 :           psProgressInfo->psPyCallback = obj4;
    8676               0 :           arg5 = PyProgressProxy;
    8677                 :         }
    8678                 :         
    8679                 :       }
    8680                 :       
    8681                 :     }
    8682                 :   }
    8683               1 :   if (obj5) {
    8684                 :     {
    8685                 :       /* %typemap(in) ( void* callback_data=NULL)  */
    8686               0 :       psProgressInfo->psPyCallbackData = obj5 ;
    8687                 :     }
    8688                 :   }
    8689                 :   {
    8690               1 :     if ( bUseExceptions ) {
    8691               0 :       CPLErrorReset();
    8692                 :     }
    8693               1 :     result = (OGRErr)OGRLayerShadow_Erase(arg1,arg2,arg3,arg4,arg5,arg6);
    8694               1 :     if ( bUseExceptions ) {
    8695               0 :       CPLErr eclass = CPLGetLastErrorType();
    8696               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8697               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8698                 :       }
    8699                 :     }
    8700                 :   }
    8701                 :   {
    8702                 :     /* %typemap(out) OGRErr */
    8703               1 :     if ( result != 0 && bUseExceptions) {
    8704               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    8705               0 :       SWIG_fail;
    8706                 :     }
    8707                 :   }
    8708                 :   {
    8709                 :     /* %typemap(freearg) char **options */
    8710               1 :     CSLDestroy( arg4 );
    8711                 :   }
    8712                 :   {
    8713                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8714                 :     
    8715               1 :     CPLFree(psProgressInfo);
    8716                 :     
    8717                 :   }
    8718                 :   {
    8719                 :     /* %typemap(ret) OGRErr */
    8720               1 :     if (resultobj == Py_None ) {
    8721               0 :       Py_DECREF(resultobj);
    8722               0 :       resultobj = 0;
    8723                 :     }
    8724               1 :     if (resultobj == 0) {
    8725               1 :       resultobj = PyInt_FromLong( result );
    8726                 :     }
    8727                 :   }
    8728               1 :   return resultobj;
    8729                 : fail:
    8730                 :   {
    8731                 :     /* %typemap(freearg) char **options */
    8732               0 :     CSLDestroy( arg4 );
    8733                 :   }
    8734                 :   {
    8735                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8736                 :     
    8737               0 :     CPLFree(psProgressInfo);
    8738                 :     
    8739                 :   }
    8740               0 :   return NULL;
    8741                 : }
    8742                 : 
    8743                 : 
    8744               2 : SWIGINTERN PyObject *Layer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8745                 :   PyObject *obj;
    8746               2 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    8747               2 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRLayerShadow, SWIG_NewClientData(obj));
    8748               2 :   return SWIG_Py_Void();
    8749                 : }
    8750                 : 
    8751           92831 : SWIGINTERN PyObject *_wrap_delete_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8752           92831 :   PyObject *resultobj = 0;
    8753           92831 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8754           92831 :   void *argp1 = 0 ;
    8755           92831 :   int res1 = 0 ;
    8756           92831 :   PyObject * obj0 = 0 ;
    8757                 :   
    8758           92831 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_Feature",&obj0)) SWIG_fail;
    8759           92831 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_DISOWN |  0 );
    8760           92831 :   if (!SWIG_IsOK(res1)) {
    8761               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Feature" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8762                 :   }
    8763           92831 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8764                 :   {
    8765           92831 :     if ( bUseExceptions ) {
    8766               0 :       CPLErrorReset();
    8767                 :     }
    8768                 :     delete_OGRFeatureShadow(arg1);
    8769           92831 :     if ( bUseExceptions ) {
    8770               0 :       CPLErr eclass = CPLGetLastErrorType();
    8771               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8772               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8773                 :       }
    8774                 :     }
    8775                 :   }
    8776           92831 :   resultobj = SWIG_Py_Void();
    8777           92831 :   return resultobj;
    8778                 : fail:
    8779               0 :   return NULL;
    8780                 : }
    8781                 : 
    8782                 : 
    8783           32800 : SWIGINTERN PyObject *_wrap_new_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    8784           32800 :   PyObject *resultobj = 0;
    8785           32800 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    8786           32800 :   void *argp1 = 0 ;
    8787           32800 :   int res1 = 0 ;
    8788           32800 :   PyObject * obj0 = 0 ;
    8789                 :   char *  kwnames[] = {
    8790                 :     (char *) "feature_def", NULL 
    8791           32800 :   };
    8792           32800 :   OGRFeatureShadow *result = 0 ;
    8793                 :   
    8794           32800 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_Feature",kwnames,&obj0)) SWIG_fail;
    8795           32800 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
    8796           32800 :   if (!SWIG_IsOK(res1)) {
    8797               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Feature" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
    8798                 :   }
    8799           32800 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
    8800                 :   {
    8801           32800 :     if (!arg1) {
    8802               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8803                 :     }
    8804                 :   }
    8805                 :   {
    8806           32800 :     if ( bUseExceptions ) {
    8807               0 :       CPLErrorReset();
    8808                 :     }
    8809           32800 :     result = (OGRFeatureShadow *)new_OGRFeatureShadow(arg1);
    8810           32800 :     if ( bUseExceptions ) {
    8811               0 :       CPLErr eclass = CPLGetLastErrorType();
    8812               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8813               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8814                 :       }
    8815                 :     }
    8816                 :   }
    8817           32800 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_NEW |  0 );
    8818           32800 :   return resultobj;
    8819                 : fail:
    8820               0 :   return NULL;
    8821                 : }
    8822                 : 
    8823                 : 
    8824              76 : SWIGINTERN PyObject *_wrap_Feature_GetDefnRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8825              76 :   PyObject *resultobj = 0;
    8826              76 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8827              76 :   void *argp1 = 0 ;
    8828              76 :   int res1 = 0 ;
    8829              76 :   PyObject * obj0 = 0 ;
    8830              76 :   OGRFeatureDefnShadow *result = 0 ;
    8831                 :   
    8832              76 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetDefnRef",&obj0)) SWIG_fail;
    8833              76 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8834              76 :   if (!SWIG_IsOK(res1)) {
    8835               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8836                 :   }
    8837              76 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8838                 :   {
    8839              76 :     if ( bUseExceptions ) {
    8840               0 :       CPLErrorReset();
    8841                 :     }
    8842              76 :     result = (OGRFeatureDefnShadow *)OGRFeatureShadow_GetDefnRef(arg1);
    8843              76 :     if ( bUseExceptions ) {
    8844               0 :       CPLErr eclass = CPLGetLastErrorType();
    8845               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8846               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8847                 :       }
    8848                 :     }
    8849                 :   }
    8850              76 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
    8851              76 :   return resultobj;
    8852                 : fail:
    8853               0 :   return NULL;
    8854                 : }
    8855                 : 
    8856                 : 
    8857           29017 : SWIGINTERN PyObject *_wrap_Feature_SetGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8858           29017 :   PyObject *resultobj = 0;
    8859           29017 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8860           29017 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    8861           29017 :   void *argp1 = 0 ;
    8862           29017 :   int res1 = 0 ;
    8863           29017 :   void *argp2 = 0 ;
    8864           29017 :   int res2 = 0 ;
    8865           29017 :   PyObject * obj0 = 0 ;
    8866           29017 :   PyObject * obj1 = 0 ;
    8867                 :   OGRErr result;
    8868                 :   
    8869           29017 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetGeometry",&obj0,&obj1)) SWIG_fail;
    8870           29017 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8871           29017 :   if (!SWIG_IsOK(res1)) {
    8872               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometry" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8873                 :   }
    8874           29017 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8875           29017 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    8876           29017 :   if (!SWIG_IsOK(res2)) {
    8877               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
    8878                 :   }
    8879           29017 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
    8880                 :   {
    8881           29017 :     if ( bUseExceptions ) {
    8882               0 :       CPLErrorReset();
    8883                 :     }
    8884           29017 :     result = (OGRErr)OGRFeatureShadow_SetGeometry(arg1,arg2);
    8885           29017 :     if ( bUseExceptions ) {
    8886               0 :       CPLErr eclass = CPLGetLastErrorType();
    8887               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8888               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8889                 :       }
    8890                 :     }
    8891                 :   }
    8892                 :   {
    8893                 :     /* %typemap(out) OGRErr */
    8894           29017 :     if ( result != 0 && bUseExceptions) {
    8895               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    8896               0 :       SWIG_fail;
    8897                 :     }
    8898                 :   }
    8899                 :   {
    8900                 :     /* %typemap(ret) OGRErr */
    8901           29017 :     if (resultobj == Py_None ) {
    8902               0 :       Py_DECREF(resultobj);
    8903               0 :       resultobj = 0;
    8904                 :     }
    8905           29017 :     if (resultobj == 0) {
    8906           29017 :       resultobj = PyInt_FromLong( result );
    8907                 :     }
    8908                 :   }
    8909           29017 :   return resultobj;
    8910                 : fail:
    8911               0 :   return NULL;
    8912                 : }
    8913                 : 
    8914                 : 
    8915             245 : SWIGINTERN PyObject *_wrap_Feature_SetGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8916             245 :   PyObject *resultobj = 0;
    8917             245 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8918             245 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    8919             245 :   void *argp1 = 0 ;
    8920             245 :   int res1 = 0 ;
    8921             245 :   int res2 = 0 ;
    8922             245 :   PyObject * obj0 = 0 ;
    8923             245 :   PyObject * obj1 = 0 ;
    8924                 :   OGRErr result;
    8925                 :   
    8926             245 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetGeometryDirectly",&obj0,&obj1)) SWIG_fail;
    8927             245 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8928             245 :   if (!SWIG_IsOK(res1)) {
    8929               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometryDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8930                 :   }
    8931             245 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8932             245 :   res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
    8933             245 :   if (!SWIG_IsOK(res2)) {
    8934               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
    8935                 :   }
    8936                 :   {
    8937             245 :     if ( bUseExceptions ) {
    8938               0 :       CPLErrorReset();
    8939                 :     }
    8940             490 :     result = (OGRErr)OGRFeatureShadow_SetGeometryDirectly(arg1,arg2);
    8941             245 :     if ( bUseExceptions ) {
    8942               0 :       CPLErr eclass = CPLGetLastErrorType();
    8943               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8944               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8945                 :       }
    8946                 :     }
    8947                 :   }
    8948                 :   {
    8949                 :     /* %typemap(out) OGRErr */
    8950             245 :     if ( result != 0 && bUseExceptions) {
    8951               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    8952               0 :       SWIG_fail;
    8953                 :     }
    8954                 :   }
    8955                 :   {
    8956                 :     /* %typemap(ret) OGRErr */
    8957             245 :     if (resultobj == Py_None ) {
    8958               0 :       Py_DECREF(resultobj);
    8959               0 :       resultobj = 0;
    8960                 :     }
    8961             245 :     if (resultobj == 0) {
    8962             245 :       resultobj = PyInt_FromLong( result );
    8963                 :     }
    8964                 :   }
    8965             245 :   return resultobj;
    8966                 : fail:
    8967               0 :   return NULL;
    8968                 : }
    8969                 : 
    8970                 : 
    8971           55763 : SWIGINTERN PyObject *_wrap_Feature_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8972           55763 :   PyObject *resultobj = 0;
    8973           55763 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8974           55763 :   void *argp1 = 0 ;
    8975           55763 :   int res1 = 0 ;
    8976           55763 :   PyObject * obj0 = 0 ;
    8977           55763 :   OGRGeometryShadow *result = 0 ;
    8978                 :   
    8979           55763 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetGeometryRef",&obj0)) SWIG_fail;
    8980           55763 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8981           55763 :   if (!SWIG_IsOK(res1)) {
    8982               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeometryRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8983                 :   }
    8984           55763 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8985                 :   {
    8986           55763 :     if ( bUseExceptions ) {
    8987               0 :       CPLErrorReset();
    8988                 :     }
    8989           55763 :     result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeometryRef(arg1);
    8990           55763 :     if ( bUseExceptions ) {
    8991               0 :       CPLErr eclass = CPLGetLastErrorType();
    8992               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8993               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8994                 :       }
    8995                 :     }
    8996                 :   }
    8997           55763 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    8998           55763 :   return resultobj;
    8999                 : fail:
    9000               0 :   return NULL;
    9001                 : }
    9002                 : 
    9003                 : 
    9004              36 : SWIGINTERN PyObject *_wrap_Feature_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9005              36 :   PyObject *resultobj = 0;
    9006              36 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9007              36 :   void *argp1 = 0 ;
    9008              36 :   int res1 = 0 ;
    9009              36 :   PyObject * obj0 = 0 ;
    9010              36 :   OGRFeatureShadow *result = 0 ;
    9011                 :   
    9012              36 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_Clone",&obj0)) SWIG_fail;
    9013              36 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9014              36 :   if (!SWIG_IsOK(res1)) {
    9015               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Clone" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9016                 :   }
    9017              36 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9018                 :   {
    9019              36 :     if ( bUseExceptions ) {
    9020               0 :       CPLErrorReset();
    9021                 :     }
    9022              36 :     result = (OGRFeatureShadow *)OGRFeatureShadow_Clone(arg1);
    9023              36 :     if ( bUseExceptions ) {
    9024               0 :       CPLErr eclass = CPLGetLastErrorType();
    9025               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9026               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9027                 :       }
    9028                 :     }
    9029                 :   }
    9030              36 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
    9031              36 :   return resultobj;
    9032                 : fail:
    9033               0 :   return NULL;
    9034                 : }
    9035                 : 
    9036                 : 
    9037              42 : SWIGINTERN PyObject *_wrap_Feature_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9038              42 :   PyObject *resultobj = 0;
    9039              42 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9040              42 :   OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    9041              42 :   void *argp1 = 0 ;
    9042              42 :   int res1 = 0 ;
    9043              42 :   void *argp2 = 0 ;
    9044              42 :   int res2 = 0 ;
    9045              42 :   PyObject * obj0 = 0 ;
    9046              42 :   PyObject * obj1 = 0 ;
    9047                 :   bool result;
    9048                 :   
    9049              42 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_Equal",&obj0,&obj1)) SWIG_fail;
    9050              42 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9051              42 :   if (!SWIG_IsOK(res1)) {
    9052               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Equal" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9053                 :   }
    9054              42 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9055              42 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9056              42 :   if (!SWIG_IsOK(res2)) {
    9057               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_Equal" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
    9058                 :   }
    9059              42 :   arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
    9060                 :   {
    9061              42 :     if (!arg2) {
    9062               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9063                 :     }
    9064                 :   }
    9065                 :   {
    9066              42 :     if ( bUseExceptions ) {
    9067               0 :       CPLErrorReset();
    9068                 :     }
    9069              42 :     result = (bool)OGRFeatureShadow_Equal(arg1,arg2);
    9070              42 :     if ( bUseExceptions ) {
    9071               0 :       CPLErr eclass = CPLGetLastErrorType();
    9072               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9073               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9074                 :       }
    9075                 :     }
    9076                 :   }
    9077              42 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
    9078              42 :   return resultobj;
    9079                 : fail:
    9080               0 :   return NULL;
    9081                 : }
    9082                 : 
    9083                 : 
    9084            4631 : SWIGINTERN PyObject *_wrap_Feature_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9085            4631 :   PyObject *resultobj = 0;
    9086            4631 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9087            4631 :   void *argp1 = 0 ;
    9088            4631 :   int res1 = 0 ;
    9089            4631 :   PyObject * obj0 = 0 ;
    9090                 :   int result;
    9091                 :   
    9092            4631 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetFieldCount",&obj0)) SWIG_fail;
    9093            4631 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9094            4631 :   if (!SWIG_IsOK(res1)) {
    9095               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9096                 :   }
    9097            4631 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9098                 :   {
    9099            4631 :     if ( bUseExceptions ) {
    9100               0 :       CPLErrorReset();
    9101                 :     }
    9102            4631 :     result = (int)OGRFeatureShadow_GetFieldCount(arg1);
    9103            4631 :     if ( bUseExceptions ) {
    9104               0 :       CPLErr eclass = CPLGetLastErrorType();
    9105               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9106               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9107                 :       }
    9108                 :     }
    9109                 :   }
    9110            4631 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9111            4631 :   return resultobj;
    9112                 : fail:
    9113               0 :   return NULL;
    9114                 : }
    9115                 : 
    9116                 : 
    9117              11 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9118              11 :   PyObject *resultobj = 0;
    9119              11 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9120                 :   int arg2 ;
    9121              11 :   void *argp1 = 0 ;
    9122              11 :   int res1 = 0 ;
    9123                 :   int val2 ;
    9124              11 :   int ecode2 = 0 ;
    9125              11 :   PyObject * obj0 = 0 ;
    9126              11 :   PyObject * obj1 = 0 ;
    9127              11 :   OGRFieldDefnShadow *result = 0 ;
    9128                 :   
    9129              11 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldDefnRef",&obj0,&obj1)) SWIG_fail;
    9130              11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9131              11 :   if (!SWIG_IsOK(res1)) {
    9132               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9133                 :   }
    9134              11 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9135              11 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9136              11 :   if (!SWIG_IsOK(ecode2)) {
    9137               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldDefnRef" "', argument " "2"" of type '" "int""'");
    9138                 :   } 
    9139              11 :   arg2 = static_cast< int >(val2);
    9140                 :   {
    9141              11 :     if ( bUseExceptions ) {
    9142               0 :       CPLErrorReset();
    9143                 :     }
    9144              11 :     result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_0(arg1,arg2);
    9145              11 :     if ( bUseExceptions ) {
    9146               0 :       CPLErr eclass = CPLGetLastErrorType();
    9147               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9148               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9149                 :       }
    9150                 :     }
    9151                 :   }
    9152              11 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
    9153              11 :   return resultobj;
    9154                 : fail:
    9155               0 :   return NULL;
    9156                 : }
    9157                 : 
    9158                 : 
    9159               0 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9160               0 :   PyObject *resultobj = 0;
    9161               0 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9162               0 :   char *arg2 = (char *) 0 ;
    9163               0 :   void *argp1 = 0 ;
    9164               0 :   int res1 = 0 ;
    9165                 :   int res2 ;
    9166               0 :   char *buf2 = 0 ;
    9167               0 :   int alloc2 = 0 ;
    9168               0 :   PyObject * obj0 = 0 ;
    9169               0 :   PyObject * obj1 = 0 ;
    9170               0 :   OGRFieldDefnShadow *result = 0 ;
    9171                 :   
    9172               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldDefnRef",&obj0,&obj1)) SWIG_fail;
    9173               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9174               0 :   if (!SWIG_IsOK(res1)) {
    9175               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9176                 :   }
    9177               0 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9178               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9179               0 :   if (!SWIG_IsOK(res2)) {
    9180               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldDefnRef" "', argument " "2"" of type '" "char const *""'");
    9181                 :   }
    9182               0 :   arg2 = reinterpret_cast< char * >(buf2);
    9183                 :   {
    9184               0 :     if (!arg2) {
    9185               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9186                 :     }
    9187                 :   }
    9188                 :   {
    9189               0 :     if ( bUseExceptions ) {
    9190               0 :       CPLErrorReset();
    9191                 :     }
    9192               0 :     result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
    9193               0 :     if ( bUseExceptions ) {
    9194               0 :       CPLErr eclass = CPLGetLastErrorType();
    9195               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9196               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9197                 :       }
    9198                 :     }
    9199                 :   }
    9200               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
    9201               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9202               0 :   return resultobj;
    9203                 : fail:
    9204               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9205               0 :   return NULL;
    9206                 : }
    9207                 : 
    9208                 : 
    9209              11 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef(PyObject *self, PyObject *args) {
    9210                 :   int argc;
    9211                 :   PyObject *argv[3];
    9212                 :   int ii;
    9213                 :   
    9214              11 :   if (!PyTuple_Check(args)) SWIG_fail;
    9215              11 :   argc = (int)PyObject_Length(args);
    9216              33 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    9217              22 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    9218                 :   }
    9219              11 :   if (argc == 2) {
    9220                 :     int _v;
    9221              11 :     void *vptr = 0;
    9222              11 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9223              11 :     _v = SWIG_CheckState(res);
    9224              11 :     if (_v) {
    9225                 :       {
    9226              11 :         int res = SWIG_AsVal_int(argv[1], NULL);
    9227              11 :         _v = SWIG_CheckState(res);
    9228                 :       }
    9229              11 :       if (_v) {
    9230              11 :         return _wrap_Feature_GetFieldDefnRef__SWIG_0(self, args);
    9231                 :       }
    9232                 :     }
    9233                 :   }
    9234               0 :   if (argc == 2) {
    9235                 :     int _v;
    9236               0 :     void *vptr = 0;
    9237               0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9238               0 :     _v = SWIG_CheckState(res);
    9239               0 :     if (_v) {
    9240               0 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    9241               0 :       _v = SWIG_CheckState(res);
    9242               0 :       if (_v) {
    9243               0 :         return _wrap_Feature_GetFieldDefnRef__SWIG_1(self, args);
    9244                 :       }
    9245                 :     }
    9246                 :   }
    9247                 :   
    9248                 : fail:
    9249                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldDefnRef'.\n"
    9250                 :     "  Possible C/C++ prototypes are:\n"
    9251                 :     "    GetFieldDefnRef(OGRFeatureShadow *,int)\n"
    9252               0 :     "    GetFieldDefnRef(OGRFeatureShadow *,char const *)\n");
    9253               0 :   return NULL;
    9254                 : }
    9255                 : 
    9256                 : 
    9257            3268 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9258            3268 :   PyObject *resultobj = 0;
    9259            3268 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9260                 :   int arg2 ;
    9261            3268 :   void *argp1 = 0 ;
    9262            3268 :   int res1 = 0 ;
    9263                 :   int val2 ;
    9264            3268 :   int ecode2 = 0 ;
    9265            3268 :   PyObject * obj0 = 0 ;
    9266            3268 :   PyObject * obj1 = 0 ;
    9267            3268 :   char *result = 0 ;
    9268                 :   
    9269            3268 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsString",&obj0,&obj1)) SWIG_fail;
    9270            3268 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9271            3268 :   if (!SWIG_IsOK(res1)) {
    9272               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9273                 :   }
    9274            3268 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9275            3268 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9276            3268 :   if (!SWIG_IsOK(ecode2)) {
    9277               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsString" "', argument " "2"" of type '" "int""'");
    9278                 :   } 
    9279            3268 :   arg2 = static_cast< int >(val2);
    9280                 :   {
    9281            3268 :     if ( bUseExceptions ) {
    9282               0 :       CPLErrorReset();
    9283                 :     }
    9284            3268 :     result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2);
    9285            3268 :     if ( bUseExceptions ) {
    9286               0 :       CPLErr eclass = CPLGetLastErrorType();
    9287               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9288               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9289                 :       }
    9290                 :     }
    9291                 :   }
    9292            3268 :   resultobj = SWIG_FromCharPtr((const char *)result);
    9293            3268 :   return resultobj;
    9294                 : fail:
    9295               0 :   return NULL;
    9296                 : }
    9297                 : 
    9298                 : 
    9299             424 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9300             424 :   PyObject *resultobj = 0;
    9301             424 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9302             424 :   char *arg2 = (char *) 0 ;
    9303             424 :   void *argp1 = 0 ;
    9304             424 :   int res1 = 0 ;
    9305                 :   int res2 ;
    9306             424 :   char *buf2 = 0 ;
    9307             424 :   int alloc2 = 0 ;
    9308             424 :   PyObject * obj0 = 0 ;
    9309             424 :   PyObject * obj1 = 0 ;
    9310             424 :   char *result = 0 ;
    9311                 :   
    9312             424 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsString",&obj0,&obj1)) SWIG_fail;
    9313             424 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9314             424 :   if (!SWIG_IsOK(res1)) {
    9315               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9316                 :   }
    9317             424 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9318             424 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9319             424 :   if (!SWIG_IsOK(res2)) {
    9320               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsString" "', argument " "2"" of type '" "char const *""'");
    9321                 :   }
    9322             424 :   arg2 = reinterpret_cast< char * >(buf2);
    9323                 :   {
    9324             424 :     if (!arg2) {
    9325               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9326                 :     }
    9327                 :   }
    9328                 :   {
    9329             424 :     if ( bUseExceptions ) {
    9330               0 :       CPLErrorReset();
    9331                 :     }
    9332             424 :     result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
    9333             424 :     if ( bUseExceptions ) {
    9334               0 :       CPLErr eclass = CPLGetLastErrorType();
    9335               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9336               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9337                 :       }
    9338                 :     }
    9339                 :   }
    9340             424 :   resultobj = SWIG_FromCharPtr((const char *)result);
    9341             424 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9342             424 :   return resultobj;
    9343                 : fail:
    9344               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9345               0 :   return NULL;
    9346                 : }
    9347                 : 
    9348                 : 
    9349            3692 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString(PyObject *self, PyObject *args) {
    9350                 :   int argc;
    9351                 :   PyObject *argv[3];
    9352                 :   int ii;
    9353                 :   
    9354            3692 :   if (!PyTuple_Check(args)) SWIG_fail;
    9355            3692 :   argc = (int)PyObject_Length(args);
    9356           11076 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    9357            7384 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    9358                 :   }
    9359            3692 :   if (argc == 2) {
    9360                 :     int _v;
    9361            3692 :     void *vptr = 0;
    9362            3692 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9363            3692 :     _v = SWIG_CheckState(res);
    9364            3692 :     if (_v) {
    9365                 :       {
    9366            3692 :         int res = SWIG_AsVal_int(argv[1], NULL);
    9367            3692 :         _v = SWIG_CheckState(res);
    9368                 :       }
    9369            3692 :       if (_v) {
    9370            3268 :         return _wrap_Feature_GetFieldAsString__SWIG_0(self, args);
    9371                 :       }
    9372                 :     }
    9373                 :   }
    9374             424 :   if (argc == 2) {
    9375                 :     int _v;
    9376             424 :     void *vptr = 0;
    9377             424 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9378             424 :     _v = SWIG_CheckState(res);
    9379             424 :     if (_v) {
    9380             424 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    9381             424 :       _v = SWIG_CheckState(res);
    9382             424 :       if (_v) {
    9383             424 :         return _wrap_Feature_GetFieldAsString__SWIG_1(self, args);
    9384                 :       }
    9385                 :     }
    9386                 :   }
    9387                 :   
    9388                 : fail:
    9389                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsString'.\n"
    9390                 :     "  Possible C/C++ prototypes are:\n"
    9391                 :     "    GetFieldAsString(OGRFeatureShadow *,int)\n"
    9392               0 :     "    GetFieldAsString(OGRFeatureShadow *,char const *)\n");
    9393               0 :   return NULL;
    9394                 : }
    9395                 : 
    9396                 : 
    9397            2749 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9398            2749 :   PyObject *resultobj = 0;
    9399            2749 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9400                 :   int arg2 ;
    9401            2749 :   void *argp1 = 0 ;
    9402            2749 :   int res1 = 0 ;
    9403                 :   int val2 ;
    9404            2749 :   int ecode2 = 0 ;
    9405            2749 :   PyObject * obj0 = 0 ;
    9406            2749 :   PyObject * obj1 = 0 ;
    9407                 :   int result;
    9408                 :   
    9409            2749 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger",&obj0,&obj1)) SWIG_fail;
    9410            2749 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9411            2749 :   if (!SWIG_IsOK(res1)) {
    9412               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9413                 :   }
    9414            2749 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9415            2749 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9416            2749 :   if (!SWIG_IsOK(ecode2)) {
    9417               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "int""'");
    9418                 :   } 
    9419            2749 :   arg2 = static_cast< int >(val2);
    9420                 :   {
    9421            2749 :     if ( bUseExceptions ) {
    9422               0 :       CPLErrorReset();
    9423                 :     }
    9424            2749 :     result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
    9425            2749 :     if ( bUseExceptions ) {
    9426               0 :       CPLErr eclass = CPLGetLastErrorType();
    9427               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9428               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9429                 :       }
    9430                 :     }
    9431                 :   }
    9432            2749 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9433            2749 :   return resultobj;
    9434                 : fail:
    9435               0 :   return NULL;
    9436                 : }
    9437                 : 
    9438                 : 
    9439             168 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9440             168 :   PyObject *resultobj = 0;
    9441             168 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9442             168 :   char *arg2 = (char *) 0 ;
    9443             168 :   void *argp1 = 0 ;
    9444             168 :   int res1 = 0 ;
    9445                 :   int res2 ;
    9446             168 :   char *buf2 = 0 ;
    9447             168 :   int alloc2 = 0 ;
    9448             168 :   PyObject * obj0 = 0 ;
    9449             168 :   PyObject * obj1 = 0 ;
    9450                 :   int result;
    9451                 :   
    9452             168 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger",&obj0,&obj1)) SWIG_fail;
    9453             168 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9454             168 :   if (!SWIG_IsOK(res1)) {
    9455               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9456                 :   }
    9457             168 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9458             168 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9459             168 :   if (!SWIG_IsOK(res2)) {
    9460               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "char const *""'");
    9461                 :   }
    9462             168 :   arg2 = reinterpret_cast< char * >(buf2);
    9463                 :   {
    9464             168 :     if (!arg2) {
    9465               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9466                 :     }
    9467                 :   }
    9468                 :   {
    9469             168 :     if ( bUseExceptions ) {
    9470               0 :       CPLErrorReset();
    9471                 :     }
    9472             168 :     result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
    9473             168 :     if ( bUseExceptions ) {
    9474               0 :       CPLErr eclass = CPLGetLastErrorType();
    9475               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9476               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9477                 :       }
    9478                 :     }
    9479                 :   }
    9480             168 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9481             168 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9482             168 :   return resultobj;
    9483                 : fail:
    9484               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9485               0 :   return NULL;
    9486                 : }
    9487                 : 
    9488                 : 
    9489            2917 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger(PyObject *self, PyObject *args) {
    9490                 :   int argc;
    9491                 :   PyObject *argv[3];
    9492                 :   int ii;
    9493                 :   
    9494            2917 :   if (!PyTuple_Check(args)) SWIG_fail;
    9495            2917 :   argc = (int)PyObject_Length(args);
    9496            8751 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    9497            5834 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    9498                 :   }
    9499            2917 :   if (argc == 2) {
    9500                 :     int _v;
    9501            2917 :     void *vptr = 0;
    9502            2917 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9503            2917 :     _v = SWIG_CheckState(res);
    9504            2917 :     if (_v) {
    9505                 :       {
    9506            2917 :         int res = SWIG_AsVal_int(argv[1], NULL);
    9507            2917 :         _v = SWIG_CheckState(res);
    9508                 :       }
    9509            2917 :       if (_v) {
    9510            2749 :         return _wrap_Feature_GetFieldAsInteger__SWIG_0(self, args);
    9511                 :       }
    9512                 :     }
    9513                 :   }
    9514             168 :   if (argc == 2) {
    9515                 :     int _v;
    9516             168 :     void *vptr = 0;
    9517             168 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9518             168 :     _v = SWIG_CheckState(res);
    9519             168 :     if (_v) {
    9520             168 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    9521             168 :       _v = SWIG_CheckState(res);
    9522             168 :       if (_v) {
    9523             168 :         return _wrap_Feature_GetFieldAsInteger__SWIG_1(self, args);
    9524                 :       }
    9525                 :     }
    9526                 :   }
    9527                 :   
    9528                 : fail:
    9529                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsInteger'.\n"
    9530                 :     "  Possible C/C++ prototypes are:\n"
    9531                 :     "    GetFieldAsInteger(OGRFeatureShadow *,int)\n"
    9532               0 :     "    GetFieldAsInteger(OGRFeatureShadow *,char const *)\n");
    9533               0 :   return NULL;
    9534                 : }
    9535                 : 
    9536                 : 
    9537             641 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9538             641 :   PyObject *resultobj = 0;
    9539             641 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9540                 :   int arg2 ;
    9541             641 :   void *argp1 = 0 ;
    9542             641 :   int res1 = 0 ;
    9543                 :   int val2 ;
    9544             641 :   int ecode2 = 0 ;
    9545             641 :   PyObject * obj0 = 0 ;
    9546             641 :   PyObject * obj1 = 0 ;
    9547                 :   double result;
    9548                 :   
    9549             641 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDouble",&obj0,&obj1)) SWIG_fail;
    9550             641 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9551             641 :   if (!SWIG_IsOK(res1)) {
    9552               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9553                 :   }
    9554             641 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9555             641 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9556             641 :   if (!SWIG_IsOK(ecode2)) {
    9557               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "int""'");
    9558                 :   } 
    9559             641 :   arg2 = static_cast< int >(val2);
    9560                 :   {
    9561             641 :     if ( bUseExceptions ) {
    9562               0 :       CPLErrorReset();
    9563                 :     }
    9564             641 :     result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
    9565             641 :     if ( bUseExceptions ) {
    9566               0 :       CPLErr eclass = CPLGetLastErrorType();
    9567               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9568               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9569                 :       }
    9570                 :     }
    9571                 :   }
    9572             641 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9573             641 :   return resultobj;
    9574                 : fail:
    9575               0 :   return NULL;
    9576                 : }
    9577                 : 
    9578                 : 
    9579              12 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9580              12 :   PyObject *resultobj = 0;
    9581              12 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9582              12 :   char *arg2 = (char *) 0 ;
    9583              12 :   void *argp1 = 0 ;
    9584              12 :   int res1 = 0 ;
    9585                 :   int res2 ;
    9586              12 :   char *buf2 = 0 ;
    9587              12 :   int alloc2 = 0 ;
    9588              12 :   PyObject * obj0 = 0 ;
    9589              12 :   PyObject * obj1 = 0 ;
    9590                 :   double result;
    9591                 :   
    9592              12 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDouble",&obj0,&obj1)) SWIG_fail;
    9593              12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9594              12 :   if (!SWIG_IsOK(res1)) {
    9595               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9596                 :   }
    9597              12 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9598              12 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9599              12 :   if (!SWIG_IsOK(res2)) {
    9600               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "char const *""'");
    9601                 :   }
    9602              12 :   arg2 = reinterpret_cast< char * >(buf2);
    9603                 :   {
    9604              12 :     if (!arg2) {
    9605               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9606                 :     }
    9607                 :   }
    9608                 :   {
    9609              12 :     if ( bUseExceptions ) {
    9610               0 :       CPLErrorReset();
    9611                 :     }
    9612              12 :     result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
    9613              12 :     if ( bUseExceptions ) {
    9614               0 :       CPLErr eclass = CPLGetLastErrorType();
    9615               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9616               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9617                 :       }
    9618                 :     }
    9619                 :   }
    9620              12 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9621              12 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9622              12 :   return resultobj;
    9623                 : fail:
    9624               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9625               0 :   return NULL;
    9626                 : }
    9627                 : 
    9628                 : 
    9629             653 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble(PyObject *self, PyObject *args) {
    9630                 :   int argc;
    9631                 :   PyObject *argv[3];
    9632                 :   int ii;
    9633                 :   
    9634             653 :   if (!PyTuple_Check(args)) SWIG_fail;
    9635             653 :   argc = (int)PyObject_Length(args);
    9636            1959 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    9637            1306 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    9638                 :   }
    9639             653 :   if (argc == 2) {
    9640                 :     int _v;
    9641             653 :     void *vptr = 0;
    9642             653 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9643             653 :     _v = SWIG_CheckState(res);
    9644             653 :     if (_v) {
    9645                 :       {
    9646             653 :         int res = SWIG_AsVal_int(argv[1], NULL);
    9647             653 :         _v = SWIG_CheckState(res);
    9648                 :       }
    9649             653 :       if (_v) {
    9650             641 :         return _wrap_Feature_GetFieldAsDouble__SWIG_0(self, args);
    9651                 :       }
    9652                 :     }
    9653                 :   }
    9654              12 :   if (argc == 2) {
    9655                 :     int _v;
    9656              12 :     void *vptr = 0;
    9657              12 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9658              12 :     _v = SWIG_CheckState(res);
    9659              12 :     if (_v) {
    9660              12 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    9661              12 :       _v = SWIG_CheckState(res);
    9662              12 :       if (_v) {
    9663              12 :         return _wrap_Feature_GetFieldAsDouble__SWIG_1(self, args);
    9664                 :       }
    9665                 :     }
    9666                 :   }
    9667                 :   
    9668                 : fail:
    9669                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsDouble'.\n"
    9670                 :     "  Possible C/C++ prototypes are:\n"
    9671                 :     "    GetFieldAsDouble(OGRFeatureShadow *,int)\n"
    9672               0 :     "    GetFieldAsDouble(OGRFeatureShadow *,char const *)\n");
    9673               0 :   return NULL;
    9674                 : }
    9675                 : 
    9676                 : 
    9677               1 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9678               1 :   PyObject *resultobj = 0;
    9679               1 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9680                 :   int arg2 ;
    9681               1 :   int *arg3 = (int *) 0 ;
    9682               1 :   int *arg4 = (int *) 0 ;
    9683               1 :   int *arg5 = (int *) 0 ;
    9684               1 :   int *arg6 = (int *) 0 ;
    9685               1 :   int *arg7 = (int *) 0 ;
    9686               1 :   int *arg8 = (int *) 0 ;
    9687               1 :   int *arg9 = (int *) 0 ;
    9688               1 :   void *argp1 = 0 ;
    9689               1 :   int res1 = 0 ;
    9690                 :   int val2 ;
    9691               1 :   int ecode2 = 0 ;
    9692                 :   int temp3 ;
    9693               1 :   int res3 = SWIG_TMPOBJ ;
    9694                 :   int temp4 ;
    9695               1 :   int res4 = SWIG_TMPOBJ ;
    9696                 :   int temp5 ;
    9697               1 :   int res5 = SWIG_TMPOBJ ;
    9698                 :   int temp6 ;
    9699               1 :   int res6 = SWIG_TMPOBJ ;
    9700                 :   int temp7 ;
    9701               1 :   int res7 = SWIG_TMPOBJ ;
    9702                 :   int temp8 ;
    9703               1 :   int res8 = SWIG_TMPOBJ ;
    9704                 :   int temp9 ;
    9705               1 :   int res9 = SWIG_TMPOBJ ;
    9706               1 :   PyObject * obj0 = 0 ;
    9707               1 :   PyObject * obj1 = 0 ;
    9708                 :   
    9709               1 :   arg3 = &temp3;
    9710               1 :   arg4 = &temp4;
    9711               1 :   arg5 = &temp5;
    9712               1 :   arg6 = &temp6;
    9713               1 :   arg7 = &temp7;
    9714               1 :   arg8 = &temp8;
    9715               1 :   arg9 = &temp9;
    9716               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDateTime",&obj0,&obj1)) SWIG_fail;
    9717               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9718               1 :   if (!SWIG_IsOK(res1)) {
    9719               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9720                 :   }
    9721               1 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9722               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9723               1 :   if (!SWIG_IsOK(ecode2)) {
    9724               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDateTime" "', argument " "2"" of type '" "int""'");
    9725                 :   } 
    9726               1 :   arg2 = static_cast< int >(val2);
    9727                 :   {
    9728               1 :     if ( bUseExceptions ) {
    9729               0 :       CPLErrorReset();
    9730                 :     }
    9731                 :     OGRFeatureShadow_GetFieldAsDateTime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    9732               1 :     if ( bUseExceptions ) {
    9733               0 :       CPLErr eclass = CPLGetLastErrorType();
    9734               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9735               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9736                 :       }
    9737                 :     }
    9738                 :   }
    9739               1 :   resultobj = SWIG_Py_Void();
    9740               2 :   if (SWIG_IsTmpObj(res3)) {
    9741               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
    9742                 :   } else {
    9743               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    9744               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
    9745                 :   }
    9746               2 :   if (SWIG_IsTmpObj(res4)) {
    9747               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
    9748                 :   } else {
    9749               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    9750               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
    9751                 :   }
    9752               2 :   if (SWIG_IsTmpObj(res5)) {
    9753               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
    9754                 :   } else {
    9755               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    9756               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
    9757                 :   }
    9758               2 :   if (SWIG_IsTmpObj(res6)) {
    9759               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
    9760                 :   } else {
    9761               0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    9762               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
    9763                 :   }
    9764               2 :   if (SWIG_IsTmpObj(res7)) {
    9765               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
    9766                 :   } else {
    9767               0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    9768               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
    9769                 :   }
    9770               2 :   if (SWIG_IsTmpObj(res8)) {
    9771               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8)));
    9772                 :   } else {
    9773               0 :     int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    9774               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags));
    9775                 :   }
    9776               2 :   if (SWIG_IsTmpObj(res9)) {
    9777               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9)));
    9778                 :   } else {
    9779               0 :     int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    9780               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags));
    9781                 :   }
    9782               1 :   return resultobj;
    9783                 : fail:
    9784               0 :   return NULL;
    9785                 : }
    9786                 : 
    9787                 : 
    9788               6 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9789               6 :   PyObject *resultobj = 0;
    9790               6 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9791                 :   int arg2 ;
    9792               6 :   int *arg3 = (int *) 0 ;
    9793               6 :   int **arg4 = (int **) 0 ;
    9794               6 :   void *argp1 = 0 ;
    9795               6 :   int res1 = 0 ;
    9796                 :   int val2 ;
    9797               6 :   int ecode2 = 0 ;
    9798                 :   int nLen3 ;
    9799                 :   int *pList3 ;
    9800               6 :   PyObject * obj0 = 0 ;
    9801               6 :   PyObject * obj1 = 0 ;
    9802                 :   
    9803                 :   {
    9804                 :     /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
    9805               6 :     arg3 = &nLen3;
    9806               6 :     arg4 = &pList3;
    9807                 :   }
    9808               6 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsIntegerList",&obj0,&obj1)) SWIG_fail;
    9809               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9810               6 :   if (!SWIG_IsOK(res1)) {
    9811               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9812                 :   }
    9813               6 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9814               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9815               6 :   if (!SWIG_IsOK(ecode2)) {
    9816               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "2"" of type '" "int""'");
    9817                 :   } 
    9818               6 :   arg2 = static_cast< int >(val2);
    9819                 :   {
    9820               6 :     if ( bUseExceptions ) {
    9821               0 :       CPLErrorReset();
    9822                 :     }
    9823                 :     OGRFeatureShadow_GetFieldAsIntegerList(arg1,arg2,arg3,(int const **)arg4);
    9824               6 :     if ( bUseExceptions ) {
    9825               0 :       CPLErr eclass = CPLGetLastErrorType();
    9826               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9827               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9828                 :       }
    9829                 :     }
    9830                 :   }
    9831               6 :   resultobj = SWIG_Py_Void();
    9832                 :   {
    9833                 :     /* %typemap(argout) (int *nLen, const int **pList ) */
    9834               6 :     Py_DECREF(resultobj);
    9835               6 :     PyObject *out = PyList_New( *arg3 );
    9836              17 :     for( int i=0; i<*arg3; i++ ) {
    9837              11 :       PyObject *val = PyInt_FromLong( (*arg4)[i] );
    9838              11 :       PyList_SetItem( out, i, val );
    9839                 :     }
    9840               6 :     resultobj = out;
    9841                 :   }
    9842               6 :   return resultobj;
    9843                 : fail:
    9844               0 :   return NULL;
    9845                 : }
    9846                 : 
    9847                 : 
    9848              19 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9849              19 :   PyObject *resultobj = 0;
    9850              19 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9851                 :   int arg2 ;
    9852              19 :   int *arg3 = (int *) 0 ;
    9853              19 :   double **arg4 = (double **) 0 ;
    9854              19 :   void *argp1 = 0 ;
    9855              19 :   int res1 = 0 ;
    9856                 :   int val2 ;
    9857              19 :   int ecode2 = 0 ;
    9858                 :   int nLen3 ;
    9859                 :   double *pList3 ;
    9860              19 :   PyObject * obj0 = 0 ;
    9861              19 :   PyObject * obj1 = 0 ;
    9862                 :   
    9863                 :   {
    9864                 :     /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
    9865              19 :     arg3 = &nLen3;
    9866              19 :     arg4 = &pList3;
    9867                 :   }
    9868              19 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDoubleList",&obj0,&obj1)) SWIG_fail;
    9869              19 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9870              19 :   if (!SWIG_IsOK(res1)) {
    9871               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9872                 :   }
    9873              19 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9874              19 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9875              19 :   if (!SWIG_IsOK(ecode2)) {
    9876               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "2"" of type '" "int""'");
    9877                 :   } 
    9878              19 :   arg2 = static_cast< int >(val2);
    9879                 :   {
    9880              19 :     if ( bUseExceptions ) {
    9881               0 :       CPLErrorReset();
    9882                 :     }
    9883                 :     OGRFeatureShadow_GetFieldAsDoubleList(arg1,arg2,arg3,(double const **)arg4);
    9884              19 :     if ( bUseExceptions ) {
    9885               0 :       CPLErr eclass = CPLGetLastErrorType();
    9886               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9887               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9888                 :       }
    9889                 :     }
    9890                 :   }
    9891              19 :   resultobj = SWIG_Py_Void();
    9892                 :   {
    9893                 :     /* %typemap(argout) (int *nLen, const double **pList ) */
    9894              19 :     Py_DECREF(resultobj);
    9895              19 :     PyObject *out = PyList_New( *arg3 );
    9896              57 :     for( int i=0; i<*arg3; i++ ) {
    9897              38 :       PyObject *val = PyFloat_FromDouble( (*arg4)[i] );
    9898              38 :       PyList_SetItem( out, i, val );
    9899                 :     }
    9900              19 :     resultobj = out;
    9901                 :   }
    9902              19 :   return resultobj;
    9903                 : fail:
    9904               0 :   return NULL;
    9905                 : }
    9906                 : 
    9907                 : 
    9908               3 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9909               3 :   PyObject *resultobj = 0;
    9910               3 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9911                 :   int arg2 ;
    9912               3 :   void *argp1 = 0 ;
    9913               3 :   int res1 = 0 ;
    9914                 :   int val2 ;
    9915               3 :   int ecode2 = 0 ;
    9916               3 :   PyObject * obj0 = 0 ;
    9917               3 :   PyObject * obj1 = 0 ;
    9918               3 :   char **result = 0 ;
    9919                 :   
    9920               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsStringList",&obj0,&obj1)) SWIG_fail;
    9921               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9922               3 :   if (!SWIG_IsOK(res1)) {
    9923               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9924                 :   }
    9925               3 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9926               3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9927               3 :   if (!SWIG_IsOK(ecode2)) {
    9928               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsStringList" "', argument " "2"" of type '" "int""'");
    9929                 :   } 
    9930               3 :   arg2 = static_cast< int >(val2);
    9931                 :   {
    9932               3 :     if ( bUseExceptions ) {
    9933               0 :       CPLErrorReset();
    9934                 :     }
    9935               3 :     result = (char **)OGRFeatureShadow_GetFieldAsStringList(arg1,arg2);
    9936               3 :     if ( bUseExceptions ) {
    9937               0 :       CPLErr eclass = CPLGetLastErrorType();
    9938               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9939               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9940                 :       }
    9941                 :     }
    9942                 :   }
    9943                 :   {
    9944                 :     /* %typemap(out) char **options -> ( string ) */
    9945               3 :     char **stringarray = result;
    9946               3 :     if ( stringarray == NULL ) {
    9947               0 :       resultobj = Py_None;
    9948               0 :       Py_INCREF( resultobj );
    9949                 :     }
    9950                 :     else {
    9951               3 :       int len = CSLCount( stringarray );
    9952               3 :       resultobj = PyList_New( len );
    9953               9 :       for ( int i = 0; i < len; ++i ) {
    9954               6 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    9955               6 :         PyList_SetItem(resultobj, i, o );
    9956                 :       }
    9957                 :     }
    9958                 :   }
    9959               3 :   return resultobj;
    9960                 : fail:
    9961               0 :   return NULL;
    9962                 : }
    9963                 : 
    9964                 : 
    9965            4806 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9966            4806 :   PyObject *resultobj = 0;
    9967            4806 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9968                 :   int arg2 ;
    9969            4806 :   void *argp1 = 0 ;
    9970            4806 :   int res1 = 0 ;
    9971                 :   int val2 ;
    9972            4806 :   int ecode2 = 0 ;
    9973            4806 :   PyObject * obj0 = 0 ;
    9974            4806 :   PyObject * obj1 = 0 ;
    9975                 :   bool result;
    9976                 :   
    9977            4806 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldSet",&obj0,&obj1)) SWIG_fail;
    9978            4806 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9979            4806 :   if (!SWIG_IsOK(res1)) {
    9980               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9981                 :   }
    9982            4806 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9983            4806 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9984            4806 :   if (!SWIG_IsOK(ecode2)) {
    9985               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "int""'");
    9986                 :   } 
    9987            4806 :   arg2 = static_cast< int >(val2);
    9988                 :   {
    9989            4806 :     if ( bUseExceptions ) {
    9990               0 :       CPLErrorReset();
    9991                 :     }
    9992            4806 :     result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
    9993            4806 :     if ( bUseExceptions ) {
    9994               0 :       CPLErr eclass = CPLGetLastErrorType();
    9995               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9996               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9997                 :       }
    9998                 :     }
    9999                 :   }
   10000            4806 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   10001            4806 :   return resultobj;
   10002                 : fail:
   10003               0 :   return NULL;
   10004                 : }
   10005                 : 
   10006                 : 
   10007              61 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10008              61 :   PyObject *resultobj = 0;
   10009              61 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10010              61 :   char *arg2 = (char *) 0 ;
   10011              61 :   void *argp1 = 0 ;
   10012              61 :   int res1 = 0 ;
   10013                 :   int res2 ;
   10014              61 :   char *buf2 = 0 ;
   10015              61 :   int alloc2 = 0 ;
   10016              61 :   PyObject * obj0 = 0 ;
   10017              61 :   PyObject * obj1 = 0 ;
   10018                 :   bool result;
   10019                 :   
   10020              61 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldSet",&obj0,&obj1)) SWIG_fail;
   10021              61 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10022              61 :   if (!SWIG_IsOK(res1)) {
   10023               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10024                 :   }
   10025              61 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10026              61 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10027              61 :   if (!SWIG_IsOK(res2)) {
   10028               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "char const *""'");
   10029                 :   }
   10030              61 :   arg2 = reinterpret_cast< char * >(buf2);
   10031                 :   {
   10032              61 :     if (!arg2) {
   10033               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10034                 :     }
   10035                 :   }
   10036                 :   {
   10037              61 :     if ( bUseExceptions ) {
   10038               0 :       CPLErrorReset();
   10039                 :     }
   10040              61 :     result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
   10041              61 :     if ( bUseExceptions ) {
   10042               0 :       CPLErr eclass = CPLGetLastErrorType();
   10043               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10044               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10045                 :       }
   10046                 :     }
   10047                 :   }
   10048              61 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   10049              61 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10050              61 :   return resultobj;
   10051                 : fail:
   10052               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10053               0 :   return NULL;
   10054                 : }
   10055                 : 
   10056                 : 
   10057            4867 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet(PyObject *self, PyObject *args) {
   10058                 :   int argc;
   10059                 :   PyObject *argv[3];
   10060                 :   int ii;
   10061                 :   
   10062            4867 :   if (!PyTuple_Check(args)) SWIG_fail;
   10063            4867 :   argc = (int)PyObject_Length(args);
   10064           14601 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
   10065            9734 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
   10066                 :   }
   10067            4867 :   if (argc == 2) {
   10068                 :     int _v;
   10069            4867 :     void *vptr = 0;
   10070            4867 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   10071            4867 :     _v = SWIG_CheckState(res);
   10072            4867 :     if (_v) {
   10073                 :       {
   10074            4867 :         int res = SWIG_AsVal_int(argv[1], NULL);
   10075            4867 :         _v = SWIG_CheckState(res);
   10076                 :       }
   10077            4867 :       if (_v) {
   10078            4806 :         return _wrap_Feature_IsFieldSet__SWIG_0(self, args);
   10079                 :       }
   10080                 :     }
   10081                 :   }
   10082              61 :   if (argc == 2) {
   10083                 :     int _v;
   10084              61 :     void *vptr = 0;
   10085              61 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   10086              61 :     _v = SWIG_CheckState(res);
   10087              61 :     if (_v) {
   10088              61 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   10089              61 :       _v = SWIG_CheckState(res);
   10090              61 :       if (_v) {
   10091              61 :         return _wrap_Feature_IsFieldSet__SWIG_1(self, args);
   10092                 :       }
   10093                 :     }
   10094                 :   }
   10095                 :   
   10096                 : fail:
   10097                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_IsFieldSet'.\n"
   10098                 :     "  Possible C/C++ prototypes are:\n"
   10099                 :     "    IsFieldSet(OGRFeatureShadow *,int)\n"
   10100               0 :     "    IsFieldSet(OGRFeatureShadow *,char const *)\n");
   10101               0 :   return NULL;
   10102                 : }
   10103                 : 
   10104                 : 
   10105            2833 : SWIGINTERN PyObject *_wrap_Feature_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10106            2833 :   PyObject *resultobj = 0;
   10107            2833 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10108            2833 :   char *arg2 = (char *) 0 ;
   10109            2833 :   void *argp1 = 0 ;
   10110            2833 :   int res1 = 0 ;
   10111                 :   int res2 ;
   10112            2833 :   char *buf2 = 0 ;
   10113            2833 :   int alloc2 = 0 ;
   10114            2833 :   PyObject * obj0 = 0 ;
   10115            2833 :   PyObject * obj1 = 0 ;
   10116                 :   int result;
   10117                 :   
   10118            2833 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldIndex",&obj0,&obj1)) SWIG_fail;
   10119            2833 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10120            2833 :   if (!SWIG_IsOK(res1)) {
   10121               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10122                 :   }
   10123            2833 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10124            2833 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10125            2833 :   if (!SWIG_IsOK(res2)) {
   10126               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldIndex" "', argument " "2"" of type '" "char const *""'");
   10127                 :   }
   10128            2833 :   arg2 = reinterpret_cast< char * >(buf2);
   10129                 :   {
   10130            2833 :     if (!arg2) {
   10131               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10132                 :     }
   10133                 :   }
   10134                 :   {
   10135            2833 :     if ( bUseExceptions ) {
   10136               0 :       CPLErrorReset();
   10137                 :     }
   10138            2833 :     result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
   10139            2833 :     if ( bUseExceptions ) {
   10140               0 :       CPLErr eclass = CPLGetLastErrorType();
   10141               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10142               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10143                 :       }
   10144                 :     }
   10145                 :   }
   10146            2833 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10147            2833 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10148            2833 :   return resultobj;
   10149                 : fail:
   10150               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10151               0 :   return NULL;
   10152                 : }
   10153                 : 
   10154                 : 
   10155             349 : SWIGINTERN PyObject *_wrap_Feature_GetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10156             349 :   PyObject *resultobj = 0;
   10157             349 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10158             349 :   void *argp1 = 0 ;
   10159             349 :   int res1 = 0 ;
   10160             349 :   PyObject * obj0 = 0 ;
   10161                 :   int result;
   10162                 :   
   10163             349 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetFID",&obj0)) SWIG_fail;
   10164             349 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10165             349 :   if (!SWIG_IsOK(res1)) {
   10166               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10167                 :   }
   10168             349 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10169                 :   {
   10170             349 :     if ( bUseExceptions ) {
   10171               0 :       CPLErrorReset();
   10172                 :     }
   10173             349 :     result = (int)OGRFeatureShadow_GetFID(arg1);
   10174             349 :     if ( bUseExceptions ) {
   10175               0 :       CPLErr eclass = CPLGetLastErrorType();
   10176               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10177               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10178                 :       }
   10179                 :     }
   10180                 :   }
   10181             349 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10182             349 :   return resultobj;
   10183                 : fail:
   10184               0 :   return NULL;
   10185                 : }
   10186                 : 
   10187                 : 
   10188              52 : SWIGINTERN PyObject *_wrap_Feature_SetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10189              52 :   PyObject *resultobj = 0;
   10190              52 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10191                 :   int arg2 ;
   10192              52 :   void *argp1 = 0 ;
   10193              52 :   int res1 = 0 ;
   10194                 :   int val2 ;
   10195              52 :   int ecode2 = 0 ;
   10196              52 :   PyObject * obj0 = 0 ;
   10197              52 :   PyObject * obj1 = 0 ;
   10198                 :   OGRErr result;
   10199                 :   
   10200              52 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetFID",&obj0,&obj1)) SWIG_fail;
   10201              52 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10202              52 :   if (!SWIG_IsOK(res1)) {
   10203               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10204                 :   }
   10205              52 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10206              52 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   10207              52 :   if (!SWIG_IsOK(ecode2)) {
   10208               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFID" "', argument " "2"" of type '" "int""'");
   10209                 :   } 
   10210              52 :   arg2 = static_cast< int >(val2);
   10211                 :   {
   10212              52 :     if ( bUseExceptions ) {
   10213               0 :       CPLErrorReset();
   10214                 :     }
   10215              52 :     result = (OGRErr)OGRFeatureShadow_SetFID(arg1,arg2);
   10216              52 :     if ( bUseExceptions ) {
   10217               0 :       CPLErr eclass = CPLGetLastErrorType();
   10218               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10219               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10220                 :       }
   10221                 :     }
   10222                 :   }
   10223                 :   {
   10224                 :     /* %typemap(out) OGRErr */
   10225              52 :     if ( result != 0 && bUseExceptions) {
   10226               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   10227               0 :       SWIG_fail;
   10228                 :     }
   10229                 :   }
   10230                 :   {
   10231                 :     /* %typemap(ret) OGRErr */
   10232              52 :     if (resultobj == Py_None ) {
   10233               0 :       Py_DECREF(resultobj);
   10234               0 :       resultobj = 0;
   10235                 :     }
   10236              52 :     if (resultobj == 0) {
   10237              52 :       resultobj = PyInt_FromLong( result );
   10238                 :     }
   10239                 :   }
   10240              52 :   return resultobj;
   10241                 : fail:
   10242               0 :   return NULL;
   10243                 : }
   10244                 : 
   10245                 : 
   10246               0 : SWIGINTERN PyObject *_wrap_Feature_DumpReadable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10247               0 :   PyObject *resultobj = 0;
   10248               0 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10249               0 :   void *argp1 = 0 ;
   10250               0 :   int res1 = 0 ;
   10251               0 :   PyObject * obj0 = 0 ;
   10252                 :   
   10253               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_DumpReadable",&obj0)) SWIG_fail;
   10254               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10255               0 :   if (!SWIG_IsOK(res1)) {
   10256               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_DumpReadable" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10257                 :   }
   10258               0 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10259                 :   {
   10260               0 :     if ( bUseExceptions ) {
   10261               0 :       CPLErrorReset();
   10262                 :     }
   10263                 :     OGRFeatureShadow_DumpReadable(arg1);
   10264               0 :     if ( bUseExceptions ) {
   10265               0 :       CPLErr eclass = CPLGetLastErrorType();
   10266               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10267               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10268                 :       }
   10269                 :     }
   10270                 :   }
   10271               0 :   resultobj = SWIG_Py_Void();
   10272               0 :   return resultobj;
   10273                 : fail:
   10274               0 :   return NULL;
   10275                 : }
   10276                 : 
   10277                 : 
   10278               0 : SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10279               0 :   PyObject *resultobj = 0;
   10280               0 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10281                 :   int arg2 ;
   10282               0 :   void *argp1 = 0 ;
   10283               0 :   int res1 = 0 ;
   10284                 :   int val2 ;
   10285               0 :   int ecode2 = 0 ;
   10286               0 :   PyObject * obj0 = 0 ;
   10287               0 :   PyObject * obj1 = 0 ;
   10288                 :   
   10289               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_UnsetField",&obj0,&obj1)) SWIG_fail;
   10290               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10291               0 :   if (!SWIG_IsOK(res1)) {
   10292               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10293                 :   }
   10294               0 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10295               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   10296               0 :   if (!SWIG_IsOK(ecode2)) {
   10297               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "int""'");
   10298                 :   } 
   10299               0 :   arg2 = static_cast< int >(val2);
   10300                 :   {
   10301               0 :     if ( bUseExceptions ) {
   10302               0 :       CPLErrorReset();
   10303                 :     }
   10304                 :     OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
   10305               0 :     if ( bUseExceptions ) {
   10306               0 :       CPLErr eclass = CPLGetLastErrorType();
   10307               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10308               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10309                 :       }
   10310                 :     }
   10311                 :   }
   10312               0 :   resultobj = SWIG_Py_Void();
   10313               0 :   return resultobj;
   10314                 : fail:
   10315               0 :   return NULL;
   10316                 : }
   10317                 : 
   10318                 : 
   10319               1 : SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10320               1 :   PyObject *resultobj = 0;
   10321               1 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10322               1 :   char *arg2 = (char *) 0 ;
   10323               1 :   void *argp1 = 0 ;
   10324               1 :   int res1 = 0 ;
   10325                 :   int res2 ;
   10326               1 :   char *buf2 = 0 ;
   10327               1 :   int alloc2 = 0 ;
   10328               1 :   PyObject * obj0 = 0 ;
   10329               1 :   PyObject * obj1 = 0 ;
   10330                 :   
   10331               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_UnsetField",&obj0,&obj1)) SWIG_fail;
   10332               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10333               1 :   if (!SWIG_IsOK(res1)) {
   10334               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10335                 :   }
   10336               1 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10337               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10338               1 :   if (!SWIG_IsOK(res2)) {
   10339               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "char const *""'");
   10340                 :   }
   10341               1 :   arg2 = reinterpret_cast< char * >(buf2);
   10342                 :   {
   10343               1 :     if (!arg2) {
   10344               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10345                 :     }
   10346                 :   }
   10347                 :   {
   10348               1 :     if ( bUseExceptions ) {
   10349               0 :       CPLErrorReset();
   10350                 :     }
   10351                 :     OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
   10352               1 :     if ( bUseExceptions ) {
   10353               0 :       CPLErr eclass = CPLGetLastErrorType();
   10354               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10355               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10356                 :       }
   10357                 :     }
   10358                 :   }
   10359               1 :   resultobj = SWIG_Py_Void();
   10360               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10361               1 :   return resultobj;
   10362                 : fail:
   10363               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10364               0 :   return NULL;
   10365                 : }
   10366                 : 
   10367                 : 
   10368               1 : SWIGINTERN PyObject *_wrap_Feature_UnsetField(PyObject *self, PyObject *args) {
   10369                 :   int argc;
   10370                 :   PyObject *argv[3];
   10371                 :   int ii;
   10372                 :   
   10373               1 :   if (!PyTuple_Check(args)) SWIG_fail;
   10374               1 :   argc = (int)PyObject_Length(args);
   10375               3 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
   10376               2 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
   10377                 :   }
   10378               1 :   if (argc == 2) {
   10379                 :     int _v;
   10380               1 :     void *vptr = 0;
   10381               1 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   10382               1 :     _v = SWIG_CheckState(res);
   10383               1 :     if (_v) {
   10384                 :       {
   10385               1 :         int res = SWIG_AsVal_int(argv[1], NULL);
   10386               1 :         _v = SWIG_CheckState(res);
   10387                 :       }
   10388               1 :       if (_v) {
   10389               0 :         return _wrap_Feature_UnsetField__SWIG_0(self, args);
   10390                 :       }
   10391                 :     }
   10392                 :   }
   10393               1 :   if (argc == 2) {
   10394                 :     int _v;
   10395               1 :     void *vptr = 0;
   10396               1 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   10397               1 :     _v = SWIG_CheckState(res);
   10398               1 :     if (_v) {
   10399               1 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   10400               1 :       _v = SWIG_CheckState(res);
   10401               1 :       if (_v) {
   10402               1 :         return _wrap_Feature_UnsetField__SWIG_1(self, args);
   10403                 :       }
   10404                 :     }
   10405                 :   }
   10406                 :   
   10407                 : fail:
   10408                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_UnsetField'.\n"
   10409                 :     "  Possible C/C++ prototypes are:\n"
   10410                 :     "    UnsetField(OGRFeatureShadow *,int)\n"
   10411               0 :     "    UnsetField(OGRFeatureShadow *,char const *)\n");
   10412               0 :   return NULL;
   10413                 : }
   10414                 : 
   10415                 : 
   10416            3278 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10417            3278 :   PyObject *resultobj = 0;
   10418            3278 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10419                 :   int arg2 ;
   10420            3278 :   char *arg3 = (char *) 0 ;
   10421            3278 :   void *argp1 = 0 ;
   10422            3278 :   int res1 = 0 ;
   10423                 :   int val2 ;
   10424            3278 :   int ecode2 = 0 ;
   10425            3278 :   PyObject *str3 = 0 ;
   10426            3278 :   int bToFree3 = 0 ;
   10427            3278 :   PyObject * obj0 = 0 ;
   10428            3278 :   PyObject * obj1 = 0 ;
   10429            3278 :   PyObject * obj2 = 0 ;
   10430                 :   
   10431            3278 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
   10432            3278 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10433            3278 :   if (!SWIG_IsOK(res1)) {
   10434               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10435                 :   }
   10436            3278 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10437            3278 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   10438            3278 :   if (!SWIG_IsOK(ecode2)) {
   10439               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
   10440                 :   } 
   10441            3278 :   arg2 = static_cast< int >(val2);
   10442                 :   {
   10443                 :     /* %typemap(in) (tostring argin) */
   10444            3278 :     str3 = PyObject_Str( obj2 );
   10445            3278 :     if ( str3 == 0 ) {
   10446               0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   10447               0 :       SWIG_fail;
   10448                 :     }
   10449                 :     
   10450            3278 :     arg3 = GDALPythonObjectToCStr(str3, &bToFree3); 
   10451                 :   }
   10452                 :   {
   10453            3278 :     if ( bUseExceptions ) {
   10454               0 :       CPLErrorReset();
   10455                 :     }
   10456                 :     OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
   10457            3278 :     if ( bUseExceptions ) {
   10458               0 :       CPLErr eclass = CPLGetLastErrorType();
   10459               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10460               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10461                 :       }
   10462                 :     }
   10463                 :   }
   10464            3278 :   resultobj = SWIG_Py_Void();
   10465                 :   {
   10466                 :     /* %typemap(freearg) (tostring argin) */
   10467            3278 :     if ( str3 != NULL)
   10468                 :     {
   10469            3278 :       Py_DECREF(str3);
   10470                 :     }
   10471            3278 :     GDALPythonFreeCStr(arg3, bToFree3);
   10472                 :   }
   10473            3278 :   return resultobj;
   10474                 : fail:
   10475                 :   {
   10476                 :     /* %typemap(freearg) (tostring argin) */
   10477               0 :     if ( str3 != NULL)
   10478                 :     {
   10479               0 :       Py_DECREF(str3);
   10480                 :     }
   10481               0 :     GDALPythonFreeCStr(arg3, bToFree3);
   10482                 :   }
   10483               0 :   return NULL;
   10484                 : }
   10485                 : 
   10486                 : 
   10487             435 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10488             435 :   PyObject *resultobj = 0;
   10489             435 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10490             435 :   char *arg2 = (char *) 0 ;
   10491             435 :   char *arg3 = (char *) 0 ;
   10492             435 :   void *argp1 = 0 ;
   10493             435 :   int res1 = 0 ;
   10494                 :   int res2 ;
   10495             435 :   char *buf2 = 0 ;
   10496             435 :   int alloc2 = 0 ;
   10497             435 :   PyObject *str3 = 0 ;
   10498             435 :   int bToFree3 = 0 ;
   10499             435 :   PyObject * obj0 = 0 ;
   10500             435 :   PyObject * obj1 = 0 ;
   10501             435 :   PyObject * obj2 = 0 ;
   10502                 :   
   10503             435 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
   10504             435 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10505             435 :   if (!SWIG_IsOK(res1)) {
   10506               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10507                 :   }
   10508             435 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10509             435 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10510             435 :   if (!SWIG_IsOK(res2)) {
   10511               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
   10512                 :   }
   10513             435 :   arg2 = reinterpret_cast< char * >(buf2);
   10514                 :   {
   10515                 :     /* %typemap(in) (tostring argin) */
   10516             435 :     str3 = PyObject_Str( obj2 );
   10517             435 :     if ( str3 == 0 ) {
   10518               0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   10519               0 :       SWIG_fail;
   10520                 :     }
   10521                 :     
   10522             435 :     arg3 = GDALPythonObjectToCStr(str3, &bToFree3); 
   10523                 :   }
   10524                 :   {
   10525             435 :     if (!arg2) {
   10526               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10527                 :     }
   10528                 :   }
   10529                 :   {
   10530             435 :     if ( bUseExceptions ) {
   10531               0 :       CPLErrorReset();
   10532                 :     }
   10533                 :     OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
   10534             435 :     if ( bUseExceptions ) {
   10535               0 :       CPLErr eclass = CPLGetLastErrorType();
   10536               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10537               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10538                 :       }
   10539                 :     }
   10540                 :   }
   10541             435 :   resultobj = SWIG_Py_Void();
   10542             435 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10543                 :   {
   10544                 :     /* %typemap(freearg) (tostring argin) */
   10545             435 :     if ( str3 != NULL)
   10546                 :     {
   10547             435 :       Py_DECREF(str3);
   10548                 :     }
   10549             435 :     GDALPythonFreeCStr(arg3, bToFree3);
   10550                 :   }
   10551             435 :   return resultobj;
   10552                 : fail:
   10553               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10554                 :   {
   10555                 :     /* %typemap(freearg) (tostring argin) */
   10556               0 :     if ( str3 != NULL)
   10557                 :     {
   10558               0 :       Py_DECREF(str3);
   10559                 :     }
   10560               0 :     GDALPythonFreeCStr(arg3, bToFree3);
   10561                 :   }
   10562               0 :   return NULL;
   10563                 : }
   10564                 : 
   10565                 : 
   10566            9273 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10567            9273 :   PyObject *resultobj = 0;
   10568            9273 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10569                 :   int arg2 ;
   10570                 :   int arg3 ;
   10571            9273 :   void *argp1 = 0 ;
   10572            9273 :   int res1 = 0 ;
   10573                 :   int val2 ;
   10574            9273 :   int ecode2 = 0 ;
   10575                 :   int val3 ;
   10576            9273 :   int ecode3 = 0 ;
   10577            9273 :   PyObject * obj0 = 0 ;
   10578            9273 :   PyObject * obj1 = 0 ;
   10579            9273 :   PyObject * obj2 = 0 ;
   10580                 :   
   10581            9273 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
   10582            9273 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10583            9273 :   if (!SWIG_IsOK(res1)) {
   10584               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10585                 :   }
   10586            9273 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10587            9273 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   10588            9273 :   if (!SWIG_IsOK(ecode2)) {
   10589               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
   10590                 :   } 
   10591            9273 :   arg2 = static_cast< int >(val2);
   10592            9273 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   10593            9273 :   if (!SWIG_IsOK(ecode3)) {
   10594               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
   10595                 :   } 
   10596            9273 :   arg3 = static_cast< int >(val3);
   10597                 :   {
   10598            9273 :     if ( bUseExceptions ) {
   10599               0 :       CPLErrorReset();
   10600                 :     }
   10601                 :     OGRFeatureShadow_SetField__SWIG_2(arg1,arg2,arg3);
   10602            9273 :     if ( bUseExceptions ) {
   10603               0 :       CPLErr eclass = CPLGetLastErrorType();
   10604               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10605               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10606                 :       }
   10607                 :     }
   10608                 :   }
   10609            9273 :   resultobj = SWIG_Py_Void();
   10610            9273 :   return resultobj;
   10611                 : fail:
   10612               0 :   return NULL;
   10613                 : }
   10614                 : 
   10615                 : 
   10616             260 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10617             260 :   PyObject *resultobj = 0;
   10618             260 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10619             260 :   char *arg2 = (char *) 0 ;
   10620                 :   int arg3 ;
   10621             260 :   void *argp1 = 0 ;
   10622             260 :   int res1 = 0 ;
   10623                 :   int res2 ;
   10624             260 :   char *buf2 = 0 ;
   10625             260 :   int alloc2 = 0 ;
   10626                 :   int val3 ;
   10627             260 :   int ecode3 = 0 ;
   10628             260 :   PyObject * obj0 = 0 ;
   10629             260 :   PyObject * obj1 = 0 ;
   10630             260 :   PyObject * obj2 = 0 ;
   10631                 :   
   10632             260 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
   10633             260 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10634             260 :   if (!SWIG_IsOK(res1)) {
   10635               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10636                 :   }
   10637             260 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10638             260 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10639             260 :   if (!SWIG_IsOK(res2)) {
   10640               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
   10641                 :   }
   10642             260 :   arg2 = reinterpret_cast< char * >(buf2);
   10643             260 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   10644             260 :   if (!SWIG_IsOK(ecode3)) {
   10645               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
   10646                 :   } 
   10647             260 :   arg3 = static_cast< int >(val3);
   10648                 :   {
   10649             260 :     if (!arg2) {
   10650               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10651                 :     }
   10652                 :   }
   10653                 :   {
   10654             260 :     if ( bUseExceptions ) {
   10655               0 :       CPLErrorReset();
   10656                 :     }
   10657                 :     OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
   10658             260 :     if ( bUseExceptions ) {
   10659               0 :       CPLErr eclass = CPLGetLastErrorType();
   10660               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10661               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10662                 :       }
   10663                 :     }
   10664                 :   }
   10665             260 :   resultobj = SWIG_Py_Void();
   10666             260 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10667             260 :   return resultobj;
   10668                 : fail:
   10669               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10670               0 :   return NULL;
   10671                 : }
   10672                 : 
   10673                 : 
   10674               9 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10675               9 :   PyObject *resultobj = 0;
   10676               9 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10677                 :   int arg2 ;
   10678                 :   double arg3 ;
   10679               9 :   void *argp1 = 0 ;
   10680               9 :   int res1 = 0 ;
   10681                 :   int val2 ;
   10682               9 :   int ecode2 = 0 ;
   10683                 :   double val3 ;
   10684               9 :   int ecode3 = 0 ;
   10685               9 :   PyObject * obj0 = 0 ;
   10686               9 :   PyObject * obj1 = 0 ;
   10687               9 :   PyObject * obj2 = 0 ;
   10688                 :   
   10689               9 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
   10690               9 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10691               9 :   if (!SWIG_IsOK(res1)) {
   10692               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10693                 :   }
   10694               9 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10695               9 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   10696               9 :   if (!SWIG_IsOK(ecode2)) {
   10697               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
   10698                 :   } 
   10699               9 :   arg2 = static_cast< int >(val2);
   10700               9 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   10701               9 :   if (!SWIG_IsOK(ecode3)) {
   10702               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
   10703                 :   } 
   10704               9 :   arg3 = static_cast< double >(val3);
   10705                 :   {
   10706               9 :     if ( bUseExceptions ) {
   10707               0 :       CPLErrorReset();
   10708                 :     }
   10709                 :     OGRFeatureShadow_SetField__SWIG_4(arg1,arg2,arg3);
   10710               9 :     if ( bUseExceptions ) {
   10711               0 :       CPLErr eclass = CPLGetLastErrorType();
   10712               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10713               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10714                 :       }
   10715                 :     }
   10716                 :   }
   10717               9 :   resultobj = SWIG_Py_Void();
   10718               9 :   return resultobj;
   10719                 : fail:
   10720               0 :   return NULL;
   10721                 : }
   10722                 : 
   10723                 : 
   10724             144 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10725             144 :   PyObject *resultobj = 0;
   10726             144 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10727             144 :   char *arg2 = (char *) 0 ;
   10728                 :   double arg3 ;
   10729             144 :   void *argp1 = 0 ;
   10730             144 :   int res1 = 0 ;
   10731                 :   int res2 ;
   10732             144 :   char *buf2 = 0 ;
   10733             144 :   int alloc2 = 0 ;
   10734                 :   double val3 ;
   10735             144 :   int ecode3 = 0 ;
   10736             144 :   PyObject * obj0 = 0 ;
   10737             144 :   PyObject * obj1 = 0 ;
   10738             144 :   PyObject * obj2 = 0 ;
   10739                 :   
   10740             144 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
   10741             144 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10742             144 :   if (!SWIG_IsOK(res1)) {
   10743               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10744                 :   }
   10745             144 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10746             144 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10747             144 :   if (!SWIG_IsOK(res2)) {
   10748               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
   10749                 :   }
   10750             144 :   arg2 = reinterpret_cast< char * >(buf2);
   10751             144 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   10752             144 :   if (!SWIG_IsOK(ecode3)) {
   10753               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
   10754                 :   } 
   10755             144 :   arg3 = static_cast< double >(val3);
   10756                 :   {
   10757             144 :     if (!arg2) {
   10758               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10759                 :     }
   10760                 :   }
   10761                 :   {
   10762             144 :     if ( bUseExceptions ) {
   10763               0 :       CPLErrorReset();
   10764                 :     }
   10765                 :     OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3);
   10766             144 :     if ( bUseExceptions ) {
   10767               0 :       CPLErr eclass = CPLGetLastErrorType();
   10768               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10769               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10770                 :       }
   10771                 :     }
   10772                 :   }
   10773             144 :   resultobj = SWIG_Py_Void();
   10774             144 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10775             144 :   return resultobj;
   10776                 : fail:
   10777               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10778               0 :   return NULL;
   10779                 : }
   10780                 : 
   10781                 : 
   10782              24 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10783              24 :   PyObject *resultobj = 0;
   10784              24 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10785                 :   int arg2 ;
   10786                 :   int arg3 ;
   10787                 :   int arg4 ;
   10788                 :   int arg5 ;
   10789                 :   int arg6 ;
   10790                 :   int arg7 ;
   10791                 :   int arg8 ;
   10792                 :   int arg9 ;
   10793              24 :   void *argp1 = 0 ;
   10794              24 :   int res1 = 0 ;
   10795                 :   int val2 ;
   10796              24 :   int ecode2 = 0 ;
   10797                 :   int val3 ;
   10798              24 :   int ecode3 = 0 ;
   10799                 :   int val4 ;
   10800              24 :   int ecode4 = 0 ;
   10801                 :   int val5 ;
   10802              24 :   int ecode5 = 0 ;
   10803                 :   int val6 ;
   10804              24 :   int ecode6 = 0 ;
   10805                 :   int val7 ;
   10806              24 :   int ecode7 = 0 ;
   10807                 :   int val8 ;
   10808              24 :   int ecode8 = 0 ;
   10809                 :   int val9 ;
   10810              24 :   int ecode9 = 0 ;
   10811              24 :   PyObject * obj0 = 0 ;
   10812              24 :   PyObject * obj1 = 0 ;
   10813              24 :   PyObject * obj2 = 0 ;
   10814              24 :   PyObject * obj3 = 0 ;
   10815              24 :   PyObject * obj4 = 0 ;
   10816              24 :   PyObject * obj5 = 0 ;
   10817              24 :   PyObject * obj6 = 0 ;
   10818              24 :   PyObject * obj7 = 0 ;
   10819              24 :   PyObject * obj8 = 0 ;
   10820                 :   
   10821              24 :   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:Feature_SetField",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
   10822              24 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10823              24 :   if (!SWIG_IsOK(res1)) {
   10824               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10825                 :   }
   10826              24 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10827              24 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   10828              24 :   if (!SWIG_IsOK(ecode2)) {
   10829               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
   10830                 :   } 
   10831              24 :   arg2 = static_cast< int >(val2);
   10832              24 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   10833              24 :   if (!SWIG_IsOK(ecode3)) {
   10834               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
   10835                 :   } 
   10836              24 :   arg3 = static_cast< int >(val3);
   10837              24 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   10838              24 :   if (!SWIG_IsOK(ecode4)) {
   10839               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
   10840                 :   } 
   10841              24 :   arg4 = static_cast< int >(val4);
   10842              24 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   10843              24 :   if (!SWIG_IsOK(ecode5)) {
   10844               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
   10845                 :   } 
   10846              24 :   arg5 = static_cast< int >(val5);
   10847              24 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   10848              24 :   if (!SWIG_IsOK(ecode6)) {
   10849               0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
   10850                 :   } 
   10851              24 :   arg6 = static_cast< int >(val6);
   10852              24 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   10853              24 :   if (!SWIG_IsOK(ecode7)) {
   10854               0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
   10855                 :   } 
   10856              24 :   arg7 = static_cast< int >(val7);
   10857              24 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   10858              24 :   if (!SWIG_IsOK(ecode8)) {
   10859               0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "int""'");
   10860                 :   } 
   10861              24 :   arg8 = static_cast< int >(val8);
   10862              24 :   ecode9 = SWIG_AsVal_int(obj8, &val9);
   10863              24 :   if (!SWIG_IsOK(ecode9)) {
   10864               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
   10865                 :   } 
   10866              24 :   arg9 = static_cast< int >(val9);
   10867                 :   {
   10868              24 :     if ( bUseExceptions ) {
   10869               0 :       CPLErrorReset();
   10870                 :     }
   10871                 :     OGRFeatureShadow_SetField__SWIG_6(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   10872              24 :     if ( bUseExceptions ) {
   10873               0 :       CPLErr eclass = CPLGetLastErrorType();
   10874               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10875               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10876                 :       }
   10877                 :     }
   10878                 :   }
   10879              24 :   resultobj = SWIG_Py_Void();
   10880              24 :   return resultobj;
   10881                 : fail:
   10882               0 :   return NULL;
   10883                 : }
   10884                 : 
   10885                 : 
   10886               1 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10887               1 :   PyObject *resultobj = 0;
   10888               1 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10889               1 :   char *arg2 = (char *) 0 ;
   10890                 :   int arg3 ;
   10891                 :   int arg4 ;
   10892                 :   int arg5 ;
   10893                 :   int arg6 ;
   10894                 :   int arg7 ;
   10895                 :   int arg8 ;
   10896                 :   int arg9 ;
   10897               1 :   void *argp1 = 0 ;
   10898               1 :   int res1 = 0 ;
   10899                 :   int res2 ;
   10900               1 :   char *buf2 = 0 ;
   10901               1 :   int alloc2 = 0 ;
   10902                 :   int val3 ;
   10903               1 :   int ecode3 = 0 ;
   10904                 :   int val4 ;
   10905               1 :   int ecode4 = 0 ;
   10906                 :   int val5 ;
   10907               1 :   int ecode5 = 0 ;
   10908                 :   int val6 ;
   10909               1 :   int ecode6 = 0 ;
   10910                 :   int val7 ;
   10911               1 :   int ecode7 = 0 ;
   10912                 :   int val8 ;
   10913               1 :   int ecode8 = 0 ;
   10914                 :   int val9 ;
   10915               1 :   int ecode9 = 0 ;
   10916               1 :   PyObject * obj0 = 0 ;
   10917               1 :   PyObject * obj1 = 0 ;
   10918               1 :   PyObject * obj2 = 0 ;
   10919               1 :   PyObject * obj3 = 0 ;
   10920               1 :   PyObject * obj4 = 0 ;
   10921               1 :   PyObject * obj5 = 0 ;
   10922               1 :   PyObject * obj6 = 0 ;
   10923               1 :   PyObject * obj7 = 0 ;
   10924               1 :   PyObject * obj8 = 0 ;
   10925                 :   
   10926               1 :   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:Feature_SetField",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
   10927               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10928               1 :   if (!SWIG_IsOK(res1)) {
   10929               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10930                 :   }
   10931               1 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10932               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10933               1 :   if (!SWIG_IsOK(res2)) {
   10934               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
   10935                 :   }
   10936               1 :   arg2 = reinterpret_cast< char * >(buf2);
   10937               1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   10938               1 :   if (!SWIG_IsOK(ecode3)) {
   10939               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
   10940                 :   } 
   10941               1 :   arg3 = static_cast< int >(val3);
   10942               1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   10943               1 :   if (!SWIG_IsOK(ecode4)) {
   10944               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
   10945                 :   } 
   10946               1 :   arg4 = static_cast< int >(val4);
   10947               1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   10948               1 :   if (!SWIG_IsOK(ecode5)) {
   10949               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
   10950                 :   } 
   10951               1 :   arg5 = static_cast< int >(val5);
   10952               1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   10953               1 :   if (!SWIG_IsOK(ecode6)) {
   10954               0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
   10955                 :   } 
   10956               1 :   arg6 = static_cast< int >(val6);
   10957               1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   10958               1 :   if (!SWIG_IsOK(ecode7)) {
   10959               0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
   10960                 :   } 
   10961               1 :   arg7 = static_cast< int >(val7);
   10962               1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   10963               1 :   if (!SWIG_IsOK(ecode8)) {
   10964               0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "int""'");
   10965                 :   } 
   10966               1 :   arg8 = static_cast< int >(val8);
   10967               1 :   ecode9 = SWIG_AsVal_int(obj8, &val9);
   10968               1 :   if (!SWIG_IsOK(ecode9)) {
   10969               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
   10970                 :   } 
   10971               1 :   arg9 = static_cast< int >(val9);
   10972                 :   {
   10973               1 :     if (!arg2) {
   10974               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10975                 :     }
   10976                 :   }
   10977                 :   {
   10978               1 :     if ( bUseExceptions ) {
   10979               0 :       CPLErrorReset();
   10980                 :     }
   10981                 :     OGRFeatureShadow_SetField__SWIG_7(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   10982               1 :     if ( bUseExceptions ) {
   10983               0 :       CPLErr eclass = CPLGetLastErrorType();
   10984               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10985               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10986                 :       }
   10987                 :     }
   10988                 :   }
   10989               1 :   resultobj = SWIG_Py_Void();
   10990               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10991               1 :   return resultobj;
   10992                 : fail:
   10993               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10994               0 :   return NULL;
   10995                 : }
   10996                 : 
   10997                 : 
   10998           13424 : SWIGINTERN PyObject *_wrap_Feature_SetField(PyObject *self, PyObject *args) {
   10999                 :   int argc;
   11000                 :   PyObject *argv[10];
   11001                 :   int ii;
   11002                 :   
   11003           13424 :   if (!PyTuple_Check(args)) SWIG_fail;
   11004           13424 :   argc = (int)PyObject_Length(args);
   11005           53846 :   for (ii = 0; (ii < argc) && (ii < 9); ii++) {
   11006           40422 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
   11007                 :   }
   11008           13424 :   if (argc == 3) {
   11009                 :     int _v;
   11010           13399 :     void *vptr = 0;
   11011           13399 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   11012           13399 :     _v = SWIG_CheckState(res);
   11013           13399 :     if (_v) {
   11014                 :       {
   11015           13399 :         int res = SWIG_AsVal_int(argv[1], NULL);
   11016           13399 :         _v = SWIG_CheckState(res);
   11017                 :       }
   11018           13399 :       if (_v) {
   11019                 :         {
   11020           12560 :           int res = SWIG_AsVal_int(argv[2], NULL);
   11021           12560 :           _v = SWIG_CheckState(res);
   11022                 :         }
   11023           12560 :         if (_v) {
   11024            9273 :           return _wrap_Feature_SetField__SWIG_2(self, args);
   11025                 :         }
   11026                 :       }
   11027                 :     }
   11028                 :   }
   11029            4151 :   if (argc == 3) {
   11030                 :     int _v;
   11031            4126 :     void *vptr = 0;
   11032            4126 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   11033            4126 :     _v = SWIG_CheckState(res);
   11034            4126 :     if (_v) {
   11035                 :       {
   11036            4126 :         int res = SWIG_AsVal_int(argv[1], NULL);
   11037            4126 :         _v = SWIG_CheckState(res);
   11038                 :       }
   11039            4126 :       if (_v) {
   11040                 :         {
   11041            3287 :           int res = SWIG_AsVal_double(argv[2], NULL);
   11042            3287 :           _v = SWIG_CheckState(res);
   11043                 :         }
   11044            3287 :         if (_v) {
   11045               9 :           return _wrap_Feature_SetField__SWIG_4(self, args);
   11046                 :         }
   11047                 :       }
   11048                 :     }
   11049                 :   }
   11050            4142 :   if (argc == 3) {
   11051                 :     int _v;
   11052            4117 :     void *vptr = 0;
   11053            4117 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   11054            4117 :     _v = SWIG_CheckState(res);
   11055            4117 :     if (_v) {
   11056                 :       {
   11057            4117 :         int res = SWIG_AsVal_int(argv[1], NULL);
   11058            4117 :         _v = SWIG_CheckState(res);
   11059                 :       }
   11060            4117 :       if (_v) {
   11061            3278 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   11062            3278 :         _v = SWIG_CheckState(res);
   11063            3278 :         if (_v) {
   11064            3278 :           return _wrap_Feature_SetField__SWIG_0(self, args);
   11065                 :         }
   11066                 :       }
   11067                 :     }
   11068                 :   }
   11069             864 :   if (argc == 3) {
   11070                 :     int _v;
   11071             839 :     void *vptr = 0;
   11072             839 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   11073             839 :     _v = SWIG_CheckState(res);
   11074             839 :     if (_v) {
   11075             839 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   11076             839 :       _v = SWIG_CheckState(res);
   11077             839 :       if (_v) {
   11078                 :         {
   11079             839 :           int res = SWIG_AsVal_int(argv[2], NULL);
   11080             839 :           _v = SWIG_CheckState(res);
   11081                 :         }
   11082             839 :         if (_v) {
   11083             260 :           return _wrap_Feature_SetField__SWIG_3(self, args);
   11084                 :         }
   11085                 :       }
   11086                 :     }
   11087                 :   }
   11088             604 :   if (argc == 3) {
   11089                 :     int _v;
   11090             579 :     void *vptr = 0;
   11091             579 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   11092             579 :     _v = SWIG_CheckState(res);
   11093             579 :     if (_v) {
   11094             579 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   11095             579 :       _v = SWIG_CheckState(res);
   11096             579 :       if (_v) {
   11097                 :         {
   11098             579 :           int res = SWIG_AsVal_double(argv[2], NULL);
   11099             579 :           _v = SWIG_CheckState(res);
   11100                 :         }
   11101             579 :         if (_v) {
   11102             144 :           return _wrap_Feature_SetField__SWIG_5(self, args);
   11103                 :         }
   11104                 :       }
   11105                 :     }
   11106                 :   }
   11107             460 :   if (argc == 3) {
   11108                 :     int _v;
   11109             435 :     void *vptr = 0;
   11110             435 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   11111             435 :     _v = SWIG_CheckState(res);
   11112             435 :     if (_v) {
   11113             435 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   11114             435 :       _v = SWIG_CheckState(res);
   11115             435 :       if (_v) {
   11116             435 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   11117             435 :         _v = SWIG_CheckState(res);
   11118             435 :         if (_v) {
   11119             435 :           return _wrap_Feature_SetField__SWIG_1(self, args);
   11120                 :         }
   11121                 :       }
   11122                 :     }
   11123                 :   }
   11124              25 :   if (argc == 9) {
   11125                 :     int _v;
   11126              25 :     void *vptr = 0;
   11127              25 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   11128              25 :     _v = SWIG_CheckState(res);
   11129              25 :     if (_v) {
   11130                 :       {
   11131              25 :         int res = SWIG_AsVal_int(argv[1], NULL);
   11132              25 :         _v = SWIG_CheckState(res);
   11133                 :       }
   11134              25 :       if (_v) {
   11135                 :         {
   11136              24 :           int res = SWIG_AsVal_int(argv[2], NULL);
   11137              24 :           _v = SWIG_CheckState(res);
   11138                 :         }
   11139              24 :         if (_v) {
   11140                 :           {
   11141              24 :             int res = SWIG_AsVal_int(argv[3], NULL);
   11142              24 :             _v = SWIG_CheckState(res);
   11143                 :           }
   11144              24 :           if (_v) {
   11145                 :             {
   11146              24 :               int res = SWIG_AsVal_int(argv[4], NULL);
   11147              24 :               _v = SWIG_CheckState(res);
   11148                 :             }
   11149              24 :             if (_v) {
   11150                 :               {
   11151              24 :                 int res = SWIG_AsVal_int(argv[5], NULL);
   11152              24 :                 _v = SWIG_CheckState(res);
   11153                 :               }
   11154              24 :               if (_v) {
   11155                 :                 {
   11156              24 :                   int res = SWIG_AsVal_int(argv[6], NULL);
   11157              24 :                   _v = SWIG_CheckState(res);
   11158                 :                 }
   11159              24 :                 if (_v) {
   11160                 :                   {
   11161              24 :                     int res = SWIG_AsVal_int(argv[7], NULL);
   11162              24 :                     _v = SWIG_CheckState(res);
   11163                 :                   }
   11164              24 :                   if (_v) {
   11165                 :                     {
   11166              24 :                       int res = SWIG_AsVal_int(argv[8], NULL);
   11167              24 :                       _v = SWIG_CheckState(res);
   11168                 :                     }
   11169              24 :                     if (_v) {
   11170              24 :                       return _wrap_Feature_SetField__SWIG_6(self, args);
   11171                 :                     }
   11172                 :                   }
   11173                 :                 }
   11174                 :               }
   11175                 :             }
   11176                 :           }
   11177                 :         }
   11178                 :       }
   11179                 :     }
   11180                 :   }
   11181               1 :   if (argc == 9) {
   11182                 :     int _v;
   11183               1 :     void *vptr = 0;
   11184               1 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   11185               1 :     _v = SWIG_CheckState(res);
   11186               1 :     if (_v) {
   11187               1 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   11188               1 :       _v = SWIG_CheckState(res);
   11189               1 :       if (_v) {
   11190                 :         {
   11191               1 :           int res = SWIG_AsVal_int(argv[2], NULL);
   11192               1 :           _v = SWIG_CheckState(res);
   11193                 :         }
   11194               1 :         if (_v) {
   11195                 :           {
   11196               1 :             int res = SWIG_AsVal_int(argv[3], NULL);
   11197               1 :             _v = SWIG_CheckState(res);
   11198                 :           }
   11199               1 :           if (_v) {
   11200                 :             {
   11201               1 :               int res = SWIG_AsVal_int(argv[4], NULL);
   11202               1 :               _v = SWIG_CheckState(res);
   11203                 :             }
   11204               1 :             if (_v) {
   11205                 :               {
   11206               1 :                 int res = SWIG_AsVal_int(argv[5], NULL);
   11207               1 :                 _v = SWIG_CheckState(res);
   11208                 :               }
   11209               1 :               if (_v) {
   11210                 :                 {
   11211               1 :                   int res = SWIG_AsVal_int(argv[6], NULL);
   11212               1 :                   _v = SWIG_CheckState(res);
   11213                 :                 }
   11214               1 :                 if (_v) {
   11215                 :                   {
   11216               1 :                     int res = SWIG_AsVal_int(argv[7], NULL);
   11217               1 :                     _v = SWIG_CheckState(res);
   11218                 :                   }
   11219               1 :                   if (_v) {
   11220                 :                     {
   11221               1 :                       int res = SWIG_AsVal_int(argv[8], NULL);
   11222               1 :                       _v = SWIG_CheckState(res);
   11223                 :                     }
   11224               1 :                     if (_v) {
   11225               1 :                       return _wrap_Feature_SetField__SWIG_7(self, args);
   11226                 :                     }
   11227                 :                   }
   11228                 :                 }
   11229                 :               }
   11230                 :             }
   11231                 :           }
   11232                 :         }
   11233                 :       }
   11234                 :     }
   11235                 :   }
   11236                 :   
   11237                 : fail:
   11238                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_SetField'.\n"
   11239                 :     "  Possible C/C++ prototypes are:\n"
   11240                 :     "    SetField(OGRFeatureShadow *,int,char const *)\n"
   11241                 :     "    SetField(OGRFeatureShadow *,char const *,char const *)\n"
   11242                 :     "    SetField(OGRFeatureShadow *,int,int)\n"
   11243                 :     "    SetField(OGRFeatureShadow *,char const *,int)\n"
   11244                 :     "    SetField(OGRFeatureShadow *,int,double)\n"
   11245                 :     "    SetField(OGRFeatureShadow *,char const *,double)\n"
   11246                 :     "    SetField(OGRFeatureShadow *,int,int,int,int,int,int,int,int)\n"
   11247               0 :     "    SetField(OGRFeatureShadow *,char const *,int,int,int,int,int,int,int)\n");
   11248               0 :   return NULL;
   11249                 : }
   11250                 : 
   11251                 : 
   11252               6 : SWIGINTERN PyObject *_wrap_Feature_SetFieldIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11253               6 :   PyObject *resultobj = 0;
   11254               6 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   11255                 :   int arg2 ;
   11256                 :   int arg3 ;
   11257               6 :   int *arg4 = (int *) 0 ;
   11258               6 :   void *argp1 = 0 ;
   11259               6 :   int res1 = 0 ;
   11260                 :   int val2 ;
   11261               6 :   int ecode2 = 0 ;
   11262               6 :   PyObject * obj0 = 0 ;
   11263               6 :   PyObject * obj1 = 0 ;
   11264               6 :   PyObject * obj2 = 0 ;
   11265                 :   
   11266               6 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldIntegerList",&obj0,&obj1,&obj2)) SWIG_fail;
   11267               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   11268               6 :   if (!SWIG_IsOK(res1)) {
   11269               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   11270                 :   }
   11271               6 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   11272               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11273               6 :   if (!SWIG_IsOK(ecode2)) {
   11274               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldIntegerList" "', argument " "2"" of type '" "int""'");
   11275                 :   } 
   11276               6 :   arg2 = static_cast< int >(val2);
   11277                 :   {
   11278                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   11279                 :     /* check if is List */
   11280               6 :     if ( !PySequence_Check(obj2) ) {
   11281               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   11282               0 :       SWIG_fail;
   11283                 :     }
   11284               6 :     arg3 = PySequence_Size(obj2);
   11285               6 :     arg4 = (int*) malloc(arg3*sizeof(int));
   11286              17 :     for( int i = 0; i<arg3; i++ ) {
   11287              11 :       PyObject *o = PySequence_GetItem(obj2,i);
   11288              11 :       if ( !PyArg_Parse(o,"i",&arg4[i]) ) {
   11289               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
   11290               0 :         Py_DECREF(o);
   11291                 :         SWIG_fail;
   11292                 :       }
   11293              11 :       Py_DECREF(o);
   11294                 :     }
   11295                 :   }
   11296                 :   {
   11297               6 :     if ( bUseExceptions ) {
   11298               0 :       CPLErrorReset();
   11299                 :     }
   11300                 :     OGRFeatureShadow_SetFieldIntegerList(arg1,arg2,arg3,arg4);
   11301               6 :     if ( bUseExceptions ) {
   11302               0 :       CPLErr eclass = CPLGetLastErrorType();
   11303               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11304               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11305                 :       }
   11306                 :     }
   11307                 :   }
   11308               6 :   resultobj = SWIG_Py_Void();
   11309                 :   {
   11310                 :     /* %typemap(freearg) (int nList, int* pList) */
   11311               6 :     if (arg4) {
   11312               6 :       free((void*) arg4);
   11313                 :     }
   11314                 :   }
   11315               6 :   return resultobj;
   11316                 : fail:
   11317                 :   {
   11318                 :     /* %typemap(freearg) (int nList, int* pList) */
   11319               0 :     if (arg4) {
   11320               0 :       free((void*) arg4);
   11321                 :     }
   11322                 :   }
   11323               0 :   return NULL;
   11324                 : }
   11325                 : 
   11326                 : 
   11327              29 : SWIGINTERN PyObject *_wrap_Feature_SetFieldDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11328              29 :   PyObject *resultobj = 0;
   11329              29 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   11330                 :   int arg2 ;
   11331                 :   int arg3 ;
   11332              29 :   double *arg4 = (double *) 0 ;
   11333              29 :   void *argp1 = 0 ;
   11334              29 :   int res1 = 0 ;
   11335                 :   int val2 ;
   11336              29 :   int ecode2 = 0 ;
   11337              29 :   PyObject * obj0 = 0 ;
   11338              29 :   PyObject * obj1 = 0 ;
   11339              29 :   PyObject * obj2 = 0 ;
   11340                 :   
   11341              29 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldDoubleList",&obj0,&obj1,&obj2)) SWIG_fail;
   11342              29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   11343              29 :   if (!SWIG_IsOK(res1)) {
   11344               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   11345                 :   }
   11346              29 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   11347              29 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11348              29 :   if (!SWIG_IsOK(ecode2)) {
   11349               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldDoubleList" "', argument " "2"" of type '" "int""'");
   11350                 :   } 
   11351              29 :   arg2 = static_cast< int >(val2);
   11352                 :   {
   11353                 :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   11354                 :     /* check if is List */
   11355              29 :     if ( !PySequence_Check(obj2) ) {
   11356               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   11357               0 :       SWIG_fail;
   11358                 :     }
   11359              29 :     arg3 = PySequence_Size(obj2);
   11360              29 :     arg4 = (double*) malloc(arg3*sizeof(double));
   11361              87 :     for( int i = 0; i<arg3; i++ ) {
   11362              58 :       PyObject *o = PySequence_GetItem(obj2,i);
   11363              58 :       if ( !PyArg_Parse(o,"d",&arg4[i]) ) {
   11364               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   11365               0 :         Py_DECREF(o);
   11366                 :         SWIG_fail;
   11367                 :       }
   11368              58 :       Py_DECREF(o);
   11369                 :     }
   11370                 :   }
   11371                 :   {
   11372              29 :     if ( bUseExceptions ) {
   11373               0 :       CPLErrorReset();
   11374                 :     }
   11375                 :     OGRFeatureShadow_SetFieldDoubleList(arg1,arg2,arg3,arg4);
   11376              29 :     if ( bUseExceptions ) {
   11377               0 :       CPLErr eclass = CPLGetLastErrorType();
   11378               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11379               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11380                 :       }
   11381                 :     }
   11382                 :   }
   11383              29 :   resultobj = SWIG_Py_Void();
   11384                 :   {
   11385                 :     /* %typemap(freearg) (int nList, double* pList) */
   11386              29 :     if (arg4) {
   11387              29 :       free((void*) arg4);
   11388                 :     }
   11389                 :   }
   11390              29 :   return resultobj;
   11391                 : fail:
   11392                 :   {
   11393                 :     /* %typemap(freearg) (int nList, double* pList) */
   11394               0 :     if (arg4) {
   11395               0 :       free((void*) arg4);
   11396                 :     }
   11397                 :   }
   11398               0 :   return NULL;
   11399                 : }
   11400                 : 
   11401                 : 
   11402              14 : SWIGINTERN PyObject *_wrap_Feature_SetFieldStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11403              14 :   PyObject *resultobj = 0;
   11404              14 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   11405                 :   int arg2 ;
   11406              14 :   char **arg3 = (char **) 0 ;
   11407              14 :   void *argp1 = 0 ;
   11408              14 :   int res1 = 0 ;
   11409                 :   int val2 ;
   11410              14 :   int ecode2 = 0 ;
   11411              14 :   PyObject * obj0 = 0 ;
   11412              14 :   PyObject * obj1 = 0 ;
   11413              14 :   PyObject * obj2 = 0 ;
   11414                 :   
   11415              14 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldStringList",&obj0,&obj1,&obj2)) SWIG_fail;
   11416              14 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   11417              14 :   if (!SWIG_IsOK(res1)) {
   11418               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   11419                 :   }
   11420              14 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   11421              14 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11422              14 :   if (!SWIG_IsOK(ecode2)) {
   11423               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldStringList" "', argument " "2"" of type '" "int""'");
   11424                 :   } 
   11425              14 :   arg2 = static_cast< int >(val2);
   11426                 :   {
   11427                 :     /* %typemap(in) char **options */
   11428                 :     /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   11429              14 :     if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
   11430                 :   #if PY_VERSION_HEX < 0x03000000
   11431                 :       || PyString_Check(obj2)
   11432                 :   #endif
   11433                 :       ) {
   11434               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   11435               0 :       SWIG_fail;
   11436                 :     }
   11437                 :     
   11438              14 :     int size = PySequence_Size(obj2);
   11439              43 :     for (int i = 0; i < size; i++) {
   11440              29 :       PyObject* pyObj = PySequence_GetItem(obj2,i);
   11441              29 :       if (PyUnicode_Check(pyObj))
   11442                 :       {
   11443                 :         char *pszStr;
   11444                 :         Py_ssize_t nLen;
   11445               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   11446                 : #if PY_VERSION_HEX >= 0x03000000
   11447                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   11448                 : #else
   11449               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   11450                 : #endif
   11451               0 :         arg3 = CSLAddString( arg3, pszStr );
   11452               0 :         Py_XDECREF(pyUTF8Str);
   11453                 :       }
   11454                 : #if PY_VERSION_HEX >= 0x03000000
   11455                 :       else if (PyBytes_Check(pyObj))
   11456                 :       arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
   11457                 : #else
   11458              29 :       else if (PyString_Check(pyObj))
   11459              29 :       arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
   11460                 : #endif
   11461                 :       else
   11462                 :       {
   11463               0 :         Py_DECREF(pyObj);
   11464               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   11465               0 :         SWIG_fail;
   11466                 :       }
   11467              29 :       Py_DECREF(pyObj);
   11468                 :     }
   11469                 :   }
   11470                 :   {
   11471              14 :     if ( bUseExceptions ) {
   11472               0 :       CPLErrorReset();
   11473                 :     }
   11474                 :     OGRFeatureShadow_SetFieldStringList(arg1,arg2,arg3);
   11475              14 :     if ( bUseExceptions ) {
   11476               0 :       CPLErr eclass = CPLGetLastErrorType();
   11477               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11478               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11479                 :       }
   11480                 :     }
   11481                 :   }
   11482              14 :   resultobj = SWIG_Py_Void();
   11483                 :   {
   11484                 :     /* %typemap(freearg) char **options */
   11485              14 :     CSLDestroy( arg3 );
   11486                 :   }
   11487              14 :   return resultobj;
   11488                 : fail:
   11489                 :   {
   11490                 :     /* %typemap(freearg) char **options */
   11491               0 :     CSLDestroy( arg3 );
   11492                 :   }
   11493               0 :   return NULL;
   11494                 : }
   11495                 : 
   11496                 : 
   11497             241 : SWIGINTERN PyObject *_wrap_Feature_SetFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11498             241 :   PyObject *resultobj = 0;
   11499             241 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   11500             241 :   OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
   11501             241 :   int arg3 = (int) 1 ;
   11502             241 :   void *argp1 = 0 ;
   11503             241 :   int res1 = 0 ;
   11504             241 :   void *argp2 = 0 ;
   11505             241 :   int res2 = 0 ;
   11506                 :   int val3 ;
   11507             241 :   int ecode3 = 0 ;
   11508             241 :   PyObject * obj0 = 0 ;
   11509             241 :   PyObject * obj1 = 0 ;
   11510             241 :   PyObject * obj2 = 0 ;
   11511                 :   char *  kwnames[] = {
   11512                 :     (char *) "self",(char *) "other",(char *) "forgiving", NULL 
   11513             241 :   };
   11514                 :   OGRErr result;
   11515                 :   
   11516             241 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Feature_SetFrom",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   11517             241 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   11518             241 :   if (!SWIG_IsOK(res1)) {
   11519               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFrom" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   11520                 :   }
   11521             241 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   11522             241 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   11523             241 :   if (!SWIG_IsOK(res2)) {
   11524               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFrom" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
   11525                 :   }
   11526             241 :   arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
   11527             241 :   if (obj2) {
   11528               0 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   11529               0 :     if (!SWIG_IsOK(ecode3)) {
   11530               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFrom" "', argument " "3"" of type '" "int""'");
   11531                 :     } 
   11532               0 :     arg3 = static_cast< int >(val3);
   11533                 :   }
   11534                 :   {
   11535             241 :     if (!arg2) {
   11536               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11537                 :     }
   11538                 :   }
   11539                 :   {
   11540             241 :     if ( bUseExceptions ) {
   11541               0 :       CPLErrorReset();
   11542                 :     }
   11543             241 :     result = (OGRErr)OGRFeatureShadow_SetFrom(arg1,arg2,arg3);
   11544             241 :     if ( bUseExceptions ) {
   11545               0 :       CPLErr eclass = CPLGetLastErrorType();
   11546               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11547               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11548                 :       }
   11549                 :     }
   11550                 :   }
   11551                 :   {
   11552                 :     /* %typemap(out) OGRErr */
   11553             241 :     if ( result != 0 && bUseExceptions) {
   11554               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   11555               0 :       SWIG_fail;
   11556                 :     }
   11557                 :   }
   11558                 :   {
   11559                 :     /* %typemap(ret) OGRErr */
   11560             241 :     if (resultobj == Py_None ) {
   11561               0 :       Py_DECREF(resultobj);
   11562               0 :       resultobj = 0;
   11563                 :     }
   11564             241 :     if (resultobj == 0) {
   11565             241 :       resultobj = PyInt_FromLong( result );
   11566                 :     }
   11567                 :   }
   11568             241 :   return resultobj;
   11569                 : fail:
   11570               0 :   return NULL;
   11571                 : }
   11572                 : 
   11573                 : 
   11574             381 : SWIGINTERN PyObject *_wrap_Feature_SetFromWithMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11575             381 :   PyObject *resultobj = 0;
   11576             381 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   11577             381 :   OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
   11578                 :   int arg3 ;
   11579                 :   int arg4 ;
   11580             381 :   int *arg5 = (int *) 0 ;
   11581             381 :   void *argp1 = 0 ;
   11582             381 :   int res1 = 0 ;
   11583             381 :   void *argp2 = 0 ;
   11584             381 :   int res2 = 0 ;
   11585                 :   int val3 ;
   11586             381 :   int ecode3 = 0 ;
   11587             381 :   PyObject * obj0 = 0 ;
   11588             381 :   PyObject * obj1 = 0 ;
   11589             381 :   PyObject * obj2 = 0 ;
   11590             381 :   PyObject * obj3 = 0 ;
   11591                 :   OGRErr result;
   11592                 :   
   11593             381 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:Feature_SetFromWithMap",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   11594             381 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   11595             381 :   if (!SWIG_IsOK(res1)) {
   11596               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFromWithMap" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   11597                 :   }
   11598             381 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   11599             381 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   11600             381 :   if (!SWIG_IsOK(res2)) {
   11601               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFromWithMap" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
   11602                 :   }
   11603             381 :   arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
   11604             381 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   11605             381 :   if (!SWIG_IsOK(ecode3)) {
   11606               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFromWithMap" "', argument " "3"" of type '" "int""'");
   11607                 :   } 
   11608             381 :   arg3 = static_cast< int >(val3);
   11609                 :   {
   11610                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   11611                 :     /* check if is List */
   11612             381 :     if ( !PySequence_Check(obj3) ) {
   11613               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   11614               0 :       SWIG_fail;
   11615                 :     }
   11616             381 :     arg4 = PySequence_Size(obj3);
   11617             381 :     arg5 = (int*) malloc(arg4*sizeof(int));
   11618            1503 :     for( int i = 0; i<arg4; i++ ) {
   11619            1122 :       PyObject *o = PySequence_GetItem(obj3,i);
   11620            1122 :       if ( !PyArg_Parse(o,"i",&arg5[i]) ) {
   11621               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
   11622               0 :         Py_DECREF(o);
   11623                 :         SWIG_fail;
   11624                 :       }
   11625            1122 :       Py_DECREF(o);
   11626                 :     }
   11627                 :   }
   11628                 :   {
   11629             381 :     if (!arg2) {
   11630               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11631                 :     }
   11632                 :   }
   11633                 :   {
   11634             381 :     if ( bUseExceptions ) {
   11635               0 :       CPLErrorReset();
   11636                 :     }
   11637             381 :     result = (OGRErr)OGRFeatureShadow_SetFromWithMap(arg1,arg2,arg3,arg4,arg5);
   11638             381 :     if ( bUseExceptions ) {
   11639               0 :       CPLErr eclass = CPLGetLastErrorType();
   11640               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11641               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11642                 :       }
   11643                 :     }
   11644                 :   }
   11645                 :   {
   11646                 :     /* %typemap(out) OGRErr */
   11647             381 :     if ( result != 0 && bUseExceptions) {
   11648               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   11649               0 :       SWIG_fail;
   11650                 :     }
   11651                 :   }
   11652                 :   {
   11653                 :     /* %typemap(freearg) (int nList, int* pList) */
   11654             381 :     if (arg5) {
   11655             381 :       free((void*) arg5);
   11656                 :     }
   11657                 :   }
   11658                 :   {
   11659                 :     /* %typemap(ret) OGRErr */
   11660             381 :     if (resultobj == Py_None ) {
   11661               0 :       Py_DECREF(resultobj);
   11662               0 :       resultobj = 0;
   11663                 :     }
   11664             381 :     if (resultobj == 0) {
   11665             381 :       resultobj = PyInt_FromLong( result );
   11666                 :     }
   11667                 :   }
   11668             381 :   return resultobj;
   11669                 : fail:
   11670                 :   {
   11671                 :     /* %typemap(freearg) (int nList, int* pList) */
   11672               0 :     if (arg5) {
   11673               0 :       free((void*) arg5);
   11674                 :     }
   11675                 :   }
   11676               0 :   return NULL;
   11677                 : }
   11678                 : 
   11679                 : 
   11680              89 : SWIGINTERN PyObject *_wrap_Feature_GetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11681              89 :   PyObject *resultobj = 0;
   11682              89 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   11683              89 :   void *argp1 = 0 ;
   11684              89 :   int res1 = 0 ;
   11685              89 :   PyObject * obj0 = 0 ;
   11686              89 :   char *result = 0 ;
   11687                 :   
   11688              89 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetStyleString",&obj0)) SWIG_fail;
   11689              89 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   11690              89 :   if (!SWIG_IsOK(res1)) {
   11691               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   11692                 :   }
   11693              89 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   11694                 :   {
   11695              89 :     if ( bUseExceptions ) {
   11696               0 :       CPLErrorReset();
   11697                 :     }
   11698              89 :     result = (char *)OGRFeatureShadow_GetStyleString(arg1);
   11699              89 :     if ( bUseExceptions ) {
   11700               0 :       CPLErr eclass = CPLGetLastErrorType();
   11701               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11702               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11703                 :       }
   11704                 :     }
   11705                 :   }
   11706              89 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11707              89 :   return resultobj;
   11708                 : fail:
   11709               0 :   return NULL;
   11710                 : }
   11711                 : 
   11712                 : 
   11713              35 : SWIGINTERN PyObject *_wrap_Feature_SetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11714              35 :   PyObject *resultobj = 0;
   11715              35 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   11716              35 :   char *arg2 = (char *) 0 ;
   11717              35 :   void *argp1 = 0 ;
   11718              35 :   int res1 = 0 ;
   11719                 :   int res2 ;
   11720              35 :   char *buf2 = 0 ;
   11721              35 :   int alloc2 = 0 ;
   11722              35 :   PyObject * obj0 = 0 ;
   11723              35 :   PyObject * obj1 = 0 ;
   11724                 :   
   11725              35 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetStyleString",&obj0,&obj1)) SWIG_fail;
   11726              35 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   11727              35 :   if (!SWIG_IsOK(res1)) {
   11728               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   11729                 :   }
   11730              35 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   11731              35 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   11732              35 :   if (!SWIG_IsOK(res2)) {
   11733               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetStyleString" "', argument " "2"" of type '" "char const *""'");
   11734                 :   }
   11735              35 :   arg2 = reinterpret_cast< char * >(buf2);
   11736                 :   {
   11737              35 :     if ( bUseExceptions ) {
   11738               0 :       CPLErrorReset();
   11739                 :     }
   11740                 :     OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2);
   11741              35 :     if ( bUseExceptions ) {
   11742               0 :       CPLErr eclass = CPLGetLastErrorType();
   11743               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11744               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11745                 :       }
   11746                 :     }
   11747                 :   }
   11748              35 :   resultobj = SWIG_Py_Void();
   11749              35 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11750              35 :   return resultobj;
   11751                 : fail:
   11752               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11753               0 :   return NULL;
   11754                 : }
   11755                 : 
   11756                 : 
   11757            4075 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11758            4075 :   PyObject *resultobj = 0;
   11759            4075 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   11760                 :   int arg2 ;
   11761            4075 :   void *argp1 = 0 ;
   11762            4075 :   int res1 = 0 ;
   11763                 :   int val2 ;
   11764            4075 :   int ecode2 = 0 ;
   11765            4075 :   PyObject * obj0 = 0 ;
   11766            4075 :   PyObject * obj1 = 0 ;
   11767                 :   OGRFieldType result;
   11768                 :   
   11769            4075 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldType",&obj0,&obj1)) SWIG_fail;
   11770            4075 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   11771            4075 :   if (!SWIG_IsOK(res1)) {
   11772               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   11773                 :   }
   11774            4075 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   11775            4075 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11776            4075 :   if (!SWIG_IsOK(ecode2)) {
   11777               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "int""'");
   11778                 :   } 
   11779            4075 :   arg2 = static_cast< int >(val2);
   11780                 :   {
   11781            4075 :     if ( bUseExceptions ) {
   11782               0 :       CPLErrorReset();
   11783                 :     }
   11784            4075 :     result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
   11785            4075 :     if ( bUseExceptions ) {
   11786               0 :       CPLErr eclass = CPLGetLastErrorType();
   11787               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11788               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11789                 :       }
   11790                 :     }
   11791                 :   }
   11792            8150 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11793            4075 :   return resultobj;
   11794                 : fail:
   11795               0 :   return NULL;
   11796                 : }
   11797                 : 
   11798                 : 
   11799               0 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11800               0 :   PyObject *resultobj = 0;
   11801               0 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   11802               0 :   char *arg2 = (char *) 0 ;
   11803               0 :   void *argp1 = 0 ;
   11804               0 :   int res1 = 0 ;
   11805                 :   int res2 ;
   11806               0 :   char *buf2 = 0 ;
   11807               0 :   int alloc2 = 0 ;
   11808               0 :   PyObject * obj0 = 0 ;
   11809               0 :   PyObject * obj1 = 0 ;
   11810                 :   OGRFieldType result;
   11811                 :   
   11812               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldType",&obj0,&obj1)) SWIG_fail;
   11813               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   11814               0 :   if (!SWIG_IsOK(res1)) {
   11815               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   11816                 :   }
   11817               0 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   11818               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   11819               0 :   if (!SWIG_IsOK(res2)) {
   11820               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "char const *""'");
   11821                 :   }
   11822               0 :   arg2 = reinterpret_cast< char * >(buf2);
   11823                 :   {
   11824               0 :     if (!arg2) {
   11825               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11826                 :     }
   11827                 :   }
   11828                 :   {
   11829               0 :     if ( bUseExceptions ) {
   11830               0 :       CPLErrorReset();
   11831                 :     }
   11832               0 :     result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2);
   11833               0 :     if ( bUseExceptions ) {
   11834               0 :       CPLErr eclass = CPLGetLastErrorType();
   11835               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11836               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11837                 :       }
   11838                 :     }
   11839                 :   }
   11840               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11841               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11842               0 :   return resultobj;
   11843                 : fail:
   11844               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11845               0 :   return NULL;
   11846                 : }
   11847                 : 
   11848                 : 
   11849            4075 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType(PyObject *self, PyObject *args) {
   11850                 :   int argc;
   11851                 :   PyObject *argv[3];
   11852                 :   int ii;
   11853                 :   
   11854            4075 :   if (!PyTuple_Check(args)) SWIG_fail;
   11855            4075 :   argc = (int)PyObject_Length(args);
   11856           12225 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
   11857            8150 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
   11858                 :   }
   11859            4075 :   if (argc == 2) {
   11860                 :     int _v;
   11861            4075 :     void *vptr = 0;
   11862            4075 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   11863            4075 :     _v = SWIG_CheckState(res);
   11864            4075 :     if (_v) {
   11865                 :       {
   11866            4075 :         int res = SWIG_AsVal_int(argv[1], NULL);
   11867            4075 :         _v = SWIG_CheckState(res);
   11868                 :       }
   11869            4075 :       if (_v) {
   11870            4075 :         return _wrap_Feature_GetFieldType__SWIG_0(self, args);
   11871                 :       }
   11872                 :     }
   11873                 :   }
   11874               0 :   if (argc == 2) {
   11875                 :     int _v;
   11876               0 :     void *vptr = 0;
   11877               0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   11878               0 :     _v = SWIG_CheckState(res);
   11879               0 :     if (_v) {
   11880               0 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   11881               0 :       _v = SWIG_CheckState(res);
   11882               0 :       if (_v) {
   11883               0 :         return _wrap_Feature_GetFieldType__SWIG_1(self, args);
   11884                 :       }
   11885                 :     }
   11886                 :   }
   11887                 :   
   11888                 : fail:
   11889                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldType'.\n"
   11890                 :     "  Possible C/C++ prototypes are:\n"
   11891                 :     "    GetFieldType(OGRFeatureShadow *,int)\n"
   11892               0 :     "    GetFieldType(OGRFeatureShadow *,char const *)\n");
   11893               0 :   return NULL;
   11894                 : }
   11895                 : 
   11896                 : 
   11897               2 : SWIGINTERN PyObject *Feature_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11898                 :   PyObject *obj;
   11899               2 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   11900               2 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureShadow, SWIG_NewClientData(obj));
   11901               2 :   return SWIG_Py_Void();
   11902                 : }
   11903                 : 
   11904              24 : SWIGINTERN PyObject *_wrap_delete_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11905              24 :   PyObject *resultobj = 0;
   11906              24 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   11907              24 :   void *argp1 = 0 ;
   11908              24 :   int res1 = 0 ;
   11909              24 :   PyObject * obj0 = 0 ;
   11910                 :   
   11911              24 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_FeatureDefn",&obj0)) SWIG_fail;
   11912              24 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_DISOWN |  0 );
   11913              24 :   if (!SWIG_IsOK(res1)) {
   11914               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FeatureDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   11915                 :   }
   11916              24 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   11917                 :   {
   11918              24 :     if ( bUseExceptions ) {
   11919               0 :       CPLErrorReset();
   11920                 :     }
   11921                 :     delete_OGRFeatureDefnShadow(arg1);
   11922              24 :     if ( bUseExceptions ) {
   11923               0 :       CPLErr eclass = CPLGetLastErrorType();
   11924               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11925               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11926                 :       }
   11927                 :     }
   11928                 :   }
   11929              24 :   resultobj = SWIG_Py_Void();
   11930              24 :   return resultobj;
   11931                 : fail:
   11932               0 :   return NULL;
   11933                 : }
   11934                 : 
   11935                 : 
   11936              24 : SWIGINTERN PyObject *_wrap_new_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11937              24 :   PyObject *resultobj = 0;
   11938              24 :   char *arg1 = (char *) NULL ;
   11939                 :   int res1 ;
   11940              24 :   char *buf1 = 0 ;
   11941              24 :   int alloc1 = 0 ;
   11942              24 :   PyObject * obj0 = 0 ;
   11943                 :   char *  kwnames[] = {
   11944                 :     (char *) "name_null_ok", NULL 
   11945              24 :   };
   11946              24 :   OGRFeatureDefnShadow *result = 0 ;
   11947                 :   
   11948              24 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_FeatureDefn",kwnames,&obj0)) SWIG_fail;
   11949              24 :   if (obj0) {
   11950              20 :     res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   11951              20 :     if (!SWIG_IsOK(res1)) {
   11952               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureDefn" "', argument " "1"" of type '" "char const *""'");
   11953                 :     }
   11954              20 :     arg1 = reinterpret_cast< char * >(buf1);
   11955                 :   }
   11956                 :   {
   11957              24 :     if ( bUseExceptions ) {
   11958               0 :       CPLErrorReset();
   11959                 :     }
   11960              24 :     result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow((char const *)arg1);
   11961              24 :     if ( bUseExceptions ) {
   11962               0 :       CPLErr eclass = CPLGetLastErrorType();
   11963               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11964               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11965                 :       }
   11966                 :     }
   11967                 :   }
   11968              24 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_NEW |  0 );
   11969              24 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11970              24 :   return resultobj;
   11971                 : fail:
   11972               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11973               0 :   return NULL;
   11974                 : }
   11975                 : 
   11976                 : 
   11977             114 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11978             114 :   PyObject *resultobj = 0;
   11979             114 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   11980             114 :   void *argp1 = 0 ;
   11981             114 :   int res1 = 0 ;
   11982             114 :   PyObject * obj0 = 0 ;
   11983             114 :   char *result = 0 ;
   11984                 :   
   11985             114 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetName",&obj0)) SWIG_fail;
   11986             114 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   11987             114 :   if (!SWIG_IsOK(res1)) {
   11988               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetName" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   11989                 :   }
   11990             114 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   11991                 :   {
   11992             114 :     if ( bUseExceptions ) {
   11993               0 :       CPLErrorReset();
   11994                 :     }
   11995             114 :     result = (char *)OGRFeatureDefnShadow_GetName(arg1);
   11996             114 :     if ( bUseExceptions ) {
   11997               0 :       CPLErr eclass = CPLGetLastErrorType();
   11998               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11999               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12000                 :       }
   12001                 :     }
   12002                 :   }
   12003             114 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12004             114 :   return resultobj;
   12005                 : fail:
   12006               0 :   return NULL;
   12007                 : }
   12008                 : 
   12009                 : 
   12010             396 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12011             396 :   PyObject *resultobj = 0;
   12012             396 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   12013             396 :   void *argp1 = 0 ;
   12014             396 :   int res1 = 0 ;
   12015             396 :   PyObject * obj0 = 0 ;
   12016                 :   int result;
   12017                 :   
   12018             396 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetFieldCount",&obj0)) SWIG_fail;
   12019             396 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   12020             396 :   if (!SWIG_IsOK(res1)) {
   12021               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   12022                 :   }
   12023             396 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   12024                 :   {
   12025             396 :     if ( bUseExceptions ) {
   12026               0 :       CPLErrorReset();
   12027                 :     }
   12028             396 :     result = (int)OGRFeatureDefnShadow_GetFieldCount(arg1);
   12029             396 :     if ( bUseExceptions ) {
   12030               0 :       CPLErr eclass = CPLGetLastErrorType();
   12031               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12032               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12033                 :       }
   12034                 :     }
   12035                 :   }
   12036             396 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12037             396 :   return resultobj;
   12038                 : fail:
   12039               0 :   return NULL;
   12040                 : }
   12041                 : 
   12042                 : 
   12043            1284 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12044            1284 :   PyObject *resultobj = 0;
   12045            1284 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   12046                 :   int arg2 ;
   12047            1284 :   void *argp1 = 0 ;
   12048            1284 :   int res1 = 0 ;
   12049                 :   int val2 ;
   12050            1284 :   int ecode2 = 0 ;
   12051            1284 :   PyObject * obj0 = 0 ;
   12052            1284 :   PyObject * obj1 = 0 ;
   12053            1284 :   OGRFieldDefnShadow *result = 0 ;
   12054                 :   
   12055            1284 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_GetFieldDefn",&obj0,&obj1)) SWIG_fail;
   12056            1284 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   12057            1284 :   if (!SWIG_IsOK(res1)) {
   12058               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   12059                 :   }
   12060            1284 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   12061            1284 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12062            1284 :   if (!SWIG_IsOK(ecode2)) {
   12063               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "2"" of type '" "int""'");
   12064                 :   } 
   12065            1284 :   arg2 = static_cast< int >(val2);
   12066                 :   {
   12067            1284 :     if ( bUseExceptions ) {
   12068               0 :       CPLErrorReset();
   12069                 :     }
   12070            1284 :     result = (OGRFieldDefnShadow *)OGRFeatureDefnShadow_GetFieldDefn(arg1,arg2);
   12071            1284 :     if ( bUseExceptions ) {
   12072               0 :       CPLErr eclass = CPLGetLastErrorType();
   12073               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12074               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12075                 :       }
   12076                 :     }
   12077                 :   }
   12078            1284 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12079            1284 :   return resultobj;
   12080                 : fail:
   12081               0 :   return NULL;
   12082                 : }
   12083                 : 
   12084                 : 
   12085             834 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12086             834 :   PyObject *resultobj = 0;
   12087             834 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   12088             834 :   char *arg2 = (char *) 0 ;
   12089             834 :   void *argp1 = 0 ;
   12090             834 :   int res1 = 0 ;
   12091                 :   int res2 ;
   12092             834 :   char *buf2 = 0 ;
   12093             834 :   int alloc2 = 0 ;
   12094             834 :   PyObject * obj0 = 0 ;
   12095             834 :   PyObject * obj1 = 0 ;
   12096                 :   int result;
   12097                 :   
   12098             834 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_GetFieldIndex",&obj0,&obj1)) SWIG_fail;
   12099             834 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   12100             834 :   if (!SWIG_IsOK(res1)) {
   12101               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   12102                 :   }
   12103             834 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   12104             834 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   12105             834 :   if (!SWIG_IsOK(res2)) {
   12106               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "2"" of type '" "char const *""'");
   12107                 :   }
   12108             834 :   arg2 = reinterpret_cast< char * >(buf2);
   12109                 :   {
   12110             834 :     if (!arg2) {
   12111               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12112                 :     }
   12113                 :   }
   12114                 :   {
   12115             834 :     if ( bUseExceptions ) {
   12116               0 :       CPLErrorReset();
   12117                 :     }
   12118             834 :     result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
   12119             834 :     if ( bUseExceptions ) {
   12120               0 :       CPLErr eclass = CPLGetLastErrorType();
   12121               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12122               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12123                 :       }
   12124                 :     }
   12125                 :   }
   12126             834 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12127             834 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12128             834 :   return resultobj;
   12129                 : fail:
   12130               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12131               0 :   return NULL;
   12132                 : }
   12133                 : 
   12134                 : 
   12135             210 : SWIGINTERN PyObject *_wrap_FeatureDefn_AddFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12136             210 :   PyObject *resultobj = 0;
   12137             210 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   12138             210 :   OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
   12139             210 :   void *argp1 = 0 ;
   12140             210 :   int res1 = 0 ;
   12141             210 :   void *argp2 = 0 ;
   12142             210 :   int res2 = 0 ;
   12143             210 :   PyObject * obj0 = 0 ;
   12144             210 :   PyObject * obj1 = 0 ;
   12145                 :   
   12146             210 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_AddFieldDefn",&obj0,&obj1)) SWIG_fail;
   12147             210 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   12148             210 :   if (!SWIG_IsOK(res1)) {
   12149               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   12150                 :   }
   12151             210 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   12152             210 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12153             210 :   if (!SWIG_IsOK(res2)) {
   12154               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'"); 
   12155                 :   }
   12156             210 :   arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
   12157                 :   {
   12158             210 :     if (!arg2) {
   12159               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12160                 :     }
   12161                 :   }
   12162                 :   {
   12163             210 :     if ( bUseExceptions ) {
   12164               0 :       CPLErrorReset();
   12165                 :     }
   12166                 :     OGRFeatureDefnShadow_AddFieldDefn(arg1,arg2);
   12167             210 :     if ( bUseExceptions ) {
   12168               0 :       CPLErr eclass = CPLGetLastErrorType();
   12169               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12170               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12171                 :       }
   12172                 :     }
   12173                 :   }
   12174             210 :   resultobj = SWIG_Py_Void();
   12175             210 :   return resultobj;
   12176                 : fail:
   12177               0 :   return NULL;
   12178                 : }
   12179                 : 
   12180                 : 
   12181             135 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12182             135 :   PyObject *resultobj = 0;
   12183             135 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   12184             135 :   void *argp1 = 0 ;
   12185             135 :   int res1 = 0 ;
   12186             135 :   PyObject * obj0 = 0 ;
   12187                 :   OGRwkbGeometryType result;
   12188                 :   
   12189             135 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetGeomType",&obj0)) SWIG_fail;
   12190             135 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   12191             135 :   if (!SWIG_IsOK(res1)) {
   12192               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   12193                 :   }
   12194             135 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   12195                 :   {
   12196             135 :     if ( bUseExceptions ) {
   12197               0 :       CPLErrorReset();
   12198                 :     }
   12199             135 :     result = (OGRwkbGeometryType)OGRFeatureDefnShadow_GetGeomType(arg1);
   12200             135 :     if ( bUseExceptions ) {
   12201               0 :       CPLErr eclass = CPLGetLastErrorType();
   12202               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12203               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12204                 :       }
   12205                 :     }
   12206                 :   }
   12207             270 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12208             135 :   return resultobj;
   12209                 : fail:
   12210               0 :   return NULL;
   12211                 : }
   12212                 : 
   12213                 : 
   12214               0 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12215               0 :   PyObject *resultobj = 0;
   12216               0 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   12217                 :   OGRwkbGeometryType arg2 ;
   12218               0 :   void *argp1 = 0 ;
   12219               0 :   int res1 = 0 ;
   12220                 :   int val2 ;
   12221               0 :   int ecode2 = 0 ;
   12222               0 :   PyObject * obj0 = 0 ;
   12223               0 :   PyObject * obj1 = 0 ;
   12224                 :   
   12225               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetGeomType",&obj0,&obj1)) SWIG_fail;
   12226               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   12227               0 :   if (!SWIG_IsOK(res1)) {
   12228               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   12229                 :   }
   12230               0 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   12231               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12232               0 :   if (!SWIG_IsOK(ecode2)) {
   12233               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeomType" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
   12234                 :   } 
   12235               0 :   arg2 = static_cast< OGRwkbGeometryType >(val2);
   12236                 :   {
   12237               0 :     if ( bUseExceptions ) {
   12238               0 :       CPLErrorReset();
   12239                 :     }
   12240                 :     OGRFeatureDefnShadow_SetGeomType(arg1,arg2);
   12241               0 :     if ( bUseExceptions ) {
   12242               0 :       CPLErr eclass = CPLGetLastErrorType();
   12243               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12244               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12245                 :       }
   12246                 :     }
   12247                 :   }
   12248               0 :   resultobj = SWIG_Py_Void();
   12249               0 :   return resultobj;
   12250                 : fail:
   12251               0 :   return NULL;
   12252                 : }
   12253                 : 
   12254                 : 
   12255               0 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetReferenceCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12256               0 :   PyObject *resultobj = 0;
   12257               0 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   12258               0 :   void *argp1 = 0 ;
   12259               0 :   int res1 = 0 ;
   12260               0 :   PyObject * obj0 = 0 ;
   12261                 :   int result;
   12262                 :   
   12263               0 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetReferenceCount",&obj0)) SWIG_fail;
   12264               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   12265               0 :   if (!SWIG_IsOK(res1)) {
   12266               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetReferenceCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   12267                 :   }
   12268               0 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   12269                 :   {
   12270               0 :     if ( bUseExceptions ) {
   12271               0 :       CPLErrorReset();
   12272                 :     }
   12273               0 :     result = (int)OGRFeatureDefnShadow_GetReferenceCount(arg1);
   12274               0 :     if ( bUseExceptions ) {
   12275               0 :       CPLErr eclass = CPLGetLastErrorType();
   12276               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12277               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12278                 :       }
   12279                 :     }
   12280                 :   }
   12281               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12282               0 :   return resultobj;
   12283                 : fail:
   12284               0 :   return NULL;
   12285                 : }
   12286                 : 
   12287                 : 
   12288               6 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12289               6 :   PyObject *resultobj = 0;
   12290               6 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   12291               6 :   void *argp1 = 0 ;
   12292               6 :   int res1 = 0 ;
   12293               6 :   PyObject * obj0 = 0 ;
   12294                 :   int result;
   12295                 :   
   12296               6 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_IsGeometryIgnored",&obj0)) SWIG_fail;
   12297               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   12298               6 :   if (!SWIG_IsOK(res1)) {
   12299               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   12300                 :   }
   12301               6 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   12302                 :   {
   12303               6 :     if ( bUseExceptions ) {
   12304               0 :       CPLErrorReset();
   12305                 :     }
   12306               6 :     result = (int)OGRFeatureDefnShadow_IsGeometryIgnored(arg1);
   12307               6 :     if ( bUseExceptions ) {
   12308               0 :       CPLErr eclass = CPLGetLastErrorType();
   12309               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12310               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12311                 :       }
   12312                 :     }
   12313                 :   }
   12314               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12315               6 :   return resultobj;
   12316                 : fail:
   12317               0 :   return NULL;
   12318                 : }
   12319                 : 
   12320                 : 
   12321               3 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12322               3 :   PyObject *resultobj = 0;
   12323               3 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   12324                 :   int arg2 ;
   12325               3 :   void *argp1 = 0 ;
   12326               3 :   int res1 = 0 ;
   12327                 :   int val2 ;
   12328               3 :   int ecode2 = 0 ;
   12329               3 :   PyObject * obj0 = 0 ;
   12330               3 :   PyObject * obj1 = 0 ;
   12331                 :   
   12332               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetGeometryIgnored",&obj0,&obj1)) SWIG_fail;
   12333               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   12334               3 :   if (!SWIG_IsOK(res1)) {
   12335               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   12336                 :   }
   12337               3 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   12338               3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12339               3 :   if (!SWIG_IsOK(ecode2)) {
   12340               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "2"" of type '" "int""'");
   12341                 :   } 
   12342               3 :   arg2 = static_cast< int >(val2);
   12343                 :   {
   12344               3 :     if ( bUseExceptions ) {
   12345               0 :       CPLErrorReset();
   12346                 :     }
   12347                 :     OGRFeatureDefnShadow_SetGeometryIgnored(arg1,arg2);
   12348               3 :     if ( bUseExceptions ) {
   12349               0 :       CPLErr eclass = CPLGetLastErrorType();
   12350               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12351               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12352                 :       }
   12353                 :     }
   12354                 :   }
   12355               3 :   resultobj = SWIG_Py_Void();
   12356               3 :   return resultobj;
   12357                 : fail:
   12358               0 :   return NULL;
   12359                 : }
   12360                 : 
   12361                 : 
   12362               3 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12363               3 :   PyObject *resultobj = 0;
   12364               3 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   12365               3 :   void *argp1 = 0 ;
   12366               3 :   int res1 = 0 ;
   12367               3 :   PyObject * obj0 = 0 ;
   12368                 :   int result;
   12369                 :   
   12370               3 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_IsStyleIgnored",&obj0)) SWIG_fail;
   12371               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   12372               3 :   if (!SWIG_IsOK(res1)) {
   12373               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   12374                 :   }
   12375               3 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   12376                 :   {
   12377               3 :     if ( bUseExceptions ) {
   12378               0 :       CPLErrorReset();
   12379                 :     }
   12380               3 :     result = (int)OGRFeatureDefnShadow_IsStyleIgnored(arg1);
   12381               3 :     if ( bUseExceptions ) {
   12382               0 :       CPLErr eclass = CPLGetLastErrorType();
   12383               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12384               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12385                 :       }
   12386                 :     }
   12387                 :   }
   12388               3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12389               3 :   return resultobj;
   12390                 : fail:
   12391               0 :   return NULL;
   12392                 : }
   12393                 : 
   12394                 : 
   12395               0 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12396               0 :   PyObject *resultobj = 0;
   12397               0 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   12398                 :   int arg2 ;
   12399               0 :   void *argp1 = 0 ;
   12400               0 :   int res1 = 0 ;
   12401                 :   int val2 ;
   12402               0 :   int ecode2 = 0 ;
   12403               0 :   PyObject * obj0 = 0 ;
   12404               0 :   PyObject * obj1 = 0 ;
   12405                 :   
   12406               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetStyleIgnored",&obj0,&obj1)) SWIG_fail;
   12407               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   12408               0 :   if (!SWIG_IsOK(res1)) {
   12409               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   12410                 :   }
   12411               0 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   12412               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12413               0 :   if (!SWIG_IsOK(ecode2)) {
   12414               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "2"" of type '" "int""'");
   12415                 :   } 
   12416               0 :   arg2 = static_cast< int >(val2);
   12417                 :   {
   12418               0 :     if ( bUseExceptions ) {
   12419               0 :       CPLErrorReset();
   12420                 :     }
   12421                 :     OGRFeatureDefnShadow_SetStyleIgnored(arg1,arg2);
   12422               0 :     if ( bUseExceptions ) {
   12423               0 :       CPLErr eclass = CPLGetLastErrorType();
   12424               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12425               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12426                 :       }
   12427                 :     }
   12428                 :   }
   12429               0 :   resultobj = SWIG_Py_Void();
   12430               0 :   return resultobj;
   12431                 : fail:
   12432               0 :   return NULL;
   12433                 : }
   12434                 : 
   12435                 : 
   12436               2 : SWIGINTERN PyObject *FeatureDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12437                 :   PyObject *obj;
   12438               2 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   12439               2 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_NewClientData(obj));
   12440               2 :   return SWIG_Py_Void();
   12441                 : }
   12442                 : 
   12443            4816 : SWIGINTERN PyObject *_wrap_delete_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12444            4816 :   PyObject *resultobj = 0;
   12445            4816 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12446            4816 :   void *argp1 = 0 ;
   12447            4816 :   int res1 = 0 ;
   12448            4816 :   PyObject * obj0 = 0 ;
   12449                 :   
   12450            4816 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_FieldDefn",&obj0)) SWIG_fail;
   12451            4816 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_DISOWN |  0 );
   12452            4816 :   if (!SWIG_IsOK(res1)) {
   12453               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FieldDefn" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12454                 :   }
   12455            4816 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12456                 :   {
   12457            4816 :     if ( bUseExceptions ) {
   12458               0 :       CPLErrorReset();
   12459                 :     }
   12460                 :     delete_OGRFieldDefnShadow(arg1);
   12461            4816 :     if ( bUseExceptions ) {
   12462               0 :       CPLErr eclass = CPLGetLastErrorType();
   12463               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12464               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12465                 :       }
   12466                 :     }
   12467                 :   }
   12468            4816 :   resultobj = SWIG_Py_Void();
   12469            4816 :   return resultobj;
   12470                 : fail:
   12471               0 :   return NULL;
   12472                 : }
   12473                 : 
   12474                 : 
   12475            4816 : SWIGINTERN PyObject *_wrap_new_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12476            4816 :   PyObject *resultobj = 0;
   12477            4816 :   char *arg1 = (char *) "unnamed" ;
   12478            4816 :   OGRFieldType arg2 = (OGRFieldType) OFTString ;
   12479                 :   int res1 ;
   12480            4816 :   char *buf1 = 0 ;
   12481            4816 :   int alloc1 = 0 ;
   12482                 :   int val2 ;
   12483            4816 :   int ecode2 = 0 ;
   12484            4816 :   PyObject * obj0 = 0 ;
   12485            4816 :   PyObject * obj1 = 0 ;
   12486                 :   char *  kwnames[] = {
   12487                 :     (char *) "name_null_ok",(char *) "field_type", NULL 
   12488            4816 :   };
   12489            4816 :   OGRFieldDefnShadow *result = 0 ;
   12490                 :   
   12491            4816 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_FieldDefn",kwnames,&obj0,&obj1)) SWIG_fail;
   12492            4816 :   if (obj0) {
   12493            4815 :     res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   12494            4815 :     if (!SWIG_IsOK(res1)) {
   12495               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FieldDefn" "', argument " "1"" of type '" "char const *""'");
   12496                 :     }
   12497            4815 :     arg1 = reinterpret_cast< char * >(buf1);
   12498                 :   }
   12499            4816 :   if (obj1) {
   12500            4803 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   12501            4803 :     if (!SWIG_IsOK(ecode2)) {
   12502               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FieldDefn" "', argument " "2"" of type '" "OGRFieldType""'");
   12503                 :     } 
   12504            4803 :     arg2 = static_cast< OGRFieldType >(val2);
   12505                 :   }
   12506                 :   {
   12507            4816 :     if ( bUseExceptions ) {
   12508               0 :       CPLErrorReset();
   12509                 :     }
   12510            4816 :     result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow((char const *)arg1,arg2);
   12511            4816 :     if ( bUseExceptions ) {
   12512               0 :       CPLErr eclass = CPLGetLastErrorType();
   12513               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12514               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12515                 :       }
   12516                 :     }
   12517                 :   }
   12518            4816 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_NEW |  0 );
   12519            4816 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12520            4816 :   return resultobj;
   12521                 : fail:
   12522               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12523               0 :   return NULL;
   12524                 : }
   12525                 : 
   12526                 : 
   12527             250 : SWIGINTERN PyObject *_wrap_FieldDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12528             250 :   PyObject *resultobj = 0;
   12529             250 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12530             250 :   void *argp1 = 0 ;
   12531             250 :   int res1 = 0 ;
   12532             250 :   PyObject * obj0 = 0 ;
   12533             250 :   char *result = 0 ;
   12534                 :   
   12535             250 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetName",&obj0)) SWIG_fail;
   12536             250 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12537             250 :   if (!SWIG_IsOK(res1)) {
   12538               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12539                 :   }
   12540             250 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12541                 :   {
   12542             250 :     if ( bUseExceptions ) {
   12543               0 :       CPLErrorReset();
   12544                 :     }
   12545             250 :     result = (char *)OGRFieldDefnShadow_GetName(arg1);
   12546             250 :     if ( bUseExceptions ) {
   12547               0 :       CPLErr eclass = CPLGetLastErrorType();
   12548               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12549               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12550                 :       }
   12551                 :     }
   12552                 :   }
   12553             250 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12554             250 :   return resultobj;
   12555                 : fail:
   12556               0 :   return NULL;
   12557                 : }
   12558                 : 
   12559                 : 
   12560             526 : SWIGINTERN PyObject *_wrap_FieldDefn_GetNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12561             526 :   PyObject *resultobj = 0;
   12562             526 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12563             526 :   void *argp1 = 0 ;
   12564             526 :   int res1 = 0 ;
   12565             526 :   PyObject * obj0 = 0 ;
   12566             526 :   char *result = 0 ;
   12567                 :   
   12568             526 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetNameRef",&obj0)) SWIG_fail;
   12569             526 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12570             526 :   if (!SWIG_IsOK(res1)) {
   12571               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetNameRef" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12572                 :   }
   12573             526 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12574                 :   {
   12575             526 :     if ( bUseExceptions ) {
   12576               0 :       CPLErrorReset();
   12577                 :     }
   12578             526 :     result = (char *)OGRFieldDefnShadow_GetNameRef(arg1);
   12579             526 :     if ( bUseExceptions ) {
   12580               0 :       CPLErr eclass = CPLGetLastErrorType();
   12581               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12582               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12583                 :       }
   12584                 :     }
   12585                 :   }
   12586             526 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12587             526 :   return resultobj;
   12588                 : fail:
   12589               0 :   return NULL;
   12590                 : }
   12591                 : 
   12592                 : 
   12593               1 : SWIGINTERN PyObject *_wrap_FieldDefn_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12594               1 :   PyObject *resultobj = 0;
   12595               1 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12596               1 :   char *arg2 = (char *) 0 ;
   12597               1 :   void *argp1 = 0 ;
   12598               1 :   int res1 = 0 ;
   12599                 :   int res2 ;
   12600               1 :   char *buf2 = 0 ;
   12601               1 :   int alloc2 = 0 ;
   12602               1 :   PyObject * obj0 = 0 ;
   12603               1 :   PyObject * obj1 = 0 ;
   12604                 :   
   12605               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetName",&obj0,&obj1)) SWIG_fail;
   12606               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12607               1 :   if (!SWIG_IsOK(res1)) {
   12608               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12609                 :   }
   12610               1 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12611               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   12612               1 :   if (!SWIG_IsOK(res2)) {
   12613               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetName" "', argument " "2"" of type '" "char const *""'");
   12614                 :   }
   12615               1 :   arg2 = reinterpret_cast< char * >(buf2);
   12616                 :   {
   12617               1 :     if (!arg2) {
   12618               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12619                 :     }
   12620                 :   }
   12621                 :   {
   12622               1 :     if ( bUseExceptions ) {
   12623               0 :       CPLErrorReset();
   12624                 :     }
   12625                 :     OGRFieldDefnShadow_SetName(arg1,(char const *)arg2);
   12626               1 :     if ( bUseExceptions ) {
   12627               0 :       CPLErr eclass = CPLGetLastErrorType();
   12628               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12629               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12630                 :       }
   12631                 :     }
   12632                 :   }
   12633               1 :   resultobj = SWIG_Py_Void();
   12634               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12635               1 :   return resultobj;
   12636                 : fail:
   12637               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12638               0 :   return NULL;
   12639                 : }
   12640                 : 
   12641                 : 
   12642             591 : SWIGINTERN PyObject *_wrap_FieldDefn_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12643             591 :   PyObject *resultobj = 0;
   12644             591 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12645             591 :   void *argp1 = 0 ;
   12646             591 :   int res1 = 0 ;
   12647             591 :   PyObject * obj0 = 0 ;
   12648                 :   OGRFieldType result;
   12649                 :   
   12650             591 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetType",&obj0)) SWIG_fail;
   12651             591 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12652             591 :   if (!SWIG_IsOK(res1)) {
   12653               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12654                 :   }
   12655             591 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12656                 :   {
   12657             591 :     if ( bUseExceptions ) {
   12658               0 :       CPLErrorReset();
   12659                 :     }
   12660             591 :     result = (OGRFieldType)OGRFieldDefnShadow_GetType(arg1);
   12661             591 :     if ( bUseExceptions ) {
   12662               0 :       CPLErr eclass = CPLGetLastErrorType();
   12663               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12664               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12665                 :       }
   12666                 :     }
   12667                 :   }
   12668            1182 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12669             591 :   return resultobj;
   12670                 : fail:
   12671               0 :   return NULL;
   12672                 : }
   12673                 : 
   12674                 : 
   12675               0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12676               0 :   PyObject *resultobj = 0;
   12677               0 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12678                 :   OGRFieldType arg2 ;
   12679               0 :   void *argp1 = 0 ;
   12680               0 :   int res1 = 0 ;
   12681                 :   int val2 ;
   12682               0 :   int ecode2 = 0 ;
   12683               0 :   PyObject * obj0 = 0 ;
   12684               0 :   PyObject * obj1 = 0 ;
   12685                 :   
   12686               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetType",&obj0,&obj1)) SWIG_fail;
   12687               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12688               0 :   if (!SWIG_IsOK(res1)) {
   12689               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12690                 :   }
   12691               0 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12692               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12693               0 :   if (!SWIG_IsOK(ecode2)) {
   12694               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetType" "', argument " "2"" of type '" "OGRFieldType""'");
   12695                 :   } 
   12696               0 :   arg2 = static_cast< OGRFieldType >(val2);
   12697                 :   {
   12698               0 :     if ( bUseExceptions ) {
   12699               0 :       CPLErrorReset();
   12700                 :     }
   12701                 :     OGRFieldDefnShadow_SetType(arg1,arg2);
   12702               0 :     if ( bUseExceptions ) {
   12703               0 :       CPLErr eclass = CPLGetLastErrorType();
   12704               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12705               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12706                 :       }
   12707                 :     }
   12708                 :   }
   12709               0 :   resultobj = SWIG_Py_Void();
   12710               0 :   return resultobj;
   12711                 : fail:
   12712               0 :   return NULL;
   12713                 : }
   12714                 : 
   12715                 : 
   12716               0 : SWIGINTERN PyObject *_wrap_FieldDefn_GetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12717               0 :   PyObject *resultobj = 0;
   12718               0 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12719               0 :   void *argp1 = 0 ;
   12720               0 :   int res1 = 0 ;
   12721               0 :   PyObject * obj0 = 0 ;
   12722                 :   OGRJustification result;
   12723                 :   
   12724               0 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetJustify",&obj0)) SWIG_fail;
   12725               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12726               0 :   if (!SWIG_IsOK(res1)) {
   12727               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12728                 :   }
   12729               0 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12730                 :   {
   12731               0 :     if ( bUseExceptions ) {
   12732               0 :       CPLErrorReset();
   12733                 :     }
   12734               0 :     result = (OGRJustification)OGRFieldDefnShadow_GetJustify(arg1);
   12735               0 :     if ( bUseExceptions ) {
   12736               0 :       CPLErr eclass = CPLGetLastErrorType();
   12737               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12738               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12739                 :       }
   12740                 :     }
   12741                 :   }
   12742               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12743               0 :   return resultobj;
   12744                 : fail:
   12745               0 :   return NULL;
   12746                 : }
   12747                 : 
   12748                 : 
   12749               0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12750               0 :   PyObject *resultobj = 0;
   12751               0 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12752                 :   OGRJustification arg2 ;
   12753               0 :   void *argp1 = 0 ;
   12754               0 :   int res1 = 0 ;
   12755                 :   int val2 ;
   12756               0 :   int ecode2 = 0 ;
   12757               0 :   PyObject * obj0 = 0 ;
   12758               0 :   PyObject * obj1 = 0 ;
   12759                 :   
   12760               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetJustify",&obj0,&obj1)) SWIG_fail;
   12761               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12762               0 :   if (!SWIG_IsOK(res1)) {
   12763               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12764                 :   }
   12765               0 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12766               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12767               0 :   if (!SWIG_IsOK(ecode2)) {
   12768               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetJustify" "', argument " "2"" of type '" "OGRJustification""'");
   12769                 :   } 
   12770               0 :   arg2 = static_cast< OGRJustification >(val2);
   12771                 :   {
   12772               0 :     if ( bUseExceptions ) {
   12773               0 :       CPLErrorReset();
   12774                 :     }
   12775                 :     OGRFieldDefnShadow_SetJustify(arg1,arg2);
   12776               0 :     if ( bUseExceptions ) {
   12777               0 :       CPLErr eclass = CPLGetLastErrorType();
   12778               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12779               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12780                 :       }
   12781                 :     }
   12782                 :   }
   12783               0 :   resultobj = SWIG_Py_Void();
   12784               0 :   return resultobj;
   12785                 : fail:
   12786               0 :   return NULL;
   12787                 : }
   12788                 : 
   12789                 : 
   12790             520 : SWIGINTERN PyObject *_wrap_FieldDefn_GetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12791             520 :   PyObject *resultobj = 0;
   12792             520 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12793             520 :   void *argp1 = 0 ;
   12794             520 :   int res1 = 0 ;
   12795             520 :   PyObject * obj0 = 0 ;
   12796                 :   int result;
   12797                 :   
   12798             520 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetWidth",&obj0)) SWIG_fail;
   12799             520 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12800             520 :   if (!SWIG_IsOK(res1)) {
   12801               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12802                 :   }
   12803             520 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12804                 :   {
   12805             520 :     if ( bUseExceptions ) {
   12806               0 :       CPLErrorReset();
   12807                 :     }
   12808             520 :     result = (int)OGRFieldDefnShadow_GetWidth(arg1);
   12809             520 :     if ( bUseExceptions ) {
   12810               0 :       CPLErr eclass = CPLGetLastErrorType();
   12811               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12812               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12813                 :       }
   12814                 :     }
   12815                 :   }
   12816             520 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12817             520 :   return resultobj;
   12818                 : fail:
   12819               0 :   return NULL;
   12820                 : }
   12821                 : 
   12822                 : 
   12823             191 : SWIGINTERN PyObject *_wrap_FieldDefn_SetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12824             191 :   PyObject *resultobj = 0;
   12825             191 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12826                 :   int arg2 ;
   12827             191 :   void *argp1 = 0 ;
   12828             191 :   int res1 = 0 ;
   12829                 :   int val2 ;
   12830             191 :   int ecode2 = 0 ;
   12831             191 :   PyObject * obj0 = 0 ;
   12832             191 :   PyObject * obj1 = 0 ;
   12833                 :   
   12834             191 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetWidth",&obj0,&obj1)) SWIG_fail;
   12835             191 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12836             191 :   if (!SWIG_IsOK(res1)) {
   12837               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12838                 :   }
   12839             191 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12840             191 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12841             191 :   if (!SWIG_IsOK(ecode2)) {
   12842               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetWidth" "', argument " "2"" of type '" "int""'");
   12843                 :   } 
   12844             191 :   arg2 = static_cast< int >(val2);
   12845                 :   {
   12846             191 :     if ( bUseExceptions ) {
   12847               0 :       CPLErrorReset();
   12848                 :     }
   12849                 :     OGRFieldDefnShadow_SetWidth(arg1,arg2);
   12850             191 :     if ( bUseExceptions ) {
   12851               0 :       CPLErr eclass = CPLGetLastErrorType();
   12852               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12853               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12854                 :       }
   12855                 :     }
   12856                 :   }
   12857             191 :   resultobj = SWIG_Py_Void();
   12858             191 :   return resultobj;
   12859                 : fail:
   12860               0 :   return NULL;
   12861                 : }
   12862                 : 
   12863                 : 
   12864             210 : SWIGINTERN PyObject *_wrap_FieldDefn_GetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12865             210 :   PyObject *resultobj = 0;
   12866             210 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12867             210 :   void *argp1 = 0 ;
   12868             210 :   int res1 = 0 ;
   12869             210 :   PyObject * obj0 = 0 ;
   12870                 :   int result;
   12871                 :   
   12872             210 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetPrecision",&obj0)) SWIG_fail;
   12873             210 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12874             210 :   if (!SWIG_IsOK(res1)) {
   12875               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12876                 :   }
   12877             210 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12878                 :   {
   12879             210 :     if ( bUseExceptions ) {
   12880               0 :       CPLErrorReset();
   12881                 :     }
   12882             210 :     result = (int)OGRFieldDefnShadow_GetPrecision(arg1);
   12883             210 :     if ( bUseExceptions ) {
   12884               0 :       CPLErr eclass = CPLGetLastErrorType();
   12885               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12886               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12887                 :       }
   12888                 :     }
   12889                 :   }
   12890             210 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12891             210 :   return resultobj;
   12892                 : fail:
   12893               0 :   return NULL;
   12894                 : }
   12895                 : 
   12896                 : 
   12897             128 : SWIGINTERN PyObject *_wrap_FieldDefn_SetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12898             128 :   PyObject *resultobj = 0;
   12899             128 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12900                 :   int arg2 ;
   12901             128 :   void *argp1 = 0 ;
   12902             128 :   int res1 = 0 ;
   12903                 :   int val2 ;
   12904             128 :   int ecode2 = 0 ;
   12905             128 :   PyObject * obj0 = 0 ;
   12906             128 :   PyObject * obj1 = 0 ;
   12907                 :   
   12908             128 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetPrecision",&obj0,&obj1)) SWIG_fail;
   12909             128 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12910             128 :   if (!SWIG_IsOK(res1)) {
   12911               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12912                 :   }
   12913             128 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12914             128 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12915             128 :   if (!SWIG_IsOK(ecode2)) {
   12916               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetPrecision" "', argument " "2"" of type '" "int""'");
   12917                 :   } 
   12918             128 :   arg2 = static_cast< int >(val2);
   12919                 :   {
   12920             128 :     if ( bUseExceptions ) {
   12921               0 :       CPLErrorReset();
   12922                 :     }
   12923                 :     OGRFieldDefnShadow_SetPrecision(arg1,arg2);
   12924             128 :     if ( bUseExceptions ) {
   12925               0 :       CPLErr eclass = CPLGetLastErrorType();
   12926               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12927               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12928                 :       }
   12929                 :     }
   12930                 :   }
   12931             128 :   resultobj = SWIG_Py_Void();
   12932             128 :   return resultobj;
   12933                 : fail:
   12934               0 :   return NULL;
   12935                 : }
   12936                 : 
   12937                 : 
   12938               0 : SWIGINTERN PyObject *_wrap_FieldDefn_GetTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12939               0 :   PyObject *resultobj = 0;
   12940               0 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12941               0 :   void *argp1 = 0 ;
   12942               0 :   int res1 = 0 ;
   12943               0 :   PyObject * obj0 = 0 ;
   12944               0 :   char *result = 0 ;
   12945                 :   
   12946               0 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetTypeName",&obj0)) SWIG_fail;
   12947               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12948               0 :   if (!SWIG_IsOK(res1)) {
   12949               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12950                 :   }
   12951               0 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12952                 :   {
   12953               0 :     if ( bUseExceptions ) {
   12954               0 :       CPLErrorReset();
   12955                 :     }
   12956               0 :     result = (char *)OGRFieldDefnShadow_GetTypeName(arg1);
   12957               0 :     if ( bUseExceptions ) {
   12958               0 :       CPLErr eclass = CPLGetLastErrorType();
   12959               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12960               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12961                 :       }
   12962                 :     }
   12963                 :   }
   12964               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12965               0 :   return resultobj;
   12966                 : fail:
   12967               0 :   return NULL;
   12968                 : }
   12969                 : 
   12970                 : 
   12971              32 : SWIGINTERN PyObject *_wrap_FieldDefn_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12972              32 :   PyObject *resultobj = 0;
   12973              32 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   12974                 :   OGRFieldType arg2 ;
   12975              32 :   void *argp1 = 0 ;
   12976              32 :   int res1 = 0 ;
   12977                 :   int val2 ;
   12978              32 :   int ecode2 = 0 ;
   12979              32 :   PyObject * obj0 = 0 ;
   12980              32 :   PyObject * obj1 = 0 ;
   12981              32 :   char *result = 0 ;
   12982                 :   
   12983              32 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_GetFieldTypeName",&obj0,&obj1)) SWIG_fail;
   12984              32 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   12985              32 :   if (!SWIG_IsOK(res1)) {
   12986               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   12987                 :   }
   12988              32 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   12989              32 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12990              32 :   if (!SWIG_IsOK(ecode2)) {
   12991               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "2"" of type '" "OGRFieldType""'");
   12992                 :   } 
   12993              32 :   arg2 = static_cast< OGRFieldType >(val2);
   12994                 :   {
   12995              32 :     if ( bUseExceptions ) {
   12996               0 :       CPLErrorReset();
   12997                 :     }
   12998              32 :     result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2);
   12999              32 :     if ( bUseExceptions ) {
   13000               0 :       CPLErr eclass = CPLGetLastErrorType();
   13001               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13002               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13003                 :       }
   13004                 :     }
   13005                 :   }
   13006              32 :   resultobj = SWIG_FromCharPtr((const char *)result);
   13007              32 :   return resultobj;
   13008                 : fail:
   13009               0 :   return NULL;
   13010                 : }
   13011                 : 
   13012                 : 
   13013               6 : SWIGINTERN PyObject *_wrap_FieldDefn_IsIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13014               6 :   PyObject *resultobj = 0;
   13015               6 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   13016               6 :   void *argp1 = 0 ;
   13017               6 :   int res1 = 0 ;
   13018               6 :   PyObject * obj0 = 0 ;
   13019                 :   int result;
   13020                 :   
   13021               6 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_IsIgnored",&obj0)) SWIG_fail;
   13022               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   13023               6 :   if (!SWIG_IsOK(res1)) {
   13024               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   13025                 :   }
   13026               6 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   13027                 :   {
   13028               6 :     if ( bUseExceptions ) {
   13029               0 :       CPLErrorReset();
   13030                 :     }
   13031               6 :     result = (int)OGRFieldDefnShadow_IsIgnored(arg1);
   13032               6 :     if ( bUseExceptions ) {
   13033               0 :       CPLErr eclass = CPLGetLastErrorType();
   13034               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13035               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13036                 :       }
   13037                 :     }
   13038                 :   }
   13039               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13040               6 :   return resultobj;
   13041                 : fail:
   13042               0 :   return NULL;
   13043                 : }
   13044                 : 
   13045                 : 
   13046               0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13047               0 :   PyObject *resultobj = 0;
   13048               0 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   13049                 :   int arg2 ;
   13050               0 :   void *argp1 = 0 ;
   13051               0 :   int res1 = 0 ;
   13052                 :   int val2 ;
   13053               0 :   int ecode2 = 0 ;
   13054               0 :   PyObject * obj0 = 0 ;
   13055               0 :   PyObject * obj1 = 0 ;
   13056                 :   
   13057               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetIgnored",&obj0,&obj1)) SWIG_fail;
   13058               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   13059               0 :   if (!SWIG_IsOK(res1)) {
   13060               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   13061                 :   }
   13062               0 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   13063               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13064               0 :   if (!SWIG_IsOK(ecode2)) {
   13065               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetIgnored" "', argument " "2"" of type '" "int""'");
   13066                 :   } 
   13067               0 :   arg2 = static_cast< int >(val2);
   13068                 :   {
   13069               0 :     if ( bUseExceptions ) {
   13070               0 :       CPLErrorReset();
   13071                 :     }
   13072                 :     OGRFieldDefnShadow_SetIgnored(arg1,arg2);
   13073               0 :     if ( bUseExceptions ) {
   13074               0 :       CPLErr eclass = CPLGetLastErrorType();
   13075               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13076               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13077                 :       }
   13078                 :     }
   13079                 :   }
   13080               0 :   resultobj = SWIG_Py_Void();
   13081               0 :   return resultobj;
   13082                 : fail:
   13083               0 :   return NULL;
   13084                 : }
   13085                 : 
   13086                 : 
   13087               2 : SWIGINTERN PyObject *FieldDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13088                 :   PyObject *obj;
   13089               2 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   13090               2 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRFieldDefnShadow, SWIG_NewClientData(obj));
   13091               2 :   return SWIG_Py_Void();
   13092                 : }
   13093                 : 
   13094              72 : SWIGINTERN PyObject *_wrap_CreateGeometryFromWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13095              72 :   PyObject *resultobj = 0;
   13096                 :   int arg1 ;
   13097              72 :   char *arg2 = (char *) 0 ;
   13098              72 :   OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
   13099              72 :   int alloc1 = 0 ;
   13100              72 :   void *argp3 = 0 ;
   13101              72 :   int res3 = 0 ;
   13102              72 :   PyObject * obj0 = 0 ;
   13103              72 :   PyObject * obj1 = 0 ;
   13104                 :   char *  kwnames[] = {
   13105                 :     (char *) "len",(char *) "reference", NULL 
   13106              72 :   };
   13107              72 :   OGRGeometryShadow *result = 0 ;
   13108                 :   
   13109              72 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CreateGeometryFromWkb",kwnames,&obj0,&obj1)) SWIG_fail;
   13110                 :   {
   13111                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   13112                 : #if PY_VERSION_HEX>=0x03000000
   13113                 :     if (PyUnicode_Check(obj0))
   13114                 :     {
   13115                 :       size_t safeLen = 0;
   13116                 :       int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
   13117                 :       if (!SWIG_IsOK(ret)) {
   13118                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
   13119                 :       }
   13120                 :       
   13121                 :       if (safeLen) safeLen--;
   13122                 :       arg1 = (int) safeLen;
   13123                 :     }
   13124                 :     else if (PyBytes_Check(obj0))
   13125                 :     {
   13126                 :       Py_ssize_t safeLen = 0;
   13127                 :       PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
   13128                 :       arg1 = (int) safeLen;
   13129                 :     }
   13130                 :     else
   13131                 :     {
   13132                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
   13133                 :       SWIG_fail;
   13134                 :     }
   13135                 : #else
   13136              72 :     if (PyString_Check(obj0))
   13137                 :     {
   13138              72 :       Py_ssize_t safeLen = 0;
   13139              72 :       PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
   13140              72 :       arg1 = (int) safeLen;
   13141                 :     }
   13142                 :     else
   13143                 :     {
   13144               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
   13145               0 :       SWIG_fail;
   13146                 :     }
   13147                 : #endif
   13148                 :   }
   13149              72 :   if (obj1) {
   13150               0 :     res3 = SWIG_ConvertPtr(obj1, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   13151               0 :     if (!SWIG_IsOK(res3)) {
   13152               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateGeometryFromWkb" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
   13153                 :     }
   13154               0 :     arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
   13155                 :   }
   13156                 :   {
   13157              72 :     if ( bUseExceptions ) {
   13158               0 :       CPLErrorReset();
   13159                 :     }
   13160              72 :     result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2,arg3);
   13161              72 :     if ( bUseExceptions ) {
   13162               0 :       CPLErr eclass = CPLGetLastErrorType();
   13163               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13164               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13165                 :       }
   13166                 :     }
   13167                 :   }
   13168              72 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13169                 :   {
   13170                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   13171              72 :     if( alloc1 == SWIG_NEWOBJ ) {
   13172               0 :       delete[] arg2;
   13173                 :     }
   13174                 :   }
   13175              72 :   return resultobj;
   13176                 : fail:
   13177                 :   {
   13178                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   13179               0 :     if( alloc1 == SWIG_NEWOBJ ) {
   13180               0 :       delete[] arg2;
   13181                 :     }
   13182                 :   }
   13183               0 :   return NULL;
   13184                 : }
   13185                 : 
   13186                 : 
   13187           30217 : SWIGINTERN PyObject *_wrap_CreateGeometryFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13188           30217 :   PyObject *resultobj = 0;
   13189           30217 :   char **arg1 = (char **) 0 ;
   13190           30217 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ;
   13191                 :   char *val1 ;
   13192           30217 :   void *argp2 = 0 ;
   13193           30217 :   int res2 = 0 ;
   13194           30217 :   PyObject * obj0 = 0 ;
   13195           30217 :   PyObject * obj1 = 0 ;
   13196                 :   char *  kwnames[] = {
   13197                 :     (char *) "val",(char *) "reference", NULL 
   13198           30217 :   };
   13199           30217 :   OGRGeometryShadow *result = 0 ;
   13200                 :   
   13201           30217 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CreateGeometryFromWkt",kwnames,&obj0,&obj1)) SWIG_fail;
   13202                 :   {
   13203                 :     /* %typemap(in) (char **ignorechange) */
   13204           30217 :     PyArg_Parse( obj0, "s", &val1 );
   13205           30217 :     arg1 = &val1;
   13206                 :   }
   13207           30217 :   if (obj1) {
   13208               9 :     res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   13209               9 :     if (!SWIG_IsOK(res2)) {
   13210               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateGeometryFromWkt" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   13211                 :     }
   13212               9 :     arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   13213                 :   }
   13214                 :   {
   13215           30217 :     if ( bUseExceptions ) {
   13216               0 :       CPLErrorReset();
   13217                 :     }
   13218           30217 :     result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
   13219           30217 :     if ( bUseExceptions ) {
   13220               0 :       CPLErr eclass = CPLGetLastErrorType();
   13221               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13222               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13223                 :       }
   13224                 :     }
   13225                 :   }
   13226           30217 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13227           30217 :   return resultobj;
   13228                 : fail:
   13229               0 :   return NULL;
   13230                 : }
   13231                 : 
   13232                 : 
   13233             167 : SWIGINTERN PyObject *_wrap_CreateGeometryFromGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13234             167 :   PyObject *resultobj = 0;
   13235             167 :   char *arg1 = (char *) 0 ;
   13236                 :   int res1 ;
   13237             167 :   char *buf1 = 0 ;
   13238             167 :   int alloc1 = 0 ;
   13239             167 :   PyObject * obj0 = 0 ;
   13240             167 :   OGRGeometryShadow *result = 0 ;
   13241                 :   
   13242             167 :   if (!PyArg_ParseTuple(args,(char *)"O:CreateGeometryFromGML",&obj0)) SWIG_fail;
   13243             167 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   13244             167 :   if (!SWIG_IsOK(res1)) {
   13245               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromGML" "', argument " "1"" of type '" "char const *""'");
   13246                 :   }
   13247             167 :   arg1 = reinterpret_cast< char * >(buf1);
   13248                 :   {
   13249             167 :     if ( bUseExceptions ) {
   13250               0 :       CPLErrorReset();
   13251                 :     }
   13252             167 :     result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1);
   13253             167 :     if ( bUseExceptions ) {
   13254               0 :       CPLErr eclass = CPLGetLastErrorType();
   13255               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13256               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13257                 :       }
   13258                 :     }
   13259                 :   }
   13260             167 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13261             167 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   13262             167 :   return resultobj;
   13263                 : fail:
   13264               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   13265               0 :   return NULL;
   13266                 : }
   13267                 : 
   13268                 : 
   13269               0 : SWIGINTERN PyObject *_wrap_CreateGeometryFromJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13270               0 :   PyObject *resultobj = 0;
   13271               0 :   char *arg1 = (char *) 0 ;
   13272                 :   int res1 ;
   13273               0 :   char *buf1 = 0 ;
   13274               0 :   int alloc1 = 0 ;
   13275               0 :   PyObject * obj0 = 0 ;
   13276               0 :   OGRGeometryShadow *result = 0 ;
   13277                 :   
   13278               0 :   if (!PyArg_ParseTuple(args,(char *)"O:CreateGeometryFromJson",&obj0)) SWIG_fail;
   13279               0 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   13280               0 :   if (!SWIG_IsOK(res1)) {
   13281               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromJson" "', argument " "1"" of type '" "char const *""'");
   13282                 :   }
   13283               0 :   arg1 = reinterpret_cast< char * >(buf1);
   13284                 :   {
   13285               0 :     if ( bUseExceptions ) {
   13286               0 :       CPLErrorReset();
   13287                 :     }
   13288               0 :     result = (OGRGeometryShadow *)CreateGeometryFromJson((char const *)arg1);
   13289               0 :     if ( bUseExceptions ) {
   13290               0 :       CPLErr eclass = CPLGetLastErrorType();
   13291               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13292               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13293                 :       }
   13294                 :     }
   13295                 :   }
   13296               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13297               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   13298               0 :   return resultobj;
   13299                 : fail:
   13300               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   13301               0 :   return NULL;
   13302                 : }
   13303                 : 
   13304                 : 
   13305               5 : SWIGINTERN PyObject *_wrap_BuildPolygonFromEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13306               5 :   PyObject *resultobj = 0;
   13307               5 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13308               5 :   int arg2 = (int) 0 ;
   13309               5 :   int arg3 = (int) 0 ;
   13310               5 :   double arg4 = (double) 0 ;
   13311               5 :   void *argp1 = 0 ;
   13312               5 :   int res1 = 0 ;
   13313                 :   int val2 ;
   13314               5 :   int ecode2 = 0 ;
   13315                 :   int val3 ;
   13316               5 :   int ecode3 = 0 ;
   13317                 :   double val4 ;
   13318               5 :   int ecode4 = 0 ;
   13319               5 :   PyObject * obj0 = 0 ;
   13320               5 :   PyObject * obj1 = 0 ;
   13321               5 :   PyObject * obj2 = 0 ;
   13322               5 :   PyObject * obj3 = 0 ;
   13323                 :   char *  kwnames[] = {
   13324                 :     (char *) "hLineCollection",(char *) "bBestEffort",(char *) "bAutoClose",(char *) "dfTolerance", NULL 
   13325               5 :   };
   13326               5 :   OGRGeometryShadow *result = 0 ;
   13327                 :   
   13328               5 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:BuildPolygonFromEdges",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   13329               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13330               5 :   if (!SWIG_IsOK(res1)) {
   13331               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BuildPolygonFromEdges" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13332                 :   }
   13333               5 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13334               5 :   if (obj1) {
   13335               0 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   13336               0 :     if (!SWIG_IsOK(ecode2)) {
   13337               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BuildPolygonFromEdges" "', argument " "2"" of type '" "int""'");
   13338                 :     } 
   13339               0 :     arg2 = static_cast< int >(val2);
   13340                 :   }
   13341               5 :   if (obj2) {
   13342               0 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   13343               0 :     if (!SWIG_IsOK(ecode3)) {
   13344               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BuildPolygonFromEdges" "', argument " "3"" of type '" "int""'");
   13345                 :     } 
   13346               0 :     arg3 = static_cast< int >(val3);
   13347                 :   }
   13348               5 :   if (obj3) {
   13349               0 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
   13350               0 :     if (!SWIG_IsOK(ecode4)) {
   13351               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BuildPolygonFromEdges" "', argument " "4"" of type '" "double""'");
   13352                 :     } 
   13353               0 :     arg4 = static_cast< double >(val4);
   13354                 :   }
   13355                 :   {
   13356               5 :     if ( bUseExceptions ) {
   13357               0 :       CPLErrorReset();
   13358                 :     }
   13359               5 :     result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3,arg4);
   13360               5 :     if ( bUseExceptions ) {
   13361               0 :       CPLErr eclass = CPLGetLastErrorType();
   13362               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13363               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13364                 :       }
   13365                 :     }
   13366                 :   }
   13367               5 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13368               5 :   return resultobj;
   13369                 : fail:
   13370               0 :   return NULL;
   13371                 : }
   13372                 : 
   13373                 : 
   13374               1 : SWIGINTERN PyObject *_wrap_ApproximateArcAngles(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13375               1 :   PyObject *resultobj = 0;
   13376                 :   double arg1 ;
   13377                 :   double arg2 ;
   13378                 :   double arg3 ;
   13379                 :   double arg4 ;
   13380                 :   double arg5 ;
   13381                 :   double arg6 ;
   13382                 :   double arg7 ;
   13383                 :   double arg8 ;
   13384                 :   double arg9 ;
   13385                 :   double val1 ;
   13386               1 :   int ecode1 = 0 ;
   13387                 :   double val2 ;
   13388               1 :   int ecode2 = 0 ;
   13389                 :   double val3 ;
   13390               1 :   int ecode3 = 0 ;
   13391                 :   double val4 ;
   13392               1 :   int ecode4 = 0 ;
   13393                 :   double val5 ;
   13394               1 :   int ecode5 = 0 ;
   13395                 :   double val6 ;
   13396               1 :   int ecode6 = 0 ;
   13397                 :   double val7 ;
   13398               1 :   int ecode7 = 0 ;
   13399                 :   double val8 ;
   13400               1 :   int ecode8 = 0 ;
   13401                 :   double val9 ;
   13402               1 :   int ecode9 = 0 ;
   13403               1 :   PyObject * obj0 = 0 ;
   13404               1 :   PyObject * obj1 = 0 ;
   13405               1 :   PyObject * obj2 = 0 ;
   13406               1 :   PyObject * obj3 = 0 ;
   13407               1 :   PyObject * obj4 = 0 ;
   13408               1 :   PyObject * obj5 = 0 ;
   13409               1 :   PyObject * obj6 = 0 ;
   13410               1 :   PyObject * obj7 = 0 ;
   13411               1 :   PyObject * obj8 = 0 ;
   13412                 :   char *  kwnames[] = {
   13413                 :     (char *) "dfCenterX",(char *) "dfCenterY",(char *) "dfZ",(char *) "dfPrimaryRadius",(char *) "dfSecondaryAxis",(char *) "dfRotation",(char *) "dfStartAngle",(char *) "dfEndAngle",(char *) "dfMaxAngleStepSizeDegrees", NULL 
   13414               1 :   };
   13415               1 :   OGRGeometryShadow *result = 0 ;
   13416                 :   
   13417               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOO:ApproximateArcAngles",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
   13418               1 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   13419               1 :   if (!SWIG_IsOK(ecode1)) {
   13420               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ApproximateArcAngles" "', argument " "1"" of type '" "double""'");
   13421                 :   } 
   13422               1 :   arg1 = static_cast< double >(val1);
   13423               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   13424               1 :   if (!SWIG_IsOK(ecode2)) {
   13425               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApproximateArcAngles" "', argument " "2"" of type '" "double""'");
   13426                 :   } 
   13427               1 :   arg2 = static_cast< double >(val2);
   13428               1 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   13429               1 :   if (!SWIG_IsOK(ecode3)) {
   13430               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApproximateArcAngles" "', argument " "3"" of type '" "double""'");
   13431                 :   } 
   13432               1 :   arg3 = static_cast< double >(val3);
   13433               1 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   13434               1 :   if (!SWIG_IsOK(ecode4)) {
   13435               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ApproximateArcAngles" "', argument " "4"" of type '" "double""'");
   13436                 :   } 
   13437               1 :   arg4 = static_cast< double >(val4);
   13438               1 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   13439               1 :   if (!SWIG_IsOK(ecode5)) {
   13440               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ApproximateArcAngles" "', argument " "5"" of type '" "double""'");
   13441                 :   } 
   13442               1 :   arg5 = static_cast< double >(val5);
   13443               1 :   ecode6 = SWIG_AsVal_double(obj5, &val6);
   13444               1 :   if (!SWIG_IsOK(ecode6)) {
   13445               0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ApproximateArcAngles" "', argument " "6"" of type '" "double""'");
   13446                 :   } 
   13447               1 :   arg6 = static_cast< double >(val6);
   13448               1 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   13449               1 :   if (!SWIG_IsOK(ecode7)) {
   13450               0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ApproximateArcAngles" "', argument " "7"" of type '" "double""'");
   13451                 :   } 
   13452               1 :   arg7 = static_cast< double >(val7);
   13453               1 :   ecode8 = SWIG_AsVal_double(obj7, &val8);
   13454               1 :   if (!SWIG_IsOK(ecode8)) {
   13455               0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ApproximateArcAngles" "', argument " "8"" of type '" "double""'");
   13456                 :   } 
   13457               1 :   arg8 = static_cast< double >(val8);
   13458               1 :   ecode9 = SWIG_AsVal_double(obj8, &val9);
   13459               1 :   if (!SWIG_IsOK(ecode9)) {
   13460               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ApproximateArcAngles" "', argument " "9"" of type '" "double""'");
   13461                 :   } 
   13462               1 :   arg9 = static_cast< double >(val9);
   13463                 :   {
   13464               1 :     if ( bUseExceptions ) {
   13465               0 :       CPLErrorReset();
   13466                 :     }
   13467               1 :     result = (OGRGeometryShadow *)ApproximateArcAngles(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   13468               1 :     if ( bUseExceptions ) {
   13469               0 :       CPLErr eclass = CPLGetLastErrorType();
   13470               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13471               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13472                 :       }
   13473                 :     }
   13474                 :   }
   13475               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13476               1 :   return resultobj;
   13477                 : fail:
   13478               0 :   return NULL;
   13479                 : }
   13480                 : 
   13481                 : 
   13482              36 : SWIGINTERN PyObject *_wrap_ForceToPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13483              36 :   PyObject *resultobj = 0;
   13484              36 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13485              36 :   void *argp1 = 0 ;
   13486              36 :   int res1 = 0 ;
   13487              36 :   PyObject * obj0 = 0 ;
   13488              36 :   OGRGeometryShadow *result = 0 ;
   13489                 :   
   13490              36 :   if (!PyArg_ParseTuple(args,(char *)"O:ForceToPolygon",&obj0)) SWIG_fail;
   13491              36 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13492              36 :   if (!SWIG_IsOK(res1)) {
   13493               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13494                 :   }
   13495              36 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13496                 :   {
   13497              36 :     if ( bUseExceptions ) {
   13498               0 :       CPLErrorReset();
   13499                 :     }
   13500              36 :     result = (OGRGeometryShadow *)ForceToPolygon(arg1);
   13501              36 :     if ( bUseExceptions ) {
   13502               0 :       CPLErr eclass = CPLGetLastErrorType();
   13503               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13504               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13505                 :       }
   13506                 :     }
   13507                 :   }
   13508              36 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13509              36 :   return resultobj;
   13510                 : fail:
   13511               0 :   return NULL;
   13512                 : }
   13513                 : 
   13514                 : 
   13515              32 : SWIGINTERN PyObject *_wrap_ForceToLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13516              32 :   PyObject *resultobj = 0;
   13517              32 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13518              32 :   void *argp1 = 0 ;
   13519              32 :   int res1 = 0 ;
   13520              32 :   PyObject * obj0 = 0 ;
   13521              32 :   OGRGeometryShadow *result = 0 ;
   13522                 :   
   13523              32 :   if (!PyArg_ParseTuple(args,(char *)"O:ForceToLineString",&obj0)) SWIG_fail;
   13524              32 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13525              32 :   if (!SWIG_IsOK(res1)) {
   13526               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToLineString" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13527                 :   }
   13528              32 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13529                 :   {
   13530              32 :     if ( bUseExceptions ) {
   13531               0 :       CPLErrorReset();
   13532                 :     }
   13533              32 :     result = (OGRGeometryShadow *)ForceToLineString(arg1);
   13534              32 :     if ( bUseExceptions ) {
   13535               0 :       CPLErr eclass = CPLGetLastErrorType();
   13536               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13537               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13538                 :       }
   13539                 :     }
   13540                 :   }
   13541              32 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13542              32 :   return resultobj;
   13543                 : fail:
   13544               0 :   return NULL;
   13545                 : }
   13546                 : 
   13547                 : 
   13548              31 : SWIGINTERN PyObject *_wrap_ForceToMultiPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13549              31 :   PyObject *resultobj = 0;
   13550              31 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13551              31 :   void *argp1 = 0 ;
   13552              31 :   int res1 = 0 ;
   13553              31 :   PyObject * obj0 = 0 ;
   13554              31 :   OGRGeometryShadow *result = 0 ;
   13555                 :   
   13556              31 :   if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiPolygon",&obj0)) SWIG_fail;
   13557              31 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13558              31 :   if (!SWIG_IsOK(res1)) {
   13559               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13560                 :   }
   13561              31 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13562                 :   {
   13563              31 :     if ( bUseExceptions ) {
   13564               0 :       CPLErrorReset();
   13565                 :     }
   13566              31 :     result = (OGRGeometryShadow *)ForceToMultiPolygon(arg1);
   13567              31 :     if ( bUseExceptions ) {
   13568               0 :       CPLErr eclass = CPLGetLastErrorType();
   13569               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13570               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13571                 :       }
   13572                 :     }
   13573                 :   }
   13574              31 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13575              31 :   return resultobj;
   13576                 : fail:
   13577               0 :   return NULL;
   13578                 : }
   13579                 : 
   13580                 : 
   13581              27 : SWIGINTERN PyObject *_wrap_ForceToMultiPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13582              27 :   PyObject *resultobj = 0;
   13583              27 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13584              27 :   void *argp1 = 0 ;
   13585              27 :   int res1 = 0 ;
   13586              27 :   PyObject * obj0 = 0 ;
   13587              27 :   OGRGeometryShadow *result = 0 ;
   13588                 :   
   13589              27 :   if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiPoint",&obj0)) SWIG_fail;
   13590              27 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13591              27 :   if (!SWIG_IsOK(res1)) {
   13592               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13593                 :   }
   13594              27 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13595                 :   {
   13596              27 :     if ( bUseExceptions ) {
   13597               0 :       CPLErrorReset();
   13598                 :     }
   13599              27 :     result = (OGRGeometryShadow *)ForceToMultiPoint(arg1);
   13600              27 :     if ( bUseExceptions ) {
   13601               0 :       CPLErr eclass = CPLGetLastErrorType();
   13602               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13603               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13604                 :       }
   13605                 :     }
   13606                 :   }
   13607              27 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13608              27 :   return resultobj;
   13609                 : fail:
   13610               0 :   return NULL;
   13611                 : }
   13612                 : 
   13613                 : 
   13614              29 : SWIGINTERN PyObject *_wrap_ForceToMultiLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13615              29 :   PyObject *resultobj = 0;
   13616              29 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13617              29 :   void *argp1 = 0 ;
   13618              29 :   int res1 = 0 ;
   13619              29 :   PyObject * obj0 = 0 ;
   13620              29 :   OGRGeometryShadow *result = 0 ;
   13621                 :   
   13622              29 :   if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiLineString",&obj0)) SWIG_fail;
   13623              29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13624              29 :   if (!SWIG_IsOK(res1)) {
   13625               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiLineString" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13626                 :   }
   13627              29 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13628                 :   {
   13629              29 :     if ( bUseExceptions ) {
   13630               0 :       CPLErrorReset();
   13631                 :     }
   13632              29 :     result = (OGRGeometryShadow *)ForceToMultiLineString(arg1);
   13633              29 :     if ( bUseExceptions ) {
   13634               0 :       CPLErr eclass = CPLGetLastErrorType();
   13635               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13636               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13637                 :       }
   13638                 :     }
   13639                 :   }
   13640              29 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13641              29 :   return resultobj;
   13642                 : fail:
   13643               0 :   return NULL;
   13644                 : }
   13645                 : 
   13646                 : 
   13647           48890 : SWIGINTERN PyObject *_wrap_delete_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13648           48890 :   PyObject *resultobj = 0;
   13649           48890 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13650           48890 :   void *argp1 = 0 ;
   13651           48890 :   int res1 = 0 ;
   13652           48890 :   PyObject * obj0 = 0 ;
   13653                 :   
   13654           48890 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_Geometry",&obj0)) SWIG_fail;
   13655           48890 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
   13656           48890 :   if (!SWIG_IsOK(res1)) {
   13657               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Geometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13658                 :   }
   13659           48890 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13660                 :   {
   13661           48890 :     if ( bUseExceptions ) {
   13662               0 :       CPLErrorReset();
   13663                 :     }
   13664                 :     delete_OGRGeometryShadow(arg1);
   13665           48890 :     if ( bUseExceptions ) {
   13666               0 :       CPLErr eclass = CPLGetLastErrorType();
   13667               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13668               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13669                 :       }
   13670                 :     }
   13671                 :   }
   13672           48890 :   resultobj = SWIG_Py_Void();
   13673           48890 :   return resultobj;
   13674                 : fail:
   13675               0 :   return NULL;
   13676                 : }
   13677                 : 
   13678                 : 
   13679              60 : SWIGINTERN PyObject *_wrap_new_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13680              60 :   PyObject *resultobj = 0;
   13681              60 :   OGRwkbGeometryType arg1 = (OGRwkbGeometryType) wkbUnknown ;
   13682              60 :   char *arg2 = (char *) 0 ;
   13683              60 :   int arg3 = (int) 0 ;
   13684              60 :   char *arg4 = (char *) 0 ;
   13685              60 :   char *arg5 = (char *) 0 ;
   13686                 :   int val1 ;
   13687              60 :   int ecode1 = 0 ;
   13688                 :   int res2 ;
   13689              60 :   char *buf2 = 0 ;
   13690              60 :   int alloc2 = 0 ;
   13691              60 :   int alloc3 = 0 ;
   13692                 :   int res5 ;
   13693              60 :   char *buf5 = 0 ;
   13694              60 :   int alloc5 = 0 ;
   13695              60 :   PyObject * obj0 = 0 ;
   13696              60 :   PyObject * obj1 = 0 ;
   13697              60 :   PyObject * obj2 = 0 ;
   13698              60 :   PyObject * obj3 = 0 ;
   13699                 :   char *  kwnames[] = {
   13700                 :     (char *) "type",(char *) "wkt",(char *) "wkb",(char *) "gml", NULL 
   13701              60 :   };
   13702              60 :   OGRGeometryShadow *result = 0 ;
   13703                 :   
   13704              60 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_Geometry",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   13705              60 :   if (obj0) {
   13706              40 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
   13707              40 :     if (!SWIG_IsOK(ecode1)) {
   13708               0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Geometry" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
   13709                 :     } 
   13710              40 :     arg1 = static_cast< OGRwkbGeometryType >(val1);
   13711                 :   }
   13712              60 :   if (obj1) {
   13713              19 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   13714              19 :     if (!SWIG_IsOK(res2)) {
   13715               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "char *""'");
   13716                 :     }
   13717              19 :     arg2 = reinterpret_cast< char * >(buf2);
   13718                 :   }
   13719              60 :   if (obj2) {
   13720                 :     {
   13721                 :       /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   13722                 : #if PY_VERSION_HEX>=0x03000000
   13723                 :       if (PyUnicode_Check(obj2))
   13724                 :       {
   13725                 :         size_t safeLen = 0;
   13726                 :         int ret = SWIG_AsCharPtrAndSize(obj2, (char**) &arg4, &safeLen, &alloc3);
   13727                 :         if (!SWIG_IsOK(ret)) {
   13728                 :           SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
   13729                 :         }
   13730                 :         
   13731                 :         if (safeLen) safeLen--;
   13732                 :         arg3 = (int) safeLen;
   13733                 :       }
   13734                 :       else if (PyBytes_Check(obj2))
   13735                 :       {
   13736                 :         Py_ssize_t safeLen = 0;
   13737                 :         PyBytes_AsStringAndSize(obj2, (char**) &arg4, &safeLen);
   13738                 :         arg3 = (int) safeLen;
   13739                 :       }
   13740                 :       else
   13741                 :       {
   13742                 :         PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
   13743                 :         SWIG_fail;
   13744                 :       }
   13745                 : #else
   13746               0 :       if (PyString_Check(obj2))
   13747                 :       {
   13748               0 :         Py_ssize_t safeLen = 0;
   13749               0 :         PyString_AsStringAndSize(obj2, (char**) &arg4, &safeLen);
   13750               0 :         arg3 = (int) safeLen;
   13751                 :       }
   13752                 :       else
   13753                 :       {
   13754               0 :         PyErr_SetString(PyExc_TypeError, "not a string");
   13755               0 :         SWIG_fail;
   13756                 :       }
   13757                 : #endif
   13758                 :     }
   13759                 :   }
   13760              60 :   if (obj3) {
   13761               0 :     res5 = SWIG_AsCharPtrAndSize(obj3, &buf5, NULL, &alloc5);
   13762               0 :     if (!SWIG_IsOK(res5)) {
   13763               0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Geometry" "', argument " "5"" of type '" "char *""'");
   13764                 :     }
   13765               0 :     arg5 = reinterpret_cast< char * >(buf5);
   13766                 :   }
   13767                 :   {
   13768              60 :     if ( bUseExceptions ) {
   13769               0 :       CPLErrorReset();
   13770                 :     }
   13771             120 :     result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
   13772              60 :     if ( bUseExceptions ) {
   13773               0 :       CPLErr eclass = CPLGetLastErrorType();
   13774               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13775               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13776                 :       }
   13777                 :     }
   13778                 :   }
   13779              60 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_NEW |  0 );
   13780              60 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   13781                 :   {
   13782                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   13783              60 :     if( alloc3 == SWIG_NEWOBJ ) {
   13784               0 :       delete[] arg4;
   13785                 :     }
   13786                 :   }
   13787              60 :   if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
   13788              60 :   return resultobj;
   13789                 : fail:
   13790               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   13791                 :   {
   13792                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   13793               0 :     if( alloc3 == SWIG_NEWOBJ ) {
   13794               0 :       delete[] arg4;
   13795                 :     }
   13796                 :   }
   13797               0 :   if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
   13798               0 :   return NULL;
   13799                 : }
   13800                 : 
   13801                 : 
   13802            1191 : SWIGINTERN PyObject *_wrap_Geometry_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13803            1191 :   PyObject *resultobj = 0;
   13804            1191 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13805            1191 :   char **arg2 = (char **) 0 ;
   13806            1191 :   void *argp1 = 0 ;
   13807            1191 :   int res1 = 0 ;
   13808            1191 :   char *argout2 = 0 ;
   13809            1191 :   PyObject * obj0 = 0 ;
   13810                 :   OGRErr result;
   13811                 :   
   13812                 :   {
   13813                 :     /* %typemap(in,numinputs=0) (char **argout2) */
   13814            1191 :     arg2 = &argout2;
   13815                 :   }
   13816            1191 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_ExportToWkt",&obj0)) SWIG_fail;
   13817            1191 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13818            1191 :   if (!SWIG_IsOK(res1)) {
   13819               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkt" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13820                 :   }
   13821            1191 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13822                 :   {
   13823            1191 :     if ( bUseExceptions ) {
   13824               0 :       CPLErrorReset();
   13825                 :     }
   13826            1191 :     result = (OGRErr)OGRGeometryShadow_ExportToWkt(arg1,arg2);
   13827            1191 :     if ( bUseExceptions ) {
   13828               0 :       CPLErr eclass = CPLGetLastErrorType();
   13829               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13830               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13831                 :       }
   13832                 :     }
   13833                 :   }
   13834                 :   {
   13835                 :     /* %typemap(out) OGRErr */
   13836            1191 :     if ( result != 0 && bUseExceptions) {
   13837               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   13838               0 :       SWIG_fail;
   13839                 :     }
   13840                 :   }
   13841                 :   {
   13842                 :     /* %typemap(argout) (char **argout) */
   13843                 :     PyObject *o;
   13844            2382 :     if ( arg2 != NULL && *arg2 != NULL) {
   13845            1191 :       o = GDALPythonObjectFromCStr( *arg2 );
   13846                 :     }
   13847                 :     else {
   13848               0 :       o = Py_None;
   13849               0 :       Py_INCREF( o );
   13850                 :     }
   13851            1191 :     resultobj = t_output_helper(resultobj, o);
   13852                 :   }
   13853                 :   {
   13854                 :     /* %typemap(freearg) (char **argout) */
   13855            1191 :     if ( *arg2 )
   13856            1191 :     CPLFree( *arg2 );
   13857                 :   }
   13858                 :   {
   13859                 :     /* %typemap(ret) OGRErr */
   13860            1191 :     if (resultobj == Py_None ) {
   13861               0 :       Py_DECREF(resultobj);
   13862               0 :       resultobj = 0;
   13863                 :     }
   13864            1191 :     if (resultobj == 0) {
   13865               0 :       resultobj = PyInt_FromLong( result );
   13866                 :     }
   13867                 :   }
   13868            1191 :   return resultobj;
   13869                 : fail:
   13870                 :   {
   13871                 :     /* %typemap(freearg) (char **argout) */
   13872               0 :     if ( *arg2 )
   13873               0 :     CPLFree( *arg2 );
   13874                 :   }
   13875               0 :   return NULL;
   13876                 : }
   13877                 : 
   13878                 : 
   13879              57 : SWIGINTERN PyObject *_wrap_Geometry_ExportToWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13880              57 :   PyObject *resultobj = 0;
   13881              57 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13882              57 :   int *arg2 = (int *) 0 ;
   13883              57 :   char **arg3 = (char **) 0 ;
   13884              57 :   OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbXDR ;
   13885              57 :   void *argp1 = 0 ;
   13886              57 :   int res1 = 0 ;
   13887              57 :   int nLen2 = 0 ;
   13888              57 :   char *pBuf2 = 0 ;
   13889                 :   int val4 ;
   13890              57 :   int ecode4 = 0 ;
   13891              57 :   PyObject * obj0 = 0 ;
   13892              57 :   PyObject * obj1 = 0 ;
   13893                 :   char *  kwnames[] = {
   13894                 :     (char *) "self",(char *) "byte_order", NULL 
   13895              57 :   };
   13896                 :   OGRErr result;
   13897                 :   
   13898                 :   {
   13899                 :     /* %typemap(in,numinputs=0) (int *nLen2, char **pBuf2 ) */
   13900              57 :     arg2 = &nLen2;
   13901              57 :     arg3 = &pBuf2;
   13902                 :   }
   13903              57 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToWkb",kwnames,&obj0,&obj1)) SWIG_fail;
   13904              57 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13905              57 :   if (!SWIG_IsOK(res1)) {
   13906               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkb" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13907                 :   }
   13908              57 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13909              57 :   if (obj1) {
   13910              36 :     ecode4 = SWIG_AsVal_int(obj1, &val4);
   13911              36 :     if (!SWIG_IsOK(ecode4)) {
   13912               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_ExportToWkb" "', argument " "4"" of type '" "OGRwkbByteOrder""'");
   13913                 :     } 
   13914              36 :     arg4 = static_cast< OGRwkbByteOrder >(val4);
   13915                 :   }
   13916                 :   {
   13917              57 :     if ( bUseExceptions ) {
   13918               0 :       CPLErrorReset();
   13919                 :     }
   13920              57 :     result = (OGRErr)OGRGeometryShadow_ExportToWkb(arg1,arg2,arg3,arg4);
   13921              57 :     if ( bUseExceptions ) {
   13922               0 :       CPLErr eclass = CPLGetLastErrorType();
   13923               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13924               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13925                 :       }
   13926                 :     }
   13927                 :   }
   13928                 :   {
   13929                 :     /* %typemap(out) OGRErr */
   13930              57 :     if ( result != 0 && bUseExceptions) {
   13931               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   13932               0 :       SWIG_fail;
   13933                 :     }
   13934                 :   }
   13935                 :   {
   13936                 :     /* %typemap(argout) (int *nLen, char **pBuf ) */
   13937              57 :     Py_XDECREF(resultobj);
   13938                 : #if PY_VERSION_HEX >= 0x03000000
   13939                 :     resultobj = PyBytes_FromStringAndSize( *arg3, *arg2 );
   13940                 : #else
   13941              57 :     resultobj = PyString_FromStringAndSize( *arg3, *arg2 );
   13942                 : #endif
   13943                 :   }
   13944                 :   {
   13945                 :     /* %typemap(freearg) (int *nLen, char **pBuf ) */
   13946              57 :     if( *arg2 ) {
   13947              57 :       free( *arg3 );
   13948                 :     }
   13949                 :   }
   13950                 :   {
   13951                 :     /* %typemap(ret) OGRErr */
   13952              57 :     if (resultobj == Py_None ) {
   13953               0 :       Py_DECREF(resultobj);
   13954               0 :       resultobj = 0;
   13955                 :     }
   13956              57 :     if (resultobj == 0) {
   13957               0 :       resultobj = PyInt_FromLong( result );
   13958                 :     }
   13959                 :   }
   13960              57 :   return resultobj;
   13961                 : fail:
   13962                 :   {
   13963                 :     /* %typemap(freearg) (int *nLen, char **pBuf ) */
   13964               0 :     if( *arg2 ) {
   13965               0 :       free( *arg3 );
   13966                 :     }
   13967                 :   }
   13968               0 :   return NULL;
   13969                 : }
   13970                 : 
   13971                 : 
   13972              41 : SWIGINTERN PyObject *_wrap_Geometry_ExportToGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13973              41 :   PyObject *resultobj = 0;
   13974              41 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13975              41 :   char **arg2 = (char **) 0 ;
   13976              41 :   void *argp1 = 0 ;
   13977              41 :   int res1 = 0 ;
   13978              41 :   PyObject * obj0 = 0 ;
   13979              41 :   PyObject * obj1 = 0 ;
   13980                 :   char *  kwnames[] = {
   13981                 :     (char *) "self",(char *) "options", NULL 
   13982              41 :   };
   13983              41 :   retStringAndCPLFree *result = 0 ;
   13984                 :   
   13985              41 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToGML",kwnames,&obj0,&obj1)) SWIG_fail;
   13986              41 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13987              41 :   if (!SWIG_IsOK(res1)) {
   13988               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToGML" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13989                 :   }
   13990              41 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13991              41 :   if (obj1) {
   13992                 :     {
   13993                 :       /* %typemap(in) char **options */
   13994                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   13995              17 :       if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
   13996                 :   #if PY_VERSION_HEX < 0x03000000
   13997                 :         || PyString_Check(obj1)
   13998                 :   #endif
   13999                 :         ) {
   14000               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   14001               0 :         SWIG_fail;
   14002                 :       }
   14003                 :       
   14004              17 :       int size = PySequence_Size(obj1);
   14005              38 :       for (int i = 0; i < size; i++) {
   14006              21 :         PyObject* pyObj = PySequence_GetItem(obj1,i);
   14007              21 :         if (PyUnicode_Check(pyObj))
   14008                 :         {
   14009                 :           char *pszStr;
   14010                 :           Py_ssize_t nLen;
   14011               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   14012                 : #if PY_VERSION_HEX >= 0x03000000
   14013                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   14014                 : #else
   14015               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   14016                 : #endif
   14017               0 :           arg2 = CSLAddString( arg2, pszStr );
   14018               0 :           Py_XDECREF(pyUTF8Str);
   14019                 :         }
   14020                 : #if PY_VERSION_HEX >= 0x03000000
   14021                 :         else if (PyBytes_Check(pyObj))
   14022                 :         arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   14023                 : #else
   14024              21 :         else if (PyString_Check(pyObj))
   14025              21 :         arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   14026                 : #endif
   14027                 :         else
   14028                 :         {
   14029               0 :           Py_DECREF(pyObj);
   14030               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   14031               0 :           SWIG_fail;
   14032                 :         }
   14033              21 :         Py_DECREF(pyObj);
   14034                 :       }
   14035                 :     }
   14036                 :   }
   14037                 :   {
   14038              41 :     if ( bUseExceptions ) {
   14039               0 :       CPLErrorReset();
   14040                 :     }
   14041              41 :     result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML(arg1,arg2);
   14042              41 :     if ( bUseExceptions ) {
   14043               0 :       CPLErr eclass = CPLGetLastErrorType();
   14044               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14045               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14046                 :       }
   14047                 :     }
   14048                 :   }
   14049                 :   {
   14050                 :     /* %typemap(out) (retStringAndCPLFree*) */
   14051              41 :     if(result)
   14052                 :     {
   14053              41 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   14054              41 :       CPLFree(result);
   14055                 :     }
   14056                 :   }
   14057                 :   {
   14058                 :     /* %typemap(freearg) char **options */
   14059              41 :     CSLDestroy( arg2 );
   14060                 :   }
   14061              41 :   return resultobj;
   14062                 : fail:
   14063                 :   {
   14064                 :     /* %typemap(freearg) char **options */
   14065               0 :     CSLDestroy( arg2 );
   14066                 :   }
   14067               0 :   return NULL;
   14068                 : }
   14069                 : 
   14070                 : 
   14071               0 : SWIGINTERN PyObject *_wrap_Geometry_ExportToKML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14072               0 :   PyObject *resultobj = 0;
   14073               0 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14074               0 :   char *arg2 = (char *) NULL ;
   14075               0 :   void *argp1 = 0 ;
   14076               0 :   int res1 = 0 ;
   14077                 :   int res2 ;
   14078               0 :   char *buf2 = 0 ;
   14079               0 :   int alloc2 = 0 ;
   14080               0 :   PyObject * obj0 = 0 ;
   14081               0 :   PyObject * obj1 = 0 ;
   14082               0 :   retStringAndCPLFree *result = 0 ;
   14083                 :   
   14084               0 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_ExportToKML",&obj0,&obj1)) SWIG_fail;
   14085               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14086               0 :   if (!SWIG_IsOK(res1)) {
   14087               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToKML" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14088                 :   }
   14089               0 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14090               0 :   if (obj1) {
   14091               0 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   14092               0 :     if (!SWIG_IsOK(res2)) {
   14093               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_ExportToKML" "', argument " "2"" of type '" "char const *""'");
   14094                 :     }
   14095               0 :     arg2 = reinterpret_cast< char * >(buf2);
   14096                 :   }
   14097                 :   {
   14098               0 :     if ( bUseExceptions ) {
   14099               0 :       CPLErrorReset();
   14100                 :     }
   14101               0 :     result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToKML(arg1,(char const *)arg2);
   14102               0 :     if ( bUseExceptions ) {
   14103               0 :       CPLErr eclass = CPLGetLastErrorType();
   14104               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14105               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14106                 :       }
   14107                 :     }
   14108                 :   }
   14109                 :   {
   14110                 :     /* %typemap(out) (retStringAndCPLFree*) */
   14111               0 :     if(result)
   14112                 :     {
   14113               0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   14114               0 :       CPLFree(result);
   14115                 :     }
   14116                 :   }
   14117               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   14118               0 :   return resultobj;
   14119                 : fail:
   14120               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   14121               0 :   return NULL;
   14122                 : }
   14123                 : 
   14124                 : 
   14125               2 : SWIGINTERN PyObject *_wrap_Geometry_ExportToJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14126               2 :   PyObject *resultobj = 0;
   14127               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14128               2 :   char **arg2 = (char **) 0 ;
   14129               2 :   void *argp1 = 0 ;
   14130               2 :   int res1 = 0 ;
   14131               2 :   PyObject * obj0 = 0 ;
   14132               2 :   PyObject * obj1 = 0 ;
   14133                 :   char *  kwnames[] = {
   14134                 :     (char *) "self",(char *) "options", NULL 
   14135               2 :   };
   14136               2 :   retStringAndCPLFree *result = 0 ;
   14137                 :   
   14138               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToJson",kwnames,&obj0,&obj1)) SWIG_fail;
   14139               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14140               2 :   if (!SWIG_IsOK(res1)) {
   14141               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToJson" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14142                 :   }
   14143               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14144               2 :   if (obj1) {
   14145                 :     {
   14146                 :       /* %typemap(in) char **options */
   14147                 :       /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   14148               2 :       if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
   14149                 :   #if PY_VERSION_HEX < 0x03000000
   14150                 :         || PyString_Check(obj1)
   14151                 :   #endif
   14152                 :         ) {
   14153               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   14154               0 :         SWIG_fail;
   14155                 :       }
   14156                 :       
   14157               2 :       int size = PySequence_Size(obj1);
   14158               2 :       for (int i = 0; i < size; i++) {
   14159               0 :         PyObject* pyObj = PySequence_GetItem(obj1,i);
   14160               0 :         if (PyUnicode_Check(pyObj))
   14161                 :         {
   14162                 :           char *pszStr;
   14163                 :           Py_ssize_t nLen;
   14164               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   14165                 : #if PY_VERSION_HEX >= 0x03000000
   14166                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   14167                 : #else
   14168               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   14169                 : #endif
   14170               0 :           arg2 = CSLAddString( arg2, pszStr );
   14171               0 :           Py_XDECREF(pyUTF8Str);
   14172                 :         }
   14173                 : #if PY_VERSION_HEX >= 0x03000000
   14174                 :         else if (PyBytes_Check(pyObj))
   14175                 :         arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   14176                 : #else
   14177               0 :         else if (PyString_Check(pyObj))
   14178               0 :         arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   14179                 : #endif
   14180                 :         else
   14181                 :         {
   14182               0 :           Py_DECREF(pyObj);
   14183               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   14184               0 :           SWIG_fail;
   14185                 :         }
   14186               0 :         Py_DECREF(pyObj);
   14187                 :       }
   14188                 :     }
   14189                 :   }
   14190                 :   {
   14191               2 :     if ( bUseExceptions ) {
   14192               0 :       CPLErrorReset();
   14193                 :     }
   14194               2 :     result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson(arg1,arg2);
   14195               2 :     if ( bUseExceptions ) {
   14196               0 :       CPLErr eclass = CPLGetLastErrorType();
   14197               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14198               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14199                 :       }
   14200                 :     }
   14201                 :   }
   14202                 :   {
   14203                 :     /* %typemap(out) (retStringAndCPLFree*) */
   14204               2 :     if(result)
   14205                 :     {
   14206               2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   14207               2 :       CPLFree(result);
   14208                 :     }
   14209                 :   }
   14210                 :   {
   14211                 :     /* %typemap(freearg) char **options */
   14212               2 :     CSLDestroy( arg2 );
   14213                 :   }
   14214               2 :   return resultobj;
   14215                 : fail:
   14216                 :   {
   14217                 :     /* %typemap(freearg) char **options */
   14218               0 :     CSLDestroy( arg2 );
   14219                 :   }
   14220               0 :   return NULL;
   14221                 : }
   14222                 : 
   14223                 : 
   14224              10 : SWIGINTERN PyObject *_wrap_Geometry_AddPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14225              10 :   PyObject *resultobj = 0;
   14226              10 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14227                 :   double arg2 ;
   14228                 :   double arg3 ;
   14229              10 :   double arg4 = (double) 0 ;
   14230              10 :   void *argp1 = 0 ;
   14231              10 :   int res1 = 0 ;
   14232                 :   double val2 ;
   14233              10 :   int ecode2 = 0 ;
   14234                 :   double val3 ;
   14235              10 :   int ecode3 = 0 ;
   14236                 :   double val4 ;
   14237              10 :   int ecode4 = 0 ;
   14238              10 :   PyObject * obj0 = 0 ;
   14239              10 :   PyObject * obj1 = 0 ;
   14240              10 :   PyObject * obj2 = 0 ;
   14241              10 :   PyObject * obj3 = 0 ;
   14242                 :   char *  kwnames[] = {
   14243                 :     (char *) "self",(char *) "x",(char *) "y",(char *) "z", NULL 
   14244              10 :   };
   14245                 :   
   14246              10 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Geometry_AddPoint",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   14247              10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14248              10 :   if (!SWIG_IsOK(res1)) {
   14249               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14250                 :   }
   14251              10 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14252              10 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   14253              10 :   if (!SWIG_IsOK(ecode2)) {
   14254               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint" "', argument " "2"" of type '" "double""'");
   14255                 :   } 
   14256              10 :   arg2 = static_cast< double >(val2);
   14257              10 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   14258              10 :   if (!SWIG_IsOK(ecode3)) {
   14259               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint" "', argument " "3"" of type '" "double""'");
   14260                 :   } 
   14261              10 :   arg3 = static_cast< double >(val3);
   14262              10 :   if (obj3) {
   14263               0 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
   14264               0 :     if (!SWIG_IsOK(ecode4)) {
   14265               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPoint" "', argument " "4"" of type '" "double""'");
   14266                 :     } 
   14267               0 :     arg4 = static_cast< double >(val4);
   14268                 :   }
   14269                 :   {
   14270              10 :     if ( bUseExceptions ) {
   14271               0 :       CPLErrorReset();
   14272                 :     }
   14273                 :     OGRGeometryShadow_AddPoint(arg1,arg2,arg3,arg4);
   14274              10 :     if ( bUseExceptions ) {
   14275               0 :       CPLErr eclass = CPLGetLastErrorType();
   14276               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14277               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14278                 :       }
   14279                 :     }
   14280                 :   }
   14281              10 :   resultobj = SWIG_Py_Void();
   14282              10 :   return resultobj;
   14283                 : fail:
   14284               0 :   return NULL;
   14285                 : }
   14286                 : 
   14287                 : 
   14288              40 : SWIGINTERN PyObject *_wrap_Geometry_AddPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14289              40 :   PyObject *resultobj = 0;
   14290              40 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14291                 :   double arg2 ;
   14292                 :   double arg3 ;
   14293              40 :   void *argp1 = 0 ;
   14294              40 :   int res1 = 0 ;
   14295                 :   double val2 ;
   14296              40 :   int ecode2 = 0 ;
   14297                 :   double val3 ;
   14298              40 :   int ecode3 = 0 ;
   14299              40 :   PyObject * obj0 = 0 ;
   14300              40 :   PyObject * obj1 = 0 ;
   14301              40 :   PyObject * obj2 = 0 ;
   14302                 :   
   14303              40 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Geometry_AddPoint_2D",&obj0,&obj1,&obj2)) SWIG_fail;
   14304              40 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14305              40 :   if (!SWIG_IsOK(res1)) {
   14306               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14307                 :   }
   14308              40 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14309              40 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   14310              40 :   if (!SWIG_IsOK(ecode2)) {
   14311               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint_2D" "', argument " "2"" of type '" "double""'");
   14312                 :   } 
   14313              40 :   arg2 = static_cast< double >(val2);
   14314              40 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   14315              40 :   if (!SWIG_IsOK(ecode3)) {
   14316               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint_2D" "', argument " "3"" of type '" "double""'");
   14317                 :   } 
   14318              40 :   arg3 = static_cast< double >(val3);
   14319                 :   {
   14320              40 :     if ( bUseExceptions ) {
   14321               0 :       CPLErrorReset();
   14322                 :     }
   14323                 :     OGRGeometryShadow_AddPoint_2D(arg1,arg2,arg3);
   14324              40 :     if ( bUseExceptions ) {
   14325               0 :       CPLErr eclass = CPLGetLastErrorType();
   14326               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14327               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14328                 :       }
   14329                 :     }
   14330                 :   }
   14331              40 :   resultobj = SWIG_Py_Void();
   14332              40 :   return resultobj;
   14333                 : fail:
   14334               0 :   return NULL;
   14335                 : }
   14336                 : 
   14337                 : 
   14338               1 : SWIGINTERN PyObject *_wrap_Geometry_AddGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14339               1 :   PyObject *resultobj = 0;
   14340               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14341               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14342               1 :   void *argp1 = 0 ;
   14343               1 :   int res1 = 0 ;
   14344               1 :   int res2 = 0 ;
   14345               1 :   PyObject * obj0 = 0 ;
   14346               1 :   PyObject * obj1 = 0 ;
   14347                 :   OGRErr result;
   14348                 :   
   14349               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AddGeometryDirectly",&obj0,&obj1)) SWIG_fail;
   14350               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14351               1 :   if (!SWIG_IsOK(res1)) {
   14352               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometryDirectly" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14353                 :   }
   14354               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14355               1 :   res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
   14356               1 :   if (!SWIG_IsOK(res2)) {
   14357               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
   14358                 :   }
   14359                 :   {
   14360               1 :     if (!arg2) {
   14361               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14362                 :     }
   14363                 :   }
   14364                 :   {
   14365               1 :     if ( bUseExceptions ) {
   14366               0 :       CPLErrorReset();
   14367                 :     }
   14368               2 :     result = (OGRErr)OGRGeometryShadow_AddGeometryDirectly(arg1,arg2);
   14369               1 :     if ( bUseExceptions ) {
   14370               0 :       CPLErr eclass = CPLGetLastErrorType();
   14371               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14372               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14373                 :       }
   14374                 :     }
   14375                 :   }
   14376                 :   {
   14377                 :     /* %typemap(out) OGRErr */
   14378               1 :     if ( result != 0 && bUseExceptions) {
   14379               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   14380               0 :       SWIG_fail;
   14381                 :     }
   14382                 :   }
   14383                 :   {
   14384                 :     /* %typemap(ret) OGRErr */
   14385               1 :     if (resultobj == Py_None ) {
   14386               0 :       Py_DECREF(resultobj);
   14387               0 :       resultobj = 0;
   14388                 :     }
   14389               1 :     if (resultobj == 0) {
   14390               1 :       resultobj = PyInt_FromLong( result );
   14391                 :     }
   14392                 :   }
   14393               1 :   return resultobj;
   14394                 : fail:
   14395               0 :   return NULL;
   14396                 : }
   14397                 : 
   14398                 : 
   14399              49 : SWIGINTERN PyObject *_wrap_Geometry_AddGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14400              49 :   PyObject *resultobj = 0;
   14401              49 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14402              49 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14403              49 :   void *argp1 = 0 ;
   14404              49 :   int res1 = 0 ;
   14405              49 :   void *argp2 = 0 ;
   14406              49 :   int res2 = 0 ;
   14407              49 :   PyObject * obj0 = 0 ;
   14408              49 :   PyObject * obj1 = 0 ;
   14409                 :   OGRErr result;
   14410                 :   
   14411              49 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AddGeometry",&obj0,&obj1)) SWIG_fail;
   14412              49 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14413              49 :   if (!SWIG_IsOK(res1)) {
   14414               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14415                 :   }
   14416              49 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14417              49 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14418              49 :   if (!SWIG_IsOK(res2)) {
   14419               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14420                 :   }
   14421              49 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14422                 :   {
   14423              49 :     if (!arg2) {
   14424               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14425                 :     }
   14426                 :   }
   14427                 :   {
   14428              49 :     if ( bUseExceptions ) {
   14429               0 :       CPLErrorReset();
   14430                 :     }
   14431              49 :     result = (OGRErr)OGRGeometryShadow_AddGeometry(arg1,arg2);
   14432              49 :     if ( bUseExceptions ) {
   14433               0 :       CPLErr eclass = CPLGetLastErrorType();
   14434               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14435               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14436                 :       }
   14437                 :     }
   14438                 :   }
   14439                 :   {
   14440                 :     /* %typemap(out) OGRErr */
   14441              49 :     if ( result != 0 && bUseExceptions) {
   14442               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   14443               0 :       SWIG_fail;
   14444                 :     }
   14445                 :   }
   14446                 :   {
   14447                 :     /* %typemap(ret) OGRErr */
   14448              49 :     if (resultobj == Py_None ) {
   14449               0 :       Py_DECREF(resultobj);
   14450               0 :       resultobj = 0;
   14451                 :     }
   14452              49 :     if (resultobj == 0) {
   14453              49 :       resultobj = PyInt_FromLong( result );
   14454                 :     }
   14455                 :   }
   14456              49 :   return resultobj;
   14457                 : fail:
   14458               0 :   return NULL;
   14459                 : }
   14460                 : 
   14461                 : 
   14462           18631 : SWIGINTERN PyObject *_wrap_Geometry_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14463           18631 :   PyObject *resultobj = 0;
   14464           18631 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14465           18631 :   void *argp1 = 0 ;
   14466           18631 :   int res1 = 0 ;
   14467           18631 :   PyObject * obj0 = 0 ;
   14468           18631 :   OGRGeometryShadow *result = 0 ;
   14469                 :   
   14470           18631 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Clone",&obj0)) SWIG_fail;
   14471           18631 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14472           18631 :   if (!SWIG_IsOK(res1)) {
   14473               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Clone" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14474                 :   }
   14475           18631 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14476                 :   {
   14477           18631 :     if ( bUseExceptions ) {
   14478               0 :       CPLErrorReset();
   14479                 :     }
   14480           18631 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Clone(arg1);
   14481           18631 :     if ( bUseExceptions ) {
   14482               0 :       CPLErr eclass = CPLGetLastErrorType();
   14483               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14484               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14485                 :       }
   14486                 :     }
   14487                 :   }
   14488           18631 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   14489           18631 :   return resultobj;
   14490                 : fail:
   14491               0 :   return NULL;
   14492                 : }
   14493                 : 
   14494                 : 
   14495             211 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14496             211 :   PyObject *resultobj = 0;
   14497             211 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14498             211 :   void *argp1 = 0 ;
   14499             211 :   int res1 = 0 ;
   14500             211 :   PyObject * obj0 = 0 ;
   14501                 :   OGRwkbGeometryType result;
   14502                 :   
   14503             211 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryType",&obj0)) SWIG_fail;
   14504             211 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14505             211 :   if (!SWIG_IsOK(res1)) {
   14506               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryType" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14507                 :   }
   14508             211 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14509                 :   {
   14510             211 :     if ( bUseExceptions ) {
   14511               0 :       CPLErrorReset();
   14512                 :     }
   14513             211 :     result = (OGRwkbGeometryType)OGRGeometryShadow_GetGeometryType(arg1);
   14514             211 :     if ( bUseExceptions ) {
   14515               0 :       CPLErr eclass = CPLGetLastErrorType();
   14516               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14517               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14518                 :       }
   14519                 :     }
   14520                 :   }
   14521             422 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14522             211 :   return resultobj;
   14523                 : fail:
   14524               0 :   return NULL;
   14525                 : }
   14526                 : 
   14527                 : 
   14528            2976 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14529            2976 :   PyObject *resultobj = 0;
   14530            2976 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14531            2976 :   void *argp1 = 0 ;
   14532            2976 :   int res1 = 0 ;
   14533            2976 :   PyObject * obj0 = 0 ;
   14534            2976 :   char *result = 0 ;
   14535                 :   
   14536            2976 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryName",&obj0)) SWIG_fail;
   14537            2976 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14538            2976 :   if (!SWIG_IsOK(res1)) {
   14539               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryName" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14540                 :   }
   14541            2976 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14542                 :   {
   14543            2976 :     if ( bUseExceptions ) {
   14544               0 :       CPLErrorReset();
   14545                 :     }
   14546            2976 :     result = (char *)OGRGeometryShadow_GetGeometryName(arg1);
   14547            2976 :     if ( bUseExceptions ) {
   14548               0 :       CPLErr eclass = CPLGetLastErrorType();
   14549               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14550               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14551                 :       }
   14552                 :     }
   14553                 :   }
   14554            2976 :   resultobj = SWIG_FromCharPtr((const char *)result);
   14555            2976 :   return resultobj;
   14556                 : fail:
   14557               0 :   return NULL;
   14558                 : }
   14559                 : 
   14560                 : 
   14561              12 : SWIGINTERN PyObject *_wrap_Geometry_Length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14562              12 :   PyObject *resultobj = 0;
   14563              12 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14564              12 :   void *argp1 = 0 ;
   14565              12 :   int res1 = 0 ;
   14566              12 :   PyObject * obj0 = 0 ;
   14567                 :   double result;
   14568                 :   
   14569              12 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Length",&obj0)) SWIG_fail;
   14570              12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14571              12 :   if (!SWIG_IsOK(res1)) {
   14572               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Length" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14573                 :   }
   14574              12 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14575                 :   {
   14576              12 :     if ( bUseExceptions ) {
   14577               0 :       CPLErrorReset();
   14578                 :     }
   14579              12 :     result = (double)OGRGeometryShadow_Length(arg1);
   14580              12 :     if ( bUseExceptions ) {
   14581               0 :       CPLErr eclass = CPLGetLastErrorType();
   14582               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14583               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14584                 :       }
   14585                 :     }
   14586                 :   }
   14587              12 :   resultobj = SWIG_From_double(static_cast< double >(result));
   14588              12 :   return resultobj;
   14589                 : fail:
   14590               0 :   return NULL;
   14591                 : }
   14592                 : 
   14593                 : 
   14594               3 : SWIGINTERN PyObject *_wrap_Geometry_Area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14595               3 :   PyObject *resultobj = 0;
   14596               3 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14597               3 :   void *argp1 = 0 ;
   14598               3 :   int res1 = 0 ;
   14599               3 :   PyObject * obj0 = 0 ;
   14600                 :   double result;
   14601                 :   
   14602               3 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Area",&obj0)) SWIG_fail;
   14603               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14604               3 :   if (!SWIG_IsOK(res1)) {
   14605               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Area" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14606                 :   }
   14607               3 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14608                 :   {
   14609               3 :     if ( bUseExceptions ) {
   14610               0 :       CPLErrorReset();
   14611                 :     }
   14612               3 :     result = (double)OGRGeometryShadow_Area(arg1);
   14613               3 :     if ( bUseExceptions ) {
   14614               0 :       CPLErr eclass = CPLGetLastErrorType();
   14615               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14616               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14617                 :       }
   14618                 :     }
   14619                 :   }
   14620               3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   14621               3 :   return resultobj;
   14622                 : fail:
   14623               0 :   return NULL;
   14624                 : }
   14625                 : 
   14626                 : 
   14627               4 : SWIGINTERN PyObject *_wrap_Geometry_GetArea(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14628               4 :   PyObject *resultobj = 0;
   14629               4 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14630               4 :   void *argp1 = 0 ;
   14631               4 :   int res1 = 0 ;
   14632               4 :   PyObject * obj0 = 0 ;
   14633                 :   double result;
   14634                 :   
   14635               4 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetArea",&obj0)) SWIG_fail;
   14636               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14637               4 :   if (!SWIG_IsOK(res1)) {
   14638               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetArea" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14639                 :   }
   14640               4 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14641                 :   {
   14642               4 :     if ( bUseExceptions ) {
   14643               0 :       CPLErrorReset();
   14644                 :     }
   14645               4 :     result = (double)OGRGeometryShadow_GetArea(arg1);
   14646               4 :     if ( bUseExceptions ) {
   14647               0 :       CPLErr eclass = CPLGetLastErrorType();
   14648               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14649               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14650                 :       }
   14651                 :     }
   14652                 :   }
   14653               4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   14654               4 :   return resultobj;
   14655                 : fail:
   14656               0 :   return NULL;
   14657                 : }
   14658                 : 
   14659                 : 
   14660            3886 : SWIGINTERN PyObject *_wrap_Geometry_GetPointCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14661            3886 :   PyObject *resultobj = 0;
   14662            3886 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14663            3886 :   void *argp1 = 0 ;
   14664            3886 :   int res1 = 0 ;
   14665            3886 :   PyObject * obj0 = 0 ;
   14666                 :   int result;
   14667                 :   
   14668            3886 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetPointCount",&obj0)) SWIG_fail;
   14669            3886 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14670            3886 :   if (!SWIG_IsOK(res1)) {
   14671               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPointCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14672                 :   }
   14673            3886 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14674                 :   {
   14675            3886 :     if ( bUseExceptions ) {
   14676               0 :       CPLErrorReset();
   14677                 :     }
   14678            3886 :     result = (int)OGRGeometryShadow_GetPointCount(arg1);
   14679            3886 :     if ( bUseExceptions ) {
   14680               0 :       CPLErr eclass = CPLGetLastErrorType();
   14681               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14682               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14683                 :       }
   14684                 :     }
   14685                 :   }
   14686            3886 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14687            3886 :   return resultobj;
   14688                 : fail:
   14689               0 :   return NULL;
   14690                 : }
   14691                 : 
   14692                 : 
   14693              13 : SWIGINTERN PyObject *_wrap_Geometry_GetPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14694              13 :   PyObject *resultobj = 0;
   14695              13 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14696              13 :   int *arg2 = (int *) 0 ;
   14697              13 :   double **arg3 = (double **) 0 ;
   14698              13 :   double **arg4 = (double **) 0 ;
   14699              13 :   int arg5 = (int) 0 ;
   14700              13 :   void *argp1 = 0 ;
   14701              13 :   int res1 = 0 ;
   14702              13 :   int nPoints2 = 0 ;
   14703              13 :   double *padfXY2 = NULL ;
   14704              13 :   double *padfZ2 = NULL ;
   14705                 :   int val5 ;
   14706              13 :   int ecode5 = 0 ;
   14707              13 :   PyObject * obj0 = 0 ;
   14708              13 :   PyObject * obj1 = 0 ;
   14709                 :   char *  kwnames[] = {
   14710                 :     (char *) "self",(char *) "nCoordDimension", NULL 
   14711              13 :   };
   14712                 :   
   14713                 :   {
   14714                 :     /* %typemap(in,numinputs=0) (int* pnCount, double** ppadfXY, double** ppadfZ) */
   14715              13 :     arg2 = &nPoints2;
   14716              13 :     arg3 = &padfXY2;
   14717              13 :     arg4 = &padfZ2;
   14718                 :   }
   14719              13 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetPoints",kwnames,&obj0,&obj1)) SWIG_fail;
   14720              13 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14721              13 :   if (!SWIG_IsOK(res1)) {
   14722               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoints" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14723                 :   }
   14724              13 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14725              13 :   if (obj1) {
   14726               4 :     ecode5 = SWIG_AsVal_int(obj1, &val5);
   14727               4 :     if (!SWIG_IsOK(ecode5)) {
   14728               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_GetPoints" "', argument " "5"" of type '" "int""'");
   14729                 :     } 
   14730               4 :     arg5 = static_cast< int >(val5);
   14731                 :   }
   14732                 :   {
   14733              13 :     if ( bUseExceptions ) {
   14734               0 :       CPLErrorReset();
   14735                 :     }
   14736              13 :     OGRGeometryShadow_GetPoints(arg1,arg2,arg3,arg4,arg5);
   14737              13 :     if ( bUseExceptions ) {
   14738               0 :       CPLErr eclass = CPLGetLastErrorType();
   14739               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14740               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14741                 :       }
   14742                 :     }
   14743                 :   }
   14744              13 :   resultobj = SWIG_Py_Void();
   14745                 :   {
   14746                 :     /* %typemap(argout)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
   14747              13 :     Py_DECREF(resultobj);
   14748              13 :     int nPointCount = *(arg2);
   14749              13 :     if (nPointCount == 0)
   14750                 :     {
   14751               0 :       resultobj = Py_None;
   14752                 :     }
   14753                 :     else
   14754                 :     {
   14755              13 :       PyObject *xyz = PyList_New( nPointCount );
   14756              13 :       int nDimensions = (*arg4 != NULL) ? 3 : 2;
   14757             967 :       for( int i=0; i< nPointCount; i++ ) {
   14758             954 :         PyObject *tuple = PyTuple_New( nDimensions );
   14759             954 :         PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (*arg3)[2*i] ) );
   14760             954 :         PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (*arg3)[2*i+1] ) );
   14761             954 :         if (nDimensions == 3)
   14762             922 :         PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (*arg4)[i] ) );
   14763             954 :         PyList_SetItem( xyz, i, tuple );
   14764                 :       }
   14765              13 :       resultobj = xyz;
   14766                 :     }
   14767                 :   }
   14768                 :   {
   14769                 :     /* %typemap(freearg)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
   14770              13 :     VSIFree(*arg3);
   14771              13 :     VSIFree(*arg4);
   14772                 :   }
   14773              13 :   return resultobj;
   14774                 : fail:
   14775                 :   {
   14776                 :     /* %typemap(freearg)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
   14777               0 :     VSIFree(*arg3);
   14778               0 :     VSIFree(*arg4);
   14779                 :   }
   14780               0 :   return NULL;
   14781                 : }
   14782                 : 
   14783                 : 
   14784           17600 : SWIGINTERN PyObject *_wrap_Geometry_GetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14785           17600 :   PyObject *resultobj = 0;
   14786           17600 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14787           17600 :   int arg2 = (int) 0 ;
   14788           17600 :   void *argp1 = 0 ;
   14789           17600 :   int res1 = 0 ;
   14790                 :   int val2 ;
   14791           17600 :   int ecode2 = 0 ;
   14792           17600 :   PyObject * obj0 = 0 ;
   14793           17600 :   PyObject * obj1 = 0 ;
   14794                 :   char *  kwnames[] = {
   14795                 :     (char *) "self",(char *) "point", NULL 
   14796           17600 :   };
   14797                 :   double result;
   14798                 :   
   14799           17600 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetX",kwnames,&obj0,&obj1)) SWIG_fail;
   14800           17600 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14801           17600 :   if (!SWIG_IsOK(res1)) {
   14802               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetX" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14803                 :   }
   14804           17600 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14805           17600 :   if (obj1) {
   14806           17598 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   14807           17598 :     if (!SWIG_IsOK(ecode2)) {
   14808               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetX" "', argument " "2"" of type '" "int""'");
   14809                 :     } 
   14810           17598 :     arg2 = static_cast< int >(val2);
   14811                 :   }
   14812                 :   {
   14813           17600 :     if ( bUseExceptions ) {
   14814               0 :       CPLErrorReset();
   14815                 :     }
   14816           17600 :     result = (double)OGRGeometryShadow_GetX(arg1,arg2);
   14817           17600 :     if ( bUseExceptions ) {
   14818               0 :       CPLErr eclass = CPLGetLastErrorType();
   14819               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14820               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14821                 :       }
   14822                 :     }
   14823                 :   }
   14824           17600 :   resultobj = SWIG_From_double(static_cast< double >(result));
   14825           17600 :   return resultobj;
   14826                 : fail:
   14827               0 :   return NULL;
   14828                 : }
   14829                 : 
   14830                 : 
   14831           17600 : SWIGINTERN PyObject *_wrap_Geometry_GetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14832           17600 :   PyObject *resultobj = 0;
   14833           17600 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14834           17600 :   int arg2 = (int) 0 ;
   14835           17600 :   void *argp1 = 0 ;
   14836           17600 :   int res1 = 0 ;
   14837                 :   int val2 ;
   14838           17600 :   int ecode2 = 0 ;
   14839           17600 :   PyObject * obj0 = 0 ;
   14840           17600 :   PyObject * obj1 = 0 ;
   14841                 :   char *  kwnames[] = {
   14842                 :     (char *) "self",(char *) "point", NULL 
   14843           17600 :   };
   14844                 :   double result;
   14845                 :   
   14846           17600 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetY",kwnames,&obj0,&obj1)) SWIG_fail;
   14847           17600 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14848           17600 :   if (!SWIG_IsOK(res1)) {
   14849               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetY" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14850                 :   }
   14851           17600 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14852           17600 :   if (obj1) {
   14853           17598 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   14854           17598 :     if (!SWIG_IsOK(ecode2)) {
   14855               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetY" "', argument " "2"" of type '" "int""'");
   14856                 :     } 
   14857           17598 :     arg2 = static_cast< int >(val2);
   14858                 :   }
   14859                 :   {
   14860           17600 :     if ( bUseExceptions ) {
   14861               0 :       CPLErrorReset();
   14862                 :     }
   14863           17600 :     result = (double)OGRGeometryShadow_GetY(arg1,arg2);
   14864           17600 :     if ( bUseExceptions ) {
   14865               0 :       CPLErr eclass = CPLGetLastErrorType();
   14866               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14867               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14868                 :       }
   14869                 :     }
   14870                 :   }
   14871           17600 :   resultobj = SWIG_From_double(static_cast< double >(result));
   14872           17600 :   return resultobj;
   14873                 : fail:
   14874               0 :   return NULL;
   14875                 : }
   14876                 : 
   14877                 : 
   14878           17354 : SWIGINTERN PyObject *_wrap_Geometry_GetZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14879           17354 :   PyObject *resultobj = 0;
   14880           17354 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14881           17354 :   int arg2 = (int) 0 ;
   14882           17354 :   void *argp1 = 0 ;
   14883           17354 :   int res1 = 0 ;
   14884                 :   int val2 ;
   14885           17354 :   int ecode2 = 0 ;
   14886           17354 :   PyObject * obj0 = 0 ;
   14887           17354 :   PyObject * obj1 = 0 ;
   14888                 :   char *  kwnames[] = {
   14889                 :     (char *) "self",(char *) "point", NULL 
   14890           17354 :   };
   14891                 :   double result;
   14892                 :   
   14893           17354 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetZ",kwnames,&obj0,&obj1)) SWIG_fail;
   14894           17354 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14895           17354 :   if (!SWIG_IsOK(res1)) {
   14896               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetZ" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14897                 :   }
   14898           17354 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14899           17354 :   if (obj1) {
   14900           17354 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   14901           17354 :     if (!SWIG_IsOK(ecode2)) {
   14902               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetZ" "', argument " "2"" of type '" "int""'");
   14903                 :     } 
   14904           17354 :     arg2 = static_cast< int >(val2);
   14905                 :   }
   14906                 :   {
   14907           17354 :     if ( bUseExceptions ) {
   14908               0 :       CPLErrorReset();
   14909                 :     }
   14910           17354 :     result = (double)OGRGeometryShadow_GetZ(arg1,arg2);
   14911           17354 :     if ( bUseExceptions ) {
   14912               0 :       CPLErr eclass = CPLGetLastErrorType();
   14913               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14914               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14915                 :       }
   14916                 :     }
   14917                 :   }
   14918           17354 :   resultobj = SWIG_From_double(static_cast< double >(result));
   14919           17354 :   return resultobj;
   14920                 : fail:
   14921               0 :   return NULL;
   14922                 : }
   14923                 : 
   14924                 : 
   14925               4 : SWIGINTERN PyObject *_wrap_Geometry_GetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14926               4 :   PyObject *resultobj = 0;
   14927               4 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14928               4 :   int arg2 = (int) 0 ;
   14929               4 :   double *arg3 = (double *) (double *)NULL ;
   14930               4 :   void *argp1 = 0 ;
   14931               4 :   int res1 = 0 ;
   14932                 :   int val2 ;
   14933               4 :   int ecode2 = 0 ;
   14934                 :   double argout3[3] ;
   14935               4 :   PyObject * obj0 = 0 ;
   14936               4 :   PyObject * obj1 = 0 ;
   14937                 :   
   14938                 :   {
   14939                 :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   14940               4 :     arg3 = argout3;
   14941                 :   }
   14942               4 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_GetPoint",&obj0,&obj1)) SWIG_fail;
   14943               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14944               4 :   if (!SWIG_IsOK(res1)) {
   14945               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14946                 :   }
   14947               4 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14948               4 :   if (obj1) {
   14949               4 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   14950               4 :     if (!SWIG_IsOK(ecode2)) {
   14951               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint" "', argument " "2"" of type '" "int""'");
   14952                 :     } 
   14953               4 :     arg2 = static_cast< int >(val2);
   14954                 :   }
   14955                 :   {
   14956               4 :     if ( bUseExceptions ) {
   14957               0 :       CPLErrorReset();
   14958                 :     }
   14959                 :     OGRGeometryShadow_GetPoint(arg1,arg2,arg3);
   14960               4 :     if ( bUseExceptions ) {
   14961               0 :       CPLErr eclass = CPLGetLastErrorType();
   14962               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14963               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14964                 :       }
   14965                 :     }
   14966                 :   }
   14967               4 :   resultobj = SWIG_Py_Void();
   14968                 :   {
   14969                 :     /* %typemap(argout) (double argout[ANY]) */
   14970               4 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
   14971               4 :     resultobj = t_output_helper(resultobj,out);
   14972                 :   }
   14973               4 :   return resultobj;
   14974                 : fail:
   14975               0 :   return NULL;
   14976                 : }
   14977                 : 
   14978                 : 
   14979               2 : SWIGINTERN PyObject *_wrap_Geometry_GetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14980               2 :   PyObject *resultobj = 0;
   14981               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14982               2 :   int arg2 = (int) 0 ;
   14983               2 :   double *arg3 = (double *) (double *)NULL ;
   14984               2 :   void *argp1 = 0 ;
   14985               2 :   int res1 = 0 ;
   14986                 :   int val2 ;
   14987               2 :   int ecode2 = 0 ;
   14988                 :   double argout3[2] ;
   14989               2 :   PyObject * obj0 = 0 ;
   14990               2 :   PyObject * obj1 = 0 ;
   14991                 :   
   14992                 :   {
   14993                 :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   14994               2 :     arg3 = argout3;
   14995                 :   }
   14996               2 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_GetPoint_2D",&obj0,&obj1)) SWIG_fail;
   14997               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14998               2 :   if (!SWIG_IsOK(res1)) {
   14999               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15000                 :   }
   15001               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15002               2 :   if (obj1) {
   15003               2 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   15004               2 :     if (!SWIG_IsOK(ecode2)) {
   15005               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint_2D" "', argument " "2"" of type '" "int""'");
   15006                 :     } 
   15007               2 :     arg2 = static_cast< int >(val2);
   15008                 :   }
   15009                 :   {
   15010               2 :     if ( bUseExceptions ) {
   15011               0 :       CPLErrorReset();
   15012                 :     }
   15013                 :     OGRGeometryShadow_GetPoint_2D(arg1,arg2,arg3);
   15014               2 :     if ( bUseExceptions ) {
   15015               0 :       CPLErr eclass = CPLGetLastErrorType();
   15016               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15017               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15018                 :       }
   15019                 :     }
   15020                 :   }
   15021               2 :   resultobj = SWIG_Py_Void();
   15022                 :   {
   15023                 :     /* %typemap(argout) (double argout[ANY]) */
   15024               2 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 2 );
   15025               2 :     resultobj = t_output_helper(resultobj,out);
   15026                 :   }
   15027               2 :   return resultobj;
   15028                 : fail:
   15029               0 :   return NULL;
   15030                 : }
   15031                 : 
   15032                 : 
   15033            4863 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15034            4863 :   PyObject *resultobj = 0;
   15035            4863 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15036            4863 :   void *argp1 = 0 ;
   15037            4863 :   int res1 = 0 ;
   15038            4863 :   PyObject * obj0 = 0 ;
   15039                 :   int result;
   15040                 :   
   15041            4863 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryCount",&obj0)) SWIG_fail;
   15042            4863 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15043            4863 :   if (!SWIG_IsOK(res1)) {
   15044               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15045                 :   }
   15046            4863 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15047                 :   {
   15048            4863 :     if ( bUseExceptions ) {
   15049               0 :       CPLErrorReset();
   15050                 :     }
   15051            4863 :     result = (int)OGRGeometryShadow_GetGeometryCount(arg1);
   15052            4863 :     if ( bUseExceptions ) {
   15053               0 :       CPLErr eclass = CPLGetLastErrorType();
   15054               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15055               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15056                 :       }
   15057                 :     }
   15058                 :   }
   15059            4863 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15060            4863 :   return resultobj;
   15061                 : fail:
   15062               0 :   return NULL;
   15063                 : }
   15064                 : 
   15065                 : 
   15066             250 : SWIGINTERN PyObject *_wrap_Geometry_SetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15067             250 :   PyObject *resultobj = 0;
   15068             250 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15069                 :   int arg2 ;
   15070                 :   double arg3 ;
   15071                 :   double arg4 ;
   15072             250 :   double arg5 = (double) 0 ;
   15073             250 :   void *argp1 = 0 ;
   15074             250 :   int res1 = 0 ;
   15075                 :   int val2 ;
   15076             250 :   int ecode2 = 0 ;
   15077                 :   double val3 ;
   15078             250 :   int ecode3 = 0 ;
   15079                 :   double val4 ;
   15080             250 :   int ecode4 = 0 ;
   15081                 :   double val5 ;
   15082             250 :   int ecode5 = 0 ;
   15083             250 :   PyObject * obj0 = 0 ;
   15084             250 :   PyObject * obj1 = 0 ;
   15085             250 :   PyObject * obj2 = 0 ;
   15086             250 :   PyObject * obj3 = 0 ;
   15087             250 :   PyObject * obj4 = 0 ;
   15088                 :   char *  kwnames[] = {
   15089                 :     (char *) "self",(char *) "point",(char *) "x",(char *) "y",(char *) "z", NULL 
   15090             250 :   };
   15091                 :   
   15092             250 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:Geometry_SetPoint",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   15093             250 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15094             250 :   if (!SWIG_IsOK(res1)) {
   15095               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15096                 :   }
   15097             250 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15098             250 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   15099             250 :   if (!SWIG_IsOK(ecode2)) {
   15100               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint" "', argument " "2"" of type '" "int""'");
   15101                 :   } 
   15102             250 :   arg2 = static_cast< int >(val2);
   15103             250 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   15104             250 :   if (!SWIG_IsOK(ecode3)) {
   15105               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint" "', argument " "3"" of type '" "double""'");
   15106                 :   } 
   15107             250 :   arg3 = static_cast< double >(val3);
   15108             250 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   15109             250 :   if (!SWIG_IsOK(ecode4)) {
   15110               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint" "', argument " "4"" of type '" "double""'");
   15111                 :   } 
   15112             250 :   arg4 = static_cast< double >(val4);
   15113             250 :   if (obj4) {
   15114             248 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
   15115             248 :     if (!SWIG_IsOK(ecode5)) {
   15116               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPoint" "', argument " "5"" of type '" "double""'");
   15117                 :     } 
   15118             248 :     arg5 = static_cast< double >(val5);
   15119                 :   }
   15120                 :   {
   15121             250 :     if ( bUseExceptions ) {
   15122               0 :       CPLErrorReset();
   15123                 :     }
   15124                 :     OGRGeometryShadow_SetPoint(arg1,arg2,arg3,arg4,arg5);
   15125             250 :     if ( bUseExceptions ) {
   15126               0 :       CPLErr eclass = CPLGetLastErrorType();
   15127               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15128               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15129                 :       }
   15130                 :     }
   15131                 :   }
   15132             250 :   resultobj = SWIG_Py_Void();
   15133             250 :   return resultobj;
   15134                 : fail:
   15135               0 :   return NULL;
   15136                 : }
   15137                 : 
   15138                 : 
   15139               1 : SWIGINTERN PyObject *_wrap_Geometry_SetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15140               1 :   PyObject *resultobj = 0;
   15141               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15142                 :   int arg2 ;
   15143                 :   double arg3 ;
   15144                 :   double arg4 ;
   15145               1 :   void *argp1 = 0 ;
   15146               1 :   int res1 = 0 ;
   15147                 :   int val2 ;
   15148               1 :   int ecode2 = 0 ;
   15149                 :   double val3 ;
   15150               1 :   int ecode3 = 0 ;
   15151                 :   double val4 ;
   15152               1 :   int ecode4 = 0 ;
   15153               1 :   PyObject * obj0 = 0 ;
   15154               1 :   PyObject * obj1 = 0 ;
   15155               1 :   PyObject * obj2 = 0 ;
   15156               1 :   PyObject * obj3 = 0 ;
   15157                 :   char *  kwnames[] = {
   15158                 :     (char *) "self",(char *) "point",(char *) "x",(char *) "y", NULL 
   15159               1 :   };
   15160                 :   
   15161               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Geometry_SetPoint_2D",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   15162               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15163               1 :   if (!SWIG_IsOK(res1)) {
   15164               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15165                 :   }
   15166               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15167               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   15168               1 :   if (!SWIG_IsOK(ecode2)) {
   15169               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint_2D" "', argument " "2"" of type '" "int""'");
   15170                 :   } 
   15171               1 :   arg2 = static_cast< int >(val2);
   15172               1 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   15173               1 :   if (!SWIG_IsOK(ecode3)) {
   15174               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint_2D" "', argument " "3"" of type '" "double""'");
   15175                 :   } 
   15176               1 :   arg3 = static_cast< double >(val3);
   15177               1 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   15178               1 :   if (!SWIG_IsOK(ecode4)) {
   15179               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint_2D" "', argument " "4"" of type '" "double""'");
   15180                 :   } 
   15181               1 :   arg4 = static_cast< double >(val4);
   15182                 :   {
   15183               1 :     if ( bUseExceptions ) {
   15184               0 :       CPLErrorReset();
   15185                 :     }
   15186                 :     OGRGeometryShadow_SetPoint_2D(arg1,arg2,arg3,arg4);
   15187               1 :     if ( bUseExceptions ) {
   15188               0 :       CPLErr eclass = CPLGetLastErrorType();
   15189               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15190               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15191                 :       }
   15192                 :     }
   15193                 :   }
   15194               1 :   resultobj = SWIG_Py_Void();
   15195               1 :   return resultobj;
   15196                 : fail:
   15197               0 :   return NULL;
   15198                 : }
   15199                 : 
   15200                 : 
   15201            2385 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15202            2385 :   PyObject *resultobj = 0;
   15203            2385 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15204                 :   int arg2 ;
   15205            2385 :   void *argp1 = 0 ;
   15206            2385 :   int res1 = 0 ;
   15207                 :   int val2 ;
   15208            2385 :   int ecode2 = 0 ;
   15209            2385 :   PyObject * obj0 = 0 ;
   15210            2385 :   PyObject * obj1 = 0 ;
   15211            2385 :   OGRGeometryShadow *result = 0 ;
   15212                 :   
   15213            2385 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_GetGeometryRef",&obj0,&obj1)) SWIG_fail;
   15214            1559 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15215            1559 :   if (!SWIG_IsOK(res1)) {
   15216               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryRef" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15217                 :   }
   15218            1559 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15219            1559 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   15220            1559 :   if (!SWIG_IsOK(ecode2)) {
   15221               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetGeometryRef" "', argument " "2"" of type '" "int""'");
   15222                 :   } 
   15223            1559 :   arg2 = static_cast< int >(val2);
   15224                 :   {
   15225            1559 :     if ( bUseExceptions ) {
   15226               0 :       CPLErrorReset();
   15227                 :     }
   15228            1559 :     result = (OGRGeometryShadow *)OGRGeometryShadow_GetGeometryRef(arg1,arg2);
   15229            1559 :     if ( bUseExceptions ) {
   15230               0 :       CPLErr eclass = CPLGetLastErrorType();
   15231               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15232               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15233                 :       }
   15234                 :     }
   15235                 :   }
   15236            1559 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15237            1559 :   return resultobj;
   15238                 : fail:
   15239             826 :   return NULL;
   15240                 : }
   15241                 : 
   15242                 : 
   15243               1 : SWIGINTERN PyObject *_wrap_Geometry_Simplify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15244               1 :   PyObject *resultobj = 0;
   15245               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15246                 :   double arg2 ;
   15247               1 :   void *argp1 = 0 ;
   15248               1 :   int res1 = 0 ;
   15249                 :   double val2 ;
   15250               1 :   int ecode2 = 0 ;
   15251               1 :   PyObject * obj0 = 0 ;
   15252               1 :   PyObject * obj1 = 0 ;
   15253               1 :   OGRGeometryShadow *result = 0 ;
   15254                 :   
   15255               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Simplify",&obj0,&obj1)) SWIG_fail;
   15256               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15257               1 :   if (!SWIG_IsOK(res1)) {
   15258               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Simplify" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15259                 :   }
   15260               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15261               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   15262               1 :   if (!SWIG_IsOK(ecode2)) {
   15263               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Simplify" "', argument " "2"" of type '" "double""'");
   15264                 :   } 
   15265               1 :   arg2 = static_cast< double >(val2);
   15266                 :   {
   15267               1 :     if ( bUseExceptions ) {
   15268               0 :       CPLErrorReset();
   15269                 :     }
   15270               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
   15271               1 :     if ( bUseExceptions ) {
   15272               0 :       CPLErr eclass = CPLGetLastErrorType();
   15273               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15274               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15275                 :       }
   15276                 :     }
   15277                 :   }
   15278               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15279               1 :   return resultobj;
   15280                 : fail:
   15281               0 :   return NULL;
   15282                 : }
   15283                 : 
   15284                 : 
   15285               1 : SWIGINTERN PyObject *_wrap_Geometry_SimplifyPreserveTopology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15286               1 :   PyObject *resultobj = 0;
   15287               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15288                 :   double arg2 ;
   15289               1 :   void *argp1 = 0 ;
   15290               1 :   int res1 = 0 ;
   15291                 :   double val2 ;
   15292               1 :   int ecode2 = 0 ;
   15293               1 :   PyObject * obj0 = 0 ;
   15294               1 :   PyObject * obj1 = 0 ;
   15295               1 :   OGRGeometryShadow *result = 0 ;
   15296                 :   
   15297               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SimplifyPreserveTopology",&obj0,&obj1)) SWIG_fail;
   15298               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15299               1 :   if (!SWIG_IsOK(res1)) {
   15300               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15301                 :   }
   15302               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15303               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   15304               1 :   if (!SWIG_IsOK(ecode2)) {
   15305               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "2"" of type '" "double""'");
   15306                 :   } 
   15307               1 :   arg2 = static_cast< double >(val2);
   15308                 :   {
   15309               1 :     if ( bUseExceptions ) {
   15310               0 :       CPLErrorReset();
   15311                 :     }
   15312               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_SimplifyPreserveTopology(arg1,arg2);
   15313               1 :     if ( bUseExceptions ) {
   15314               0 :       CPLErr eclass = CPLGetLastErrorType();
   15315               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15316               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15317                 :       }
   15318                 :     }
   15319                 :   }
   15320               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15321               1 :   return resultobj;
   15322                 : fail:
   15323               0 :   return NULL;
   15324                 : }
   15325                 : 
   15326                 : 
   15327               1 : SWIGINTERN PyObject *_wrap_Geometry_Boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15328               1 :   PyObject *resultobj = 0;
   15329               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15330               1 :   void *argp1 = 0 ;
   15331               1 :   int res1 = 0 ;
   15332               1 :   PyObject * obj0 = 0 ;
   15333               1 :   OGRGeometryShadow *result = 0 ;
   15334                 :   
   15335               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Boundary",&obj0)) SWIG_fail;
   15336               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15337               1 :   if (!SWIG_IsOK(res1)) {
   15338               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Boundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15339                 :   }
   15340               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15341                 :   {
   15342               1 :     if ( bUseExceptions ) {
   15343               0 :       CPLErrorReset();
   15344                 :     }
   15345               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
   15346               1 :     if ( bUseExceptions ) {
   15347               0 :       CPLErr eclass = CPLGetLastErrorType();
   15348               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15349               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15350                 :       }
   15351                 :     }
   15352                 :   }
   15353               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15354               1 :   return resultobj;
   15355                 : fail:
   15356               0 :   return NULL;
   15357                 : }
   15358                 : 
   15359                 : 
   15360               5 : SWIGINTERN PyObject *_wrap_Geometry_GetBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15361               5 :   PyObject *resultobj = 0;
   15362               5 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15363               5 :   void *argp1 = 0 ;
   15364               5 :   int res1 = 0 ;
   15365               5 :   PyObject * obj0 = 0 ;
   15366               5 :   OGRGeometryShadow *result = 0 ;
   15367                 :   
   15368               5 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetBoundary",&obj0)) SWIG_fail;
   15369               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15370               5 :   if (!SWIG_IsOK(res1)) {
   15371               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetBoundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15372                 :   }
   15373               5 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15374                 :   {
   15375               5 :     if ( bUseExceptions ) {
   15376               0 :       CPLErrorReset();
   15377                 :     }
   15378               5 :     result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
   15379               5 :     if ( bUseExceptions ) {
   15380               0 :       CPLErr eclass = CPLGetLastErrorType();
   15381               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15382               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15383                 :       }
   15384                 :     }
   15385                 :   }
   15386               5 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15387               5 :   return resultobj;
   15388                 : fail:
   15389               0 :   return NULL;
   15390                 : }
   15391                 : 
   15392                 : 
   15393               1 : SWIGINTERN PyObject *_wrap_Geometry_ConvexHull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15394               1 :   PyObject *resultobj = 0;
   15395               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15396               1 :   void *argp1 = 0 ;
   15397               1 :   int res1 = 0 ;
   15398               1 :   PyObject * obj0 = 0 ;
   15399               1 :   OGRGeometryShadow *result = 0 ;
   15400                 :   
   15401               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_ConvexHull",&obj0)) SWIG_fail;
   15402               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15403               1 :   if (!SWIG_IsOK(res1)) {
   15404               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ConvexHull" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15405                 :   }
   15406               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15407                 :   {
   15408               1 :     if ( bUseExceptions ) {
   15409               0 :       CPLErrorReset();
   15410                 :     }
   15411               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
   15412               1 :     if ( bUseExceptions ) {
   15413               0 :       CPLErr eclass = CPLGetLastErrorType();
   15414               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15415               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15416                 :       }
   15417                 :     }
   15418                 :   }
   15419               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15420               1 :   return resultobj;
   15421                 : fail:
   15422               0 :   return NULL;
   15423                 : }
   15424                 : 
   15425                 : 
   15426               1 : SWIGINTERN PyObject *_wrap_Geometry_Buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15427               1 :   PyObject *resultobj = 0;
   15428               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15429                 :   double arg2 ;
   15430               1 :   int arg3 = (int) 30 ;
   15431               1 :   void *argp1 = 0 ;
   15432               1 :   int res1 = 0 ;
   15433                 :   double val2 ;
   15434               1 :   int ecode2 = 0 ;
   15435                 :   int val3 ;
   15436               1 :   int ecode3 = 0 ;
   15437               1 :   PyObject * obj0 = 0 ;
   15438               1 :   PyObject * obj1 = 0 ;
   15439               1 :   PyObject * obj2 = 0 ;
   15440                 :   char *  kwnames[] = {
   15441                 :     (char *) "self",(char *) "distance",(char *) "quadsecs", NULL 
   15442               1 :   };
   15443               1 :   OGRGeometryShadow *result = 0 ;
   15444                 :   
   15445               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Geometry_Buffer",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   15446               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15447               1 :   if (!SWIG_IsOK(res1)) {
   15448               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Buffer" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15449                 :   }
   15450               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15451               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   15452               1 :   if (!SWIG_IsOK(ecode2)) {
   15453               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Buffer" "', argument " "2"" of type '" "double""'");
   15454                 :   } 
   15455               1 :   arg2 = static_cast< double >(val2);
   15456               1 :   if (obj2) {
   15457               1 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   15458               1 :     if (!SWIG_IsOK(ecode3)) {
   15459               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_Buffer" "', argument " "3"" of type '" "int""'");
   15460                 :     } 
   15461               1 :     arg3 = static_cast< int >(val3);
   15462                 :   }
   15463                 :   {
   15464               1 :     if ( bUseExceptions ) {
   15465               0 :       CPLErrorReset();
   15466                 :     }
   15467               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer(arg1,arg2,arg3);
   15468               1 :     if ( bUseExceptions ) {
   15469               0 :       CPLErr eclass = CPLGetLastErrorType();
   15470               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15471               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15472                 :       }
   15473                 :     }
   15474                 :   }
   15475               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15476               1 :   return resultobj;
   15477                 : fail:
   15478               0 :   return NULL;
   15479                 : }
   15480                 : 
   15481                 : 
   15482              45 : SWIGINTERN PyObject *_wrap_Geometry_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15483              45 :   PyObject *resultobj = 0;
   15484              45 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15485              45 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   15486              45 :   void *argp1 = 0 ;
   15487              45 :   int res1 = 0 ;
   15488              45 :   void *argp2 = 0 ;
   15489              45 :   int res2 = 0 ;
   15490              45 :   PyObject * obj0 = 0 ;
   15491              45 :   PyObject * obj1 = 0 ;
   15492              45 :   OGRGeometryShadow *result = 0 ;
   15493                 :   
   15494              45 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersection",&obj0,&obj1)) SWIG_fail;
   15495              45 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15496              45 :   if (!SWIG_IsOK(res1)) {
   15497               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersection" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15498                 :   }
   15499              45 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15500              45 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15501              45 :   if (!SWIG_IsOK(res2)) {
   15502               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersection" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   15503                 :   }
   15504              45 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   15505                 :   {
   15506              45 :     if (!arg2) {
   15507               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15508                 :     }
   15509                 :   }
   15510                 :   {
   15511              45 :     if ( bUseExceptions ) {
   15512               0 :       CPLErrorReset();
   15513                 :     }
   15514              45 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
   15515              45 :     if ( bUseExceptions ) {
   15516               0 :       CPLErr eclass = CPLGetLastErrorType();
   15517               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15518               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15519                 :       }
   15520                 :     }
   15521                 :   }
   15522              45 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15523              45 :   return resultobj;
   15524                 : fail:
   15525               0 :   return NULL;
   15526                 : }
   15527                 : 
   15528                 : 
   15529               3 : SWIGINTERN PyObject *_wrap_Geometry_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15530               3 :   PyObject *resultobj = 0;
   15531               3 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15532               3 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   15533               3 :   void *argp1 = 0 ;
   15534               3 :   int res1 = 0 ;
   15535               3 :   void *argp2 = 0 ;
   15536               3 :   int res2 = 0 ;
   15537               3 :   PyObject * obj0 = 0 ;
   15538               3 :   PyObject * obj1 = 0 ;
   15539               3 :   OGRGeometryShadow *result = 0 ;
   15540                 :   
   15541               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Union",&obj0,&obj1)) SWIG_fail;
   15542               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15543               3 :   if (!SWIG_IsOK(res1)) {
   15544               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Union" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15545                 :   }
   15546               3 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15547               3 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15548               3 :   if (!SWIG_IsOK(res2)) {
   15549               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Union" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   15550                 :   }
   15551               3 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   15552                 :   {
   15553               3 :     if (!arg2) {
   15554               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15555                 :     }
   15556                 :   }
   15557                 :   {
   15558               3 :     if ( bUseExceptions ) {
   15559               0 :       CPLErrorReset();
   15560                 :     }
   15561               3 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
   15562               3 :     if ( bUseExceptions ) {
   15563               0 :       CPLErr eclass = CPLGetLastErrorType();
   15564               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15565               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15566                 :       }
   15567                 :     }
   15568                 :   }
   15569               3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15570               3 :   return resultobj;
   15571                 : fail:
   15572               0 :   return NULL;
   15573                 : }
   15574                 : 
   15575                 : 
   15576               1 : SWIGINTERN PyObject *_wrap_Geometry_UnionCascaded(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15577               1 :   PyObject *resultobj = 0;
   15578               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15579               1 :   void *argp1 = 0 ;
   15580               1 :   int res1 = 0 ;
   15581               1 :   PyObject * obj0 = 0 ;
   15582               1 :   OGRGeometryShadow *result = 0 ;
   15583                 :   
   15584               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_UnionCascaded",&obj0)) SWIG_fail;
   15585               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15586               1 :   if (!SWIG_IsOK(res1)) {
   15587               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_UnionCascaded" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15588                 :   }
   15589               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15590                 :   {
   15591               1 :     if ( bUseExceptions ) {
   15592               0 :       CPLErrorReset();
   15593                 :     }
   15594               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
   15595               1 :     if ( bUseExceptions ) {
   15596               0 :       CPLErr eclass = CPLGetLastErrorType();
   15597               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15598               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15599                 :       }
   15600                 :     }
   15601                 :   }
   15602               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15603               1 :   return resultobj;
   15604                 : fail:
   15605               0 :   return NULL;
   15606                 : }
   15607                 : 
   15608                 : 
   15609               1 : SWIGINTERN PyObject *_wrap_Geometry_Difference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15610               1 :   PyObject *resultobj = 0;
   15611               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15612               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   15613               1 :   void *argp1 = 0 ;
   15614               1 :   int res1 = 0 ;
   15615               1 :   void *argp2 = 0 ;
   15616               1 :   int res2 = 0 ;
   15617               1 :   PyObject * obj0 = 0 ;
   15618               1 :   PyObject * obj1 = 0 ;
   15619               1 :   OGRGeometryShadow *result = 0 ;
   15620                 :   
   15621               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Difference",&obj0,&obj1)) SWIG_fail;
   15622               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15623               1 :   if (!SWIG_IsOK(res1)) {
   15624               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Difference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15625                 :   }
   15626               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15627               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15628               1 :   if (!SWIG_IsOK(res2)) {
   15629               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Difference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   15630                 :   }
   15631               1 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   15632                 :   {
   15633               1 :     if (!arg2) {
   15634               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15635                 :     }
   15636                 :   }
   15637                 :   {
   15638               1 :     if ( bUseExceptions ) {
   15639               0 :       CPLErrorReset();
   15640                 :     }
   15641               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
   15642               1 :     if ( bUseExceptions ) {
   15643               0 :       CPLErr eclass = CPLGetLastErrorType();
   15644               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15645               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15646                 :       }
   15647                 :     }
   15648                 :   }
   15649               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15650               1 :   return resultobj;
   15651                 : fail:
   15652               0 :   return NULL;
   15653                 : }
   15654                 : 
   15655                 : 
   15656               1 : SWIGINTERN PyObject *_wrap_Geometry_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15657               1 :   PyObject *resultobj = 0;
   15658               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15659               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   15660               1 :   void *argp1 = 0 ;
   15661               1 :   int res1 = 0 ;
   15662               1 :   void *argp2 = 0 ;
   15663               1 :   int res2 = 0 ;
   15664               1 :   PyObject * obj0 = 0 ;
   15665               1 :   PyObject * obj1 = 0 ;
   15666               1 :   OGRGeometryShadow *result = 0 ;
   15667                 :   
   15668               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SymDifference",&obj0,&obj1)) SWIG_fail;
   15669               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15670               1 :   if (!SWIG_IsOK(res1)) {
   15671               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15672                 :   }
   15673               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15674               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15675               1 :   if (!SWIG_IsOK(res2)) {
   15676               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   15677                 :   }
   15678               1 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   15679                 :   {
   15680               1 :     if (!arg2) {
   15681               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15682                 :     }
   15683                 :   }
   15684                 :   {
   15685               1 :     if ( bUseExceptions ) {
   15686               0 :       CPLErrorReset();
   15687                 :     }
   15688               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
   15689               1 :     if ( bUseExceptions ) {
   15690               0 :       CPLErr eclass = CPLGetLastErrorType();
   15691               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15692               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15693                 :       }
   15694                 :     }
   15695                 :   }
   15696               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15697               1 :   return resultobj;
   15698                 : fail:
   15699               0 :   return NULL;
   15700                 : }
   15701                 : 
   15702                 : 
   15703               1 : SWIGINTERN PyObject *_wrap_Geometry_SymmetricDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15704               1 :   PyObject *resultobj = 0;
   15705               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15706               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   15707               1 :   void *argp1 = 0 ;
   15708               1 :   int res1 = 0 ;
   15709               1 :   void *argp2 = 0 ;
   15710               1 :   int res2 = 0 ;
   15711               1 :   PyObject * obj0 = 0 ;
   15712               1 :   PyObject * obj1 = 0 ;
   15713               1 :   OGRGeometryShadow *result = 0 ;
   15714                 :   
   15715               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SymmetricDifference",&obj0,&obj1)) SWIG_fail;
   15716               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15717               1 :   if (!SWIG_IsOK(res1)) {
   15718               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymmetricDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15719                 :   }
   15720               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15721               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15722               1 :   if (!SWIG_IsOK(res2)) {
   15723               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymmetricDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   15724                 :   }
   15725               1 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   15726                 :   {
   15727               1 :     if (!arg2) {
   15728               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15729                 :     }
   15730                 :   }
   15731                 :   {
   15732               1 :     if ( bUseExceptions ) {
   15733               0 :       CPLErrorReset();
   15734                 :     }
   15735               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
   15736               1 :     if ( bUseExceptions ) {
   15737               0 :       CPLErr eclass = CPLGetLastErrorType();
   15738               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15739               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15740                 :       }
   15741                 :     }
   15742                 :   }
   15743               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15744               1 :   return resultobj;
   15745                 : fail:
   15746               0 :   return NULL;
   15747                 : }
   15748                 : 
   15749                 : 
   15750               1 : SWIGINTERN PyObject *_wrap_Geometry_Distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15751               1 :   PyObject *resultobj = 0;
   15752               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15753               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   15754               1 :   void *argp1 = 0 ;
   15755               1 :   int res1 = 0 ;
   15756               1 :   void *argp2 = 0 ;
   15757               1 :   int res2 = 0 ;
   15758               1 :   PyObject * obj0 = 0 ;
   15759               1 :   PyObject * obj1 = 0 ;
   15760                 :   double result;
   15761                 :   
   15762               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Distance",&obj0,&obj1)) SWIG_fail;
   15763               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15764               1 :   if (!SWIG_IsOK(res1)) {
   15765               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15766                 :   }
   15767               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15768               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15769               1 :   if (!SWIG_IsOK(res2)) {
   15770               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   15771                 :   }
   15772               1 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   15773                 :   {
   15774               1 :     if (!arg2) {
   15775               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15776                 :     }
   15777                 :   }
   15778                 :   {
   15779               1 :     if ( bUseExceptions ) {
   15780               0 :       CPLErrorReset();
   15781                 :     }
   15782               1 :     result = (double)OGRGeometryShadow_Distance(arg1,arg2);
   15783               1 :     if ( bUseExceptions ) {
   15784               0 :       CPLErr eclass = CPLGetLastErrorType();
   15785               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15786               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15787                 :       }
   15788                 :     }
   15789                 :   }
   15790               1 :   resultobj = SWIG_From_double(static_cast< double >(result));
   15791               1 :   return resultobj;
   15792                 : fail:
   15793               0 :   return NULL;
   15794                 : }
   15795                 : 
   15796                 : 
   15797               2 : SWIGINTERN PyObject *_wrap_Geometry_Empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15798               2 :   PyObject *resultobj = 0;
   15799               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15800               2 :   void *argp1 = 0 ;
   15801               2 :   int res1 = 0 ;
   15802               2 :   PyObject * obj0 = 0 ;
   15803                 :   
   15804               2 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Empty",&obj0)) SWIG_fail;
   15805               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15806               2 :   if (!SWIG_IsOK(res1)) {
   15807               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Empty" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15808                 :   }
   15809               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15810                 :   {
   15811               2 :     if ( bUseExceptions ) {
   15812               0 :       CPLErrorReset();
   15813                 :     }
   15814                 :     OGRGeometryShadow_Empty(arg1);
   15815               2 :     if ( bUseExceptions ) {
   15816               0 :       CPLErr eclass = CPLGetLastErrorType();
   15817               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15818               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15819                 :       }
   15820                 :     }
   15821                 :   }
   15822               2 :   resultobj = SWIG_Py_Void();
   15823               2 :   return resultobj;
   15824                 : fail:
   15825               0 :   return NULL;
   15826                 : }
   15827                 : 
   15828                 : 
   15829              58 : SWIGINTERN PyObject *_wrap_Geometry_IsEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15830              58 :   PyObject *resultobj = 0;
   15831              58 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15832              58 :   void *argp1 = 0 ;
   15833              58 :   int res1 = 0 ;
   15834              58 :   PyObject * obj0 = 0 ;
   15835                 :   bool result;
   15836                 :   
   15837              58 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsEmpty",&obj0)) SWIG_fail;
   15838              58 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15839              58 :   if (!SWIG_IsOK(res1)) {
   15840               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsEmpty" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15841                 :   }
   15842              58 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15843                 :   {
   15844              58 :     if ( bUseExceptions ) {
   15845               0 :       CPLErrorReset();
   15846                 :     }
   15847              58 :     result = (bool)OGRGeometryShadow_IsEmpty(arg1);
   15848              58 :     if ( bUseExceptions ) {
   15849               0 :       CPLErr eclass = CPLGetLastErrorType();
   15850               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15851               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15852                 :       }
   15853                 :     }
   15854                 :   }
   15855              58 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   15856              58 :   return resultobj;
   15857                 : fail:
   15858               0 :   return NULL;
   15859                 : }
   15860                 : 
   15861                 : 
   15862               3 : SWIGINTERN PyObject *_wrap_Geometry_IsValid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15863               3 :   PyObject *resultobj = 0;
   15864               3 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15865               3 :   void *argp1 = 0 ;
   15866               3 :   int res1 = 0 ;
   15867               3 :   PyObject * obj0 = 0 ;
   15868                 :   bool result;
   15869                 :   
   15870               3 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsValid",&obj0)) SWIG_fail;
   15871               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15872               3 :   if (!SWIG_IsOK(res1)) {
   15873               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15874                 :   }
   15875               3 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15876                 :   {
   15877               3 :     if ( bUseExceptions ) {
   15878               0 :       CPLErrorReset();
   15879                 :     }
   15880               3 :     result = (bool)OGRGeometryShadow_IsValid(arg1);
   15881               3 :     if ( bUseExceptions ) {
   15882               0 :       CPLErr eclass = CPLGetLastErrorType();
   15883               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15884               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15885                 :       }
   15886                 :     }
   15887                 :   }
   15888               3 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   15889               3 :   return resultobj;
   15890                 : fail:
   15891               0 :   return NULL;
   15892                 : }
   15893                 : 
   15894                 : 
   15895               2 : SWIGINTERN PyObject *_wrap_Geometry_IsSimple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15896               2 :   PyObject *resultobj = 0;
   15897               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15898               2 :   void *argp1 = 0 ;
   15899               2 :   int res1 = 0 ;
   15900               2 :   PyObject * obj0 = 0 ;
   15901                 :   bool result;
   15902                 :   
   15903               2 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsSimple",&obj0)) SWIG_fail;
   15904               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15905               2 :   if (!SWIG_IsOK(res1)) {
   15906               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsSimple" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15907                 :   }
   15908               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15909                 :   {
   15910               2 :     if ( bUseExceptions ) {
   15911               0 :       CPLErrorReset();
   15912                 :     }
   15913               2 :     result = (bool)OGRGeometryShadow_IsSimple(arg1);
   15914               2 :     if ( bUseExceptions ) {
   15915               0 :       CPLErr eclass = CPLGetLastErrorType();
   15916               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15917               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15918                 :       }
   15919                 :     }
   15920                 :   }
   15921               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   15922               2 :   return resultobj;
   15923                 : fail:
   15924               0 :   return NULL;
   15925                 : }
   15926                 : 
   15927                 : 
   15928               1 : SWIGINTERN PyObject *_wrap_Geometry_IsRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15929               1 :   PyObject *resultobj = 0;
   15930               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15931               1 :   void *argp1 = 0 ;
   15932               1 :   int res1 = 0 ;
   15933               1 :   PyObject * obj0 = 0 ;
   15934                 :   bool result;
   15935                 :   
   15936               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsRing",&obj0)) SWIG_fail;
   15937               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15938               1 :   if (!SWIG_IsOK(res1)) {
   15939               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsRing" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15940                 :   }
   15941               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15942                 :   {
   15943               1 :     if ( bUseExceptions ) {
   15944               0 :       CPLErrorReset();
   15945                 :     }
   15946               1 :     result = (bool)OGRGeometryShadow_IsRing(arg1);
   15947               1 :     if ( bUseExceptions ) {
   15948               0 :       CPLErr eclass = CPLGetLastErrorType();
   15949               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15950               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15951                 :       }
   15952                 :     }
   15953                 :   }
   15954               1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   15955               1 :   return resultobj;
   15956                 : fail:
   15957               0 :   return NULL;
   15958                 : }
   15959                 : 
   15960                 : 
   15961               0 : SWIGINTERN PyObject *_wrap_Geometry_Intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15962               0 :   PyObject *resultobj = 0;
   15963               0 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15964               0 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   15965               0 :   void *argp1 = 0 ;
   15966               0 :   int res1 = 0 ;
   15967               0 :   void *argp2 = 0 ;
   15968               0 :   int res2 = 0 ;
   15969               0 :   PyObject * obj0 = 0 ;
   15970               0 :   PyObject * obj1 = 0 ;
   15971                 :   bool result;
   15972                 :   
   15973               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersects",&obj0,&obj1)) SWIG_fail;
   15974               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15975               0 :   if (!SWIG_IsOK(res1)) {
   15976               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersects" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15977                 :   }
   15978               0 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15979               0 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15980               0 :   if (!SWIG_IsOK(res2)) {
   15981               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   15982                 :   }
   15983               0 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   15984                 :   {
   15985               0 :     if (!arg2) {
   15986               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15987                 :     }
   15988                 :   }
   15989                 :   {
   15990               0 :     if ( bUseExceptions ) {
   15991               0 :       CPLErrorReset();
   15992                 :     }
   15993               0 :     result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
   15994               0 :     if ( bUseExceptions ) {
   15995               0 :       CPLErr eclass = CPLGetLastErrorType();
   15996               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15997               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15998                 :       }
   15999                 :     }
   16000                 :   }
   16001               0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   16002               0 :   return resultobj;
   16003                 : fail:
   16004               0 :   return NULL;
   16005                 : }
   16006                 : 
   16007                 : 
   16008               2 : SWIGINTERN PyObject *_wrap_Geometry_Intersect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16009               2 :   PyObject *resultobj = 0;
   16010               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16011               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   16012               2 :   void *argp1 = 0 ;
   16013               2 :   int res1 = 0 ;
   16014               2 :   void *argp2 = 0 ;
   16015               2 :   int res2 = 0 ;
   16016               2 :   PyObject * obj0 = 0 ;
   16017               2 :   PyObject * obj1 = 0 ;
   16018                 :   bool result;
   16019                 :   
   16020               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersect",&obj0,&obj1)) SWIG_fail;
   16021               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16022               2 :   if (!SWIG_IsOK(res1)) {
   16023               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersect" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16024                 :   }
   16025               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16026               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16027               2 :   if (!SWIG_IsOK(res2)) {
   16028               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersect" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   16029                 :   }
   16030               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   16031                 :   {
   16032               2 :     if (!arg2) {
   16033               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16034                 :     }
   16035                 :   }
   16036                 :   {
   16037               2 :     if ( bUseExceptions ) {
   16038               0 :       CPLErrorReset();
   16039                 :     }
   16040               2 :     result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
   16041               2 :     if ( bUseExceptions ) {
   16042               0 :       CPLErr eclass = CPLGetLastErrorType();
   16043               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16044               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16045                 :       }
   16046                 :     }
   16047                 :   }
   16048               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   16049               2 :   return resultobj;
   16050                 : fail:
   16051               0 :   return NULL;
   16052                 : }
   16053                 : 
   16054                 : 
   16055           35546 : SWIGINTERN PyObject *_wrap_Geometry_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16056           35546 :   PyObject *resultobj = 0;
   16057           35546 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16058           35546 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   16059           35546 :   void *argp1 = 0 ;
   16060           35546 :   int res1 = 0 ;
   16061           35546 :   void *argp2 = 0 ;
   16062           35546 :   int res2 = 0 ;
   16063           35546 :   PyObject * obj0 = 0 ;
   16064           35546 :   PyObject * obj1 = 0 ;
   16065                 :   bool result;
   16066                 :   
   16067           35546 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Equals",&obj0,&obj1)) SWIG_fail;
   16068           35546 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16069           35546 :   if (!SWIG_IsOK(res1)) {
   16070               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equals" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16071                 :   }
   16072           35546 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16073           35546 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16074           35546 :   if (!SWIG_IsOK(res2)) {
   16075               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equals" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   16076                 :   }
   16077           35546 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   16078                 :   {
   16079           35546 :     if (!arg2) {
   16080               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16081                 :     }
   16082                 :   }
   16083                 :   {
   16084           35546 :     if ( bUseExceptions ) {
   16085               0 :       CPLErrorReset();
   16086                 :     }
   16087           35546 :     result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
   16088           35546 :     if ( bUseExceptions ) {
   16089               0 :       CPLErr eclass = CPLGetLastErrorType();
   16090               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16091               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16092                 :       }
   16093                 :     }
   16094                 :   }
   16095           35546 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   16096           35546 :   return resultobj;
   16097                 : fail:
   16098               0 :   return NULL;
   16099                 : }
   16100                 : 
   16101                 : 
   16102               1 : SWIGINTERN PyObject *_wrap_Geometry_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16103               1 :   PyObject *resultobj = 0;
   16104               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16105               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   16106               1 :   void *argp1 = 0 ;
   16107               1 :   int res1 = 0 ;
   16108               1 :   void *argp2 = 0 ;
   16109               1 :   int res2 = 0 ;
   16110               1 :   PyObject * obj0 = 0 ;
   16111               1 :   PyObject * obj1 = 0 ;
   16112                 :   bool result;
   16113                 :   
   16114               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Equal",&obj0,&obj1)) SWIG_fail;
   16115               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16116               1 :   if (!SWIG_IsOK(res1)) {
   16117               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equal" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16118                 :   }
   16119               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16120               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16121               1 :   if (!SWIG_IsOK(res2)) {
   16122               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equal" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   16123                 :   }
   16124               1 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   16125                 :   {
   16126               1 :     if (!arg2) {
   16127               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16128                 :     }
   16129                 :   }
   16130                 :   {
   16131               1 :     if ( bUseExceptions ) {
   16132               0 :       CPLErrorReset();
   16133                 :     }
   16134               1 :     result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
   16135               1 :     if ( bUseExceptions ) {
   16136               0 :       CPLErr eclass = CPLGetLastErrorType();
   16137               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16138               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16139                 :       }
   16140                 :     }
   16141                 :   }
   16142               1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   16143               1 :   return resultobj;
   16144                 : fail:
   16145               0 :   return NULL;
   16146                 : }
   16147                 : 
   16148                 : 
   16149               2 : SWIGINTERN PyObject *_wrap_Geometry_Disjoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16150               2 :   PyObject *resultobj = 0;
   16151               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16152               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   16153               2 :   void *argp1 = 0 ;
   16154               2 :   int res1 = 0 ;
   16155               2 :   void *argp2 = 0 ;
   16156               2 :   int res2 = 0 ;
   16157               2 :   PyObject * obj0 = 0 ;
   16158               2 :   PyObject * obj1 = 0 ;
   16159                 :   bool result;
   16160                 :   
   16161               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Disjoint",&obj0,&obj1)) SWIG_fail;
   16162               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16163               2 :   if (!SWIG_IsOK(res1)) {
   16164               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Disjoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16165                 :   }
   16166               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16167               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16168               2 :   if (!SWIG_IsOK(res2)) {
   16169               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Disjoint" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   16170                 :   }
   16171               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   16172                 :   {
   16173               2 :     if (!arg2) {
   16174               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16175                 :     }
   16176                 :   }
   16177                 :   {
   16178               2 :     if ( bUseExceptions ) {
   16179               0 :       CPLErrorReset();
   16180                 :     }
   16181               2 :     result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
   16182               2 :     if ( bUseExceptions ) {
   16183               0 :       CPLErr eclass = CPLGetLastErrorType();
   16184               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16185               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16186                 :       }
   16187                 :     }
   16188                 :   }
   16189               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   16190               2 :   return resultobj;
   16191                 : fail:
   16192               0 :   return NULL;
   16193                 : }
   16194                 : 
   16195                 : 
   16196               2 : SWIGINTERN PyObject *_wrap_Geometry_Touches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16197               2 :   PyObject *resultobj = 0;
   16198               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16199               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   16200               2 :   void *argp1 = 0 ;
   16201               2 :   int res1 = 0 ;
   16202               2 :   void *argp2 = 0 ;
   16203               2 :   int res2 = 0 ;
   16204               2 :   PyObject * obj0 = 0 ;
   16205               2 :   PyObject * obj1 = 0 ;
   16206                 :   bool result;
   16207                 :   
   16208               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Touches",&obj0,&obj1)) SWIG_fail;
   16209               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16210               2 :   if (!SWIG_IsOK(res1)) {
   16211               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Touches" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16212                 :   }
   16213               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16214               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16215               2 :   if (!SWIG_IsOK(res2)) {
   16216               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Touches" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   16217                 :   }
   16218               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   16219                 :   {
   16220               2 :     if (!arg2) {
   16221               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16222                 :     }
   16223                 :   }
   16224                 :   {
   16225               2 :     if ( bUseExceptions ) {
   16226               0 :       CPLErrorReset();
   16227                 :     }
   16228               2 :     result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
   16229               2 :     if ( bUseExceptions ) {
   16230               0 :       CPLErr eclass = CPLGetLastErrorType();
   16231               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16232               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16233                 :       }
   16234                 :     }
   16235                 :   }
   16236               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   16237               2 :   return resultobj;
   16238                 : fail:
   16239               0 :   return NULL;
   16240                 : }
   16241                 : 
   16242                 : 
   16243               2 : SWIGINTERN PyObject *_wrap_Geometry_Crosses(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16244               2 :   PyObject *resultobj = 0;
   16245               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16246               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   16247               2 :   void *argp1 = 0 ;
   16248               2 :   int res1 = 0 ;
   16249               2 :   void *argp2 = 0 ;
   16250               2 :   int res2 = 0 ;
   16251               2 :   PyObject * obj0 = 0 ;
   16252               2 :   PyObject * obj1 = 0 ;
   16253                 :   bool result;
   16254                 :   
   16255               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Crosses",&obj0,&obj1)) SWIG_fail;
   16256               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16257               2 :   if (!SWIG_IsOK(res1)) {
   16258               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Crosses" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16259                 :   }
   16260               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16261               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16262               2 :   if (!SWIG_IsOK(res2)) {
   16263               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Crosses" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   16264                 :   }
   16265               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   16266                 :   {
   16267               2 :     if (!arg2) {
   16268               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16269                 :     }
   16270                 :   }
   16271                 :   {
   16272               2 :     if ( bUseExceptions ) {
   16273               0 :       CPLErrorReset();
   16274                 :     }
   16275               2 :     result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
   16276               2 :     if ( bUseExceptions ) {
   16277               0 :       CPLErr eclass = CPLGetLastErrorType();
   16278               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16279               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16280                 :       }
   16281                 :     }
   16282                 :   }
   16283               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   16284               2 :   return resultobj;
   16285                 : fail:
   16286               0 :   return NULL;
   16287                 : }
   16288                 : 
   16289                 : 
   16290               3 : SWIGINTERN PyObject *_wrap_Geometry_Within(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16291               3 :   PyObject *resultobj = 0;
   16292               3 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16293               3 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   16294               3 :   void *argp1 = 0 ;
   16295               3 :   int res1 = 0 ;
   16296               3 :   void *argp2 = 0 ;
   16297               3 :   int res2 = 0 ;
   16298               3 :   PyObject * obj0 = 0 ;
   16299               3 :   PyObject * obj1 = 0 ;
   16300                 :   bool result;
   16301                 :   
   16302               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Within",&obj0,&obj1)) SWIG_fail;
   16303               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16304               3 :   if (!SWIG_IsOK(res1)) {
   16305               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Within" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16306                 :   }
   16307               3 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16308               3 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16309               3 :   if (!SWIG_IsOK(res2)) {
   16310               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Within" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   16311                 :   }
   16312               3 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   16313                 :   {
   16314               3 :     if (!arg2) {
   16315               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16316                 :     }
   16317                 :   }
   16318                 :   {
   16319               3 :     if ( bUseExceptions ) {
   16320               0 :       CPLErrorReset();
   16321                 :     }
   16322               3 :     result = (bool)OGRGeometryShadow_Within(arg1,arg2);
   16323               3 :     if ( bUseExceptions ) {
   16324               0 :       CPLErr eclass = CPLGetLastErrorType();
   16325               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16326               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16327                 :       }
   16328                 :     }
   16329                 :   }
   16330               3 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   16331               3 :   return resultobj;
   16332                 : fail:
   16333               0 :   return NULL;
   16334                 : }
   16335                 : 
   16336                 : 
   16337               2 : SWIGINTERN PyObject *_wrap_Geometry_Contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16338               2 :   PyObject *resultobj = 0;
   16339               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16340               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   16341               2 :   void *argp1 = 0 ;
   16342               2 :   int res1 = 0 ;
   16343               2 :   void *argp2 = 0 ;
   16344               2 :   int res2 = 0 ;
   16345               2 :   PyObject * obj0 = 0 ;
   16346               2 :   PyObject * obj1 = 0 ;
   16347                 :   bool result;
   16348                 :   
   16349               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Contains",&obj0,&obj1)) SWIG_fail;
   16350               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16351               2 :   if (!SWIG_IsOK(res1)) {
   16352               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Contains" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16353                 :   }
   16354               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16355               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16356               2 :   if (!SWIG_IsOK(res2)) {
   16357               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   16358                 :   }
   16359               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   16360                 :   {
   16361               2 :     if (!arg2) {
   16362               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16363                 :     }
   16364                 :   }
   16365                 :   {
   16366               2 :     if ( bUseExceptions ) {
   16367               0 :       CPLErrorReset();
   16368                 :     }
   16369               2 :     result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
   16370               2 :     if ( bUseExceptions ) {
   16371               0 :       CPLErr eclass = CPLGetLastErrorType();
   16372               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16373               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16374                 :       }
   16375                 :     }
   16376                 :   }
   16377               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   16378               2 :   return resultobj;
   16379                 : fail:
   16380               0 :   return NULL;
   16381                 : }
   16382                 : 
   16383                 : 
   16384               2 : SWIGINTERN PyObject *_wrap_Geometry_Overlaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16385               2 :   PyObject *resultobj = 0;
   16386               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16387               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   16388               2 :   void *argp1 = 0 ;
   16389               2 :   int res1 = 0 ;
   16390               2 :   void *argp2 = 0 ;
   16391               2 :   int res2 = 0 ;
   16392               2 :   PyObject * obj0 = 0 ;
   16393               2 :   PyObject * obj1 = 0 ;
   16394                 :   bool result;
   16395                 :   
   16396               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Overlaps",&obj0,&obj1)) SWIG_fail;
   16397               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16398               2 :   if (!SWIG_IsOK(res1)) {
   16399               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Overlaps" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16400                 :   }
   16401               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16402               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16403               2 :   if (!SWIG_IsOK(res2)) {
   16404               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Overlaps" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   16405                 :   }
   16406               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   16407                 :   {
   16408               2 :     if (!arg2) {
   16409               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16410                 :     }
   16411                 :   }
   16412                 :   {
   16413               2 :     if ( bUseExceptions ) {
   16414               0 :       CPLErrorReset();
   16415                 :     }
   16416               2 :     result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
   16417               2 :     if ( bUseExceptions ) {
   16418               0 :       CPLErr eclass = CPLGetLastErrorType();
   16419               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16420               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16421                 :       }
   16422                 :     }
   16423                 :   }
   16424               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   16425               2 :   return resultobj;
   16426                 : fail:
   16427               0 :   return NULL;
   16428                 : }
   16429                 : 
   16430                 : 
   16431               1 : SWIGINTERN PyObject *_wrap_Geometry_TransformTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16432               1 :   PyObject *resultobj = 0;
   16433               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16434               1 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   16435               1 :   void *argp1 = 0 ;
   16436               1 :   int res1 = 0 ;
   16437               1 :   void *argp2 = 0 ;
   16438               1 :   int res2 = 0 ;
   16439               1 :   PyObject * obj0 = 0 ;
   16440               1 :   PyObject * obj1 = 0 ;
   16441                 :   OGRErr result;
   16442                 :   
   16443               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_TransformTo",&obj0,&obj1)) SWIG_fail;
   16444               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16445               1 :   if (!SWIG_IsOK(res1)) {
   16446               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_TransformTo" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16447                 :   }
   16448               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16449               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   16450               1 :   if (!SWIG_IsOK(res2)) {
   16451               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_TransformTo" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   16452                 :   }
   16453               1 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   16454                 :   {
   16455               1 :     if (!arg2) {
   16456               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16457                 :     }
   16458                 :   }
   16459                 :   {
   16460               1 :     if ( bUseExceptions ) {
   16461               0 :       CPLErrorReset();
   16462                 :     }
   16463               1 :     result = (OGRErr)OGRGeometryShadow_TransformTo(arg1,arg2);
   16464               1 :     if ( bUseExceptions ) {
   16465               0 :       CPLErr eclass = CPLGetLastErrorType();
   16466               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16467               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16468                 :       }
   16469                 :     }
   16470                 :   }
   16471                 :   {
   16472                 :     /* %typemap(out) OGRErr */
   16473               1 :     if ( result != 0 && bUseExceptions) {
   16474               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   16475               0 :       SWIG_fail;
   16476                 :     }
   16477                 :   }
   16478                 :   {
   16479                 :     /* %typemap(ret) OGRErr */
   16480               1 :     if (resultobj == Py_None ) {
   16481               0 :       Py_DECREF(resultobj);
   16482               0 :       resultobj = 0;
   16483                 :     }
   16484               1 :     if (resultobj == 0) {
   16485               1 :       resultobj = PyInt_FromLong( result );
   16486                 :     }
   16487                 :   }
   16488               1 :   return resultobj;
   16489                 : fail:
   16490               0 :   return NULL;
   16491                 : }
   16492                 : 
   16493                 : 
   16494              12 : SWIGINTERN PyObject *_wrap_Geometry_Transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16495              12 :   PyObject *resultobj = 0;
   16496              12 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16497              12 :   OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
   16498              12 :   void *argp1 = 0 ;
   16499              12 :   int res1 = 0 ;
   16500              12 :   void *argp2 = 0 ;
   16501              12 :   int res2 = 0 ;
   16502              12 :   PyObject * obj0 = 0 ;
   16503              12 :   PyObject * obj1 = 0 ;
   16504                 :   OGRErr result;
   16505                 :   
   16506              12 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Transform",&obj0,&obj1)) SWIG_fail;
   16507              12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16508              12 :   if (!SWIG_IsOK(res1)) {
   16509               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Transform" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16510                 :   }
   16511              12 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16512              12 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
   16513              12 :   if (!SWIG_IsOK(res2)) {
   16514               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OSRCoordinateTransformationShadow *""'"); 
   16515                 :   }
   16516              12 :   arg2 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp2);
   16517                 :   {
   16518              12 :     if (!arg2) {
   16519               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16520                 :     }
   16521                 :   }
   16522                 :   {
   16523              12 :     if ( bUseExceptions ) {
   16524               0 :       CPLErrorReset();
   16525                 :     }
   16526              12 :     result = (OGRErr)OGRGeometryShadow_Transform(arg1,arg2);
   16527              12 :     if ( bUseExceptions ) {
   16528               0 :       CPLErr eclass = CPLGetLastErrorType();
   16529               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16530               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16531                 :       }
   16532                 :     }
   16533                 :   }
   16534                 :   {
   16535                 :     /* %typemap(out) OGRErr */
   16536              12 :     if ( result != 0 && bUseExceptions) {
   16537               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   16538               0 :       SWIG_fail;
   16539                 :     }
   16540                 :   }
   16541                 :   {
   16542                 :     /* %typemap(ret) OGRErr */
   16543              12 :     if (resultobj == Py_None ) {
   16544               0 :       Py_DECREF(resultobj);
   16545               0 :       resultobj = 0;
   16546                 :     }
   16547              12 :     if (resultobj == 0) {
   16548              12 :       resultobj = PyInt_FromLong( result );
   16549                 :     }
   16550                 :   }
   16551              12 :   return resultobj;
   16552                 : fail:
   16553               0 :   return NULL;
   16554                 : }
   16555                 : 
   16556                 : 
   16557              10 : SWIGINTERN PyObject *_wrap_Geometry_GetSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16558              10 :   PyObject *resultobj = 0;
   16559              10 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16560              10 :   void *argp1 = 0 ;
   16561              10 :   int res1 = 0 ;
   16562              10 :   PyObject * obj0 = 0 ;
   16563              10 :   OSRSpatialReferenceShadow *result = 0 ;
   16564                 :   
   16565              10 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetSpatialReference",&obj0)) SWIG_fail;
   16566              10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16567              10 :   if (!SWIG_IsOK(res1)) {
   16568               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16569                 :   }
   16570              10 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16571                 :   {
   16572              10 :     if ( bUseExceptions ) {
   16573               0 :       CPLErrorReset();
   16574                 :     }
   16575              10 :     result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
   16576              10 :     if ( bUseExceptions ) {
   16577               0 :       CPLErr eclass = CPLGetLastErrorType();
   16578               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16579               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16580                 :       }
   16581                 :     }
   16582                 :   }
   16583              10 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   16584              10 :   return resultobj;
   16585                 : fail:
   16586               0 :   return NULL;
   16587                 : }
   16588                 : 
   16589                 : 
   16590             332 : SWIGINTERN PyObject *_wrap_Geometry_AssignSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16591             332 :   PyObject *resultobj = 0;
   16592             332 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16593             332 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   16594             332 :   void *argp1 = 0 ;
   16595             332 :   int res1 = 0 ;
   16596             332 :   void *argp2 = 0 ;
   16597             332 :   int res2 = 0 ;
   16598             332 :   PyObject * obj0 = 0 ;
   16599             332 :   PyObject * obj1 = 0 ;
   16600                 :   
   16601             332 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AssignSpatialReference",&obj0,&obj1)) SWIG_fail;
   16602             332 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16603             332 :   if (!SWIG_IsOK(res1)) {
   16604               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AssignSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16605                 :   }
   16606             332 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16607             332 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   16608             332 :   if (!SWIG_IsOK(res2)) {
   16609               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AssignSpatialReference" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   16610                 :   }
   16611             332 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   16612                 :   {
   16613             332 :     if ( bUseExceptions ) {
   16614               0 :       CPLErrorReset();
   16615                 :     }
   16616                 :     OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
   16617             332 :     if ( bUseExceptions ) {
   16618               0 :       CPLErr eclass = CPLGetLastErrorType();
   16619               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16620               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16621                 :       }
   16622                 :     }
   16623                 :   }
   16624             332 :   resultobj = SWIG_Py_Void();
   16625             332 :   return resultobj;
   16626                 : fail:
   16627               0 :   return NULL;
   16628                 : }
   16629                 : 
   16630                 : 
   16631               4 : SWIGINTERN PyObject *_wrap_Geometry_CloseRings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16632               4 :   PyObject *resultobj = 0;
   16633               4 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16634               4 :   void *argp1 = 0 ;
   16635               4 :   int res1 = 0 ;
   16636               4 :   PyObject * obj0 = 0 ;
   16637                 :   
   16638               4 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_CloseRings",&obj0)) SWIG_fail;
   16639               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16640               4 :   if (!SWIG_IsOK(res1)) {
   16641               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CloseRings" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16642                 :   }
   16643               4 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16644                 :   {
   16645               4 :     if ( bUseExceptions ) {
   16646               0 :       CPLErrorReset();
   16647                 :     }
   16648                 :     OGRGeometryShadow_CloseRings(arg1);
   16649               4 :     if ( bUseExceptions ) {
   16650               0 :       CPLErr eclass = CPLGetLastErrorType();
   16651               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16652               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16653                 :       }
   16654                 :     }
   16655                 :   }
   16656               4 :   resultobj = SWIG_Py_Void();
   16657               4 :   return resultobj;
   16658                 : fail:
   16659               0 :   return NULL;
   16660                 : }
   16661                 : 
   16662                 : 
   16663               1 : SWIGINTERN PyObject *_wrap_Geometry_FlattenTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16664               1 :   PyObject *resultobj = 0;
   16665               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16666               1 :   void *argp1 = 0 ;
   16667               1 :   int res1 = 0 ;
   16668               1 :   PyObject * obj0 = 0 ;
   16669                 :   
   16670               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_FlattenTo2D",&obj0)) SWIG_fail;
   16671               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16672               1 :   if (!SWIG_IsOK(res1)) {
   16673               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FlattenTo2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16674                 :   }
   16675               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16676                 :   {
   16677               1 :     if ( bUseExceptions ) {
   16678               0 :       CPLErrorReset();
   16679                 :     }
   16680                 :     OGRGeometryShadow_FlattenTo2D(arg1);
   16681               1 :     if ( bUseExceptions ) {
   16682               0 :       CPLErr eclass = CPLGetLastErrorType();
   16683               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16684               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16685                 :       }
   16686                 :     }
   16687                 :   }
   16688               1 :   resultobj = SWIG_Py_Void();
   16689               1 :   return resultobj;
   16690                 : fail:
   16691               0 :   return NULL;
   16692                 : }
   16693                 : 
   16694                 : 
   16695               1 : SWIGINTERN PyObject *_wrap_Geometry_Segmentize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16696               1 :   PyObject *resultobj = 0;
   16697               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16698                 :   double arg2 ;
   16699               1 :   void *argp1 = 0 ;
   16700               1 :   int res1 = 0 ;
   16701                 :   double val2 ;
   16702               1 :   int ecode2 = 0 ;
   16703               1 :   PyObject * obj0 = 0 ;
   16704               1 :   PyObject * obj1 = 0 ;
   16705                 :   
   16706               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Segmentize",&obj0,&obj1)) SWIG_fail;
   16707               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16708               1 :   if (!SWIG_IsOK(res1)) {
   16709               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Segmentize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16710                 :   }
   16711               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16712               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   16713               1 :   if (!SWIG_IsOK(ecode2)) {
   16714               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Segmentize" "', argument " "2"" of type '" "double""'");
   16715                 :   } 
   16716               1 :   arg2 = static_cast< double >(val2);
   16717                 :   {
   16718               1 :     if ( bUseExceptions ) {
   16719               0 :       CPLErrorReset();
   16720                 :     }
   16721                 :     OGRGeometryShadow_Segmentize(arg1,arg2);
   16722               1 :     if ( bUseExceptions ) {
   16723               0 :       CPLErr eclass = CPLGetLastErrorType();
   16724               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16725               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16726                 :       }
   16727                 :     }
   16728                 :   }
   16729               1 :   resultobj = SWIG_Py_Void();
   16730               1 :   return resultobj;
   16731                 : fail:
   16732               0 :   return NULL;
   16733                 : }
   16734                 : 
   16735                 : 
   16736           17471 : SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16737           17471 :   PyObject *resultobj = 0;
   16738           17471 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16739                 :   double *arg2 ;
   16740           17471 :   void *argp1 = 0 ;
   16741           17471 :   int res1 = 0 ;
   16742                 :   double argout2[4] ;
   16743           17471 :   PyObject * obj0 = 0 ;
   16744                 :   
   16745                 :   {
   16746                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   16747           17471 :     arg2 = argout2;
   16748                 :   }
   16749           17471 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetEnvelope",&obj0)) SWIG_fail;
   16750           17471 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16751           17471 :   if (!SWIG_IsOK(res1)) {
   16752               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16753                 :   }
   16754           17471 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16755                 :   {
   16756           17471 :     if ( bUseExceptions ) {
   16757               0 :       CPLErrorReset();
   16758                 :     }
   16759                 :     OGRGeometryShadow_GetEnvelope(arg1,arg2);
   16760           17471 :     if ( bUseExceptions ) {
   16761               0 :       CPLErr eclass = CPLGetLastErrorType();
   16762               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16763               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16764                 :       }
   16765                 :     }
   16766                 :   }
   16767           17471 :   resultobj = SWIG_Py_Void();
   16768                 :   {
   16769                 :     /* %typemap(argout) (double argout[ANY]) */
   16770           17471 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
   16771           17471 :     resultobj = t_output_helper(resultobj,out);
   16772                 :   }
   16773           17471 :   return resultobj;
   16774                 : fail:
   16775               0 :   return NULL;
   16776                 : }
   16777                 : 
   16778                 : 
   16779               7 : SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16780               7 :   PyObject *resultobj = 0;
   16781               7 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16782                 :   double *arg2 ;
   16783               7 :   void *argp1 = 0 ;
   16784               7 :   int res1 = 0 ;
   16785                 :   double argout2[6] ;
   16786               7 :   PyObject * obj0 = 0 ;
   16787                 :   
   16788                 :   {
   16789                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   16790               7 :     arg2 = argout2;
   16791                 :   }
   16792               7 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetEnvelope3D",&obj0)) SWIG_fail;
   16793               7 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16794               7 :   if (!SWIG_IsOK(res1)) {
   16795               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16796                 :   }
   16797               7 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16798                 :   {
   16799               7 :     if ( bUseExceptions ) {
   16800               0 :       CPLErrorReset();
   16801                 :     }
   16802                 :     OGRGeometryShadow_GetEnvelope3D(arg1,arg2);
   16803               7 :     if ( bUseExceptions ) {
   16804               0 :       CPLErr eclass = CPLGetLastErrorType();
   16805               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16806               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16807                 :       }
   16808                 :     }
   16809                 :   }
   16810               7 :   resultobj = SWIG_Py_Void();
   16811                 :   {
   16812                 :     /* %typemap(argout) (double argout[ANY]) */
   16813               7 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   16814               7 :     resultobj = t_output_helper(resultobj,out);
   16815                 :   }
   16816               7 :   return resultobj;
   16817                 : fail:
   16818               0 :   return NULL;
   16819                 : }
   16820                 : 
   16821                 : 
   16822               4 : SWIGINTERN PyObject *_wrap_Geometry_Centroid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16823               4 :   PyObject *resultobj = 0;
   16824               4 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16825               4 :   void *argp1 = 0 ;
   16826               4 :   int res1 = 0 ;
   16827               4 :   PyObject * obj0 = 0 ;
   16828               4 :   OGRGeometryShadow *result = 0 ;
   16829                 :   
   16830               4 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Centroid",&obj0)) SWIG_fail;
   16831               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16832               4 :   if (!SWIG_IsOK(res1)) {
   16833               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Centroid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16834                 :   }
   16835               4 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16836                 :   {
   16837               4 :     if ( bUseExceptions ) {
   16838               0 :       CPLErrorReset();
   16839                 :     }
   16840               4 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
   16841               4 :     if ( bUseExceptions ) {
   16842               0 :       CPLErr eclass = CPLGetLastErrorType();
   16843               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16844               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16845                 :       }
   16846                 :     }
   16847                 :   }
   16848               4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   16849               4 :   return resultobj;
   16850                 : fail:
   16851               0 :   return NULL;
   16852                 : }
   16853                 : 
   16854                 : 
   16855               1 : SWIGINTERN PyObject *_wrap_Geometry_PointOnSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16856               1 :   PyObject *resultobj = 0;
   16857               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16858               1 :   void *argp1 = 0 ;
   16859               1 :   int res1 = 0 ;
   16860               1 :   PyObject * obj0 = 0 ;
   16861               1 :   OGRGeometryShadow *result = 0 ;
   16862                 :   
   16863               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_PointOnSurface",&obj0)) SWIG_fail;
   16864               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16865               1 :   if (!SWIG_IsOK(res1)) {
   16866               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_PointOnSurface" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16867                 :   }
   16868               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16869                 :   {
   16870               1 :     if ( bUseExceptions ) {
   16871               0 :       CPLErrorReset();
   16872                 :     }
   16873               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_PointOnSurface(arg1);
   16874               1 :     if ( bUseExceptions ) {
   16875               0 :       CPLErr eclass = CPLGetLastErrorType();
   16876               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16877               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16878                 :       }
   16879                 :     }
   16880                 :   }
   16881               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   16882               1 :   return resultobj;
   16883                 : fail:
   16884               0 :   return NULL;
   16885                 : }
   16886                 : 
   16887                 : 
   16888               0 : SWIGINTERN PyObject *_wrap_Geometry_WkbSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16889               0 :   PyObject *resultobj = 0;
   16890               0 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16891               0 :   void *argp1 = 0 ;
   16892               0 :   int res1 = 0 ;
   16893               0 :   PyObject * obj0 = 0 ;
   16894                 :   int result;
   16895                 :   
   16896               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_WkbSize",&obj0)) SWIG_fail;
   16897               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16898               0 :   if (!SWIG_IsOK(res1)) {
   16899               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_WkbSize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16900                 :   }
   16901               0 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16902                 :   {
   16903               0 :     if ( bUseExceptions ) {
   16904               0 :       CPLErrorReset();
   16905                 :     }
   16906               0 :     result = (int)OGRGeometryShadow_WkbSize(arg1);
   16907               0 :     if ( bUseExceptions ) {
   16908               0 :       CPLErr eclass = CPLGetLastErrorType();
   16909               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16910               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16911                 :       }
   16912                 :     }
   16913                 :   }
   16914               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16915               0 :   return resultobj;
   16916                 : fail:
   16917               0 :   return NULL;
   16918                 : }
   16919                 : 
   16920                 : 
   16921              41 : SWIGINTERN PyObject *_wrap_Geometry_GetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16922              41 :   PyObject *resultobj = 0;
   16923              41 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16924              41 :   void *argp1 = 0 ;
   16925              41 :   int res1 = 0 ;
   16926              41 :   PyObject * obj0 = 0 ;
   16927                 :   int result;
   16928                 :   
   16929              41 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetCoordinateDimension",&obj0)) SWIG_fail;
   16930              41 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16931              41 :   if (!SWIG_IsOK(res1)) {
   16932               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16933                 :   }
   16934              41 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16935                 :   {
   16936              41 :     if ( bUseExceptions ) {
   16937               0 :       CPLErrorReset();
   16938                 :     }
   16939              41 :     result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
   16940              41 :     if ( bUseExceptions ) {
   16941               0 :       CPLErr eclass = CPLGetLastErrorType();
   16942               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16943               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16944                 :       }
   16945                 :     }
   16946                 :   }
   16947              41 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16948              41 :   return resultobj;
   16949                 : fail:
   16950               0 :   return NULL;
   16951                 : }
   16952                 : 
   16953                 : 
   16954              20 : SWIGINTERN PyObject *_wrap_Geometry_SetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16955              20 :   PyObject *resultobj = 0;
   16956              20 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16957                 :   int arg2 ;
   16958              20 :   void *argp1 = 0 ;
   16959              20 :   int res1 = 0 ;
   16960                 :   int val2 ;
   16961              20 :   int ecode2 = 0 ;
   16962              20 :   PyObject * obj0 = 0 ;
   16963              20 :   PyObject * obj1 = 0 ;
   16964                 :   
   16965              20 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SetCoordinateDimension",&obj0,&obj1)) SWIG_fail;
   16966              20 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   16967              20 :   if (!SWIG_IsOK(res1)) {
   16968               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   16969                 :   }
   16970              20 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   16971              20 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16972              20 :   if (!SWIG_IsOK(ecode2)) {
   16973               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetCoordinateDimension" "', argument " "2"" of type '" "int""'");
   16974                 :   } 
   16975              20 :   arg2 = static_cast< int >(val2);
   16976                 :   {
   16977              20 :     if ( bUseExceptions ) {
   16978               0 :       CPLErrorReset();
   16979                 :     }
   16980                 :     OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
   16981              20 :     if ( bUseExceptions ) {
   16982               0 :       CPLErr eclass = CPLGetLastErrorType();
   16983               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16984               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16985                 :       }
   16986                 :     }
   16987                 :   }
   16988              20 :   resultobj = SWIG_Py_Void();
   16989              20 :   return resultobj;
   16990                 : fail:
   16991               0 :   return NULL;
   16992                 : }
   16993                 : 
   16994                 : 
   16995               1 : SWIGINTERN PyObject *_wrap_Geometry_GetDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16996               1 :   PyObject *resultobj = 0;
   16997               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   16998               1 :   void *argp1 = 0 ;
   16999               1 :   int res1 = 0 ;
   17000               1 :   PyObject * obj0 = 0 ;
   17001                 :   int result;
   17002                 :   
   17003               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetDimension",&obj0)) SWIG_fail;
   17004               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   17005               1 :   if (!SWIG_IsOK(res1)) {
   17006               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   17007                 :   }
   17008               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   17009                 :   {
   17010               1 :     if ( bUseExceptions ) {
   17011               0 :       CPLErrorReset();
   17012                 :     }
   17013               1 :     result = (int)OGRGeometryShadow_GetDimension(arg1);
   17014               1 :     if ( bUseExceptions ) {
   17015               0 :       CPLErr eclass = CPLGetLastErrorType();
   17016               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17017               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17018                 :       }
   17019                 :     }
   17020                 :   }
   17021               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17022               1 :   return resultobj;
   17023                 : fail:
   17024               0 :   return NULL;
   17025                 : }
   17026                 : 
   17027                 : 
   17028               2 : SWIGINTERN PyObject *Geometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17029                 :   PyObject *obj;
   17030               2 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   17031               2 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeometryShadow, SWIG_NewClientData(obj));
   17032               2 :   return SWIG_Py_Void();
   17033                 : }
   17034                 : 
   17035               0 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17036               0 :   PyObject *resultobj = 0;
   17037                 :   int result;
   17038                 :   
   17039               0 :   if (!PyArg_ParseTuple(args,(char *)":GetDriverCount")) SWIG_fail;
   17040                 :   {
   17041               0 :     if ( bUseExceptions ) {
   17042               0 :       CPLErrorReset();
   17043                 :     }
   17044               0 :     result = (int)OGRGetDriverCount();
   17045               0 :     if ( bUseExceptions ) {
   17046               0 :       CPLErr eclass = CPLGetLastErrorType();
   17047               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17048               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17049                 :       }
   17050                 :     }
   17051                 :   }
   17052               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17053               0 :   return resultobj;
   17054                 : fail:
   17055               0 :   return NULL;
   17056                 : }
   17057                 : 
   17058                 : 
   17059               5 : SWIGINTERN PyObject *_wrap_GetOpenDSCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17060               5 :   PyObject *resultobj = 0;
   17061                 :   int result;
   17062                 :   
   17063               5 :   if (!PyArg_ParseTuple(args,(char *)":GetOpenDSCount")) SWIG_fail;
   17064                 :   {
   17065               5 :     if ( bUseExceptions ) {
   17066               0 :       CPLErrorReset();
   17067                 :     }
   17068               5 :     result = (int)OGRGetOpenDSCount();
   17069               5 :     if ( bUseExceptions ) {
   17070               0 :       CPLErr eclass = CPLGetLastErrorType();
   17071               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17072               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17073                 :       }
   17074                 :     }
   17075                 :   }
   17076               5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17077               5 :   return resultobj;
   17078                 : fail:
   17079               0 :   return NULL;
   17080                 : }
   17081                 : 
   17082                 : 
   17083               4 : SWIGINTERN PyObject *_wrap_SetGenerate_DB2_V72_BYTE_ORDER(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17084               4 :   PyObject *resultobj = 0;
   17085                 :   int arg1 ;
   17086                 :   int val1 ;
   17087               4 :   int ecode1 = 0 ;
   17088               4 :   PyObject * obj0 = 0 ;
   17089                 :   OGRErr result;
   17090                 :   
   17091               4 :   if (!PyArg_ParseTuple(args,(char *)"O:SetGenerate_DB2_V72_BYTE_ORDER",&obj0)) SWIG_fail;
   17092               4 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   17093               4 :   if (!SWIG_IsOK(ecode1)) {
   17094               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetGenerate_DB2_V72_BYTE_ORDER" "', argument " "1"" of type '" "int""'");
   17095                 :   } 
   17096               4 :   arg1 = static_cast< int >(val1);
   17097                 :   {
   17098               4 :     if ( bUseExceptions ) {
   17099               0 :       CPLErrorReset();
   17100                 :     }
   17101               4 :     result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
   17102               4 :     if ( bUseExceptions ) {
   17103               0 :       CPLErr eclass = CPLGetLastErrorType();
   17104               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17105               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17106                 :       }
   17107                 :     }
   17108                 :   }
   17109                 :   {
   17110                 :     /* %typemap(out) OGRErr */
   17111               4 :     if ( result != 0 && bUseExceptions) {
   17112               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   17113               0 :       SWIG_fail;
   17114                 :     }
   17115                 :   }
   17116                 :   {
   17117                 :     /* %typemap(ret) OGRErr */
   17118               4 :     if (resultobj == Py_None ) {
   17119               0 :       Py_DECREF(resultobj);
   17120               0 :       resultobj = 0;
   17121                 :     }
   17122               4 :     if (resultobj == 0) {
   17123               4 :       resultobj = PyInt_FromLong( result );
   17124                 :     }
   17125                 :   }
   17126               4 :   return resultobj;
   17127                 : fail:
   17128               0 :   return NULL;
   17129                 : }
   17130                 : 
   17131                 : 
   17132               3 : SWIGINTERN PyObject *_wrap_RegisterAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17133               3 :   PyObject *resultobj = 0;
   17134                 :   
   17135               3 :   if (!PyArg_ParseTuple(args,(char *)":RegisterAll")) SWIG_fail;
   17136                 :   {
   17137               3 :     if ( bUseExceptions ) {
   17138               0 :       CPLErrorReset();
   17139                 :     }
   17140               3 :     OGRRegisterAll();
   17141               3 :     if ( bUseExceptions ) {
   17142               0 :       CPLErr eclass = CPLGetLastErrorType();
   17143               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17144               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17145                 :       }
   17146                 :     }
   17147                 :   }
   17148               3 :   resultobj = SWIG_Py_Void();
   17149               3 :   return resultobj;
   17150                 : fail:
   17151               0 :   return NULL;
   17152                 : }
   17153                 : 
   17154                 : 
   17155              29 : SWIGINTERN PyObject *_wrap_GeometryTypeToName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17156              29 :   PyObject *resultobj = 0;
   17157                 :   OGRwkbGeometryType arg1 ;
   17158                 :   int val1 ;
   17159              29 :   int ecode1 = 0 ;
   17160              29 :   PyObject * obj0 = 0 ;
   17161              29 :   char *result = 0 ;
   17162                 :   
   17163              29 :   if (!PyArg_ParseTuple(args,(char *)"O:GeometryTypeToName",&obj0)) SWIG_fail;
   17164              29 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   17165              29 :   if (!SWIG_IsOK(ecode1)) {
   17166               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GeometryTypeToName" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
   17167                 :   } 
   17168              29 :   arg1 = static_cast< OGRwkbGeometryType >(val1);
   17169                 :   {
   17170              29 :     if ( bUseExceptions ) {
   17171               0 :       CPLErrorReset();
   17172                 :     }
   17173              29 :     result = (char *)OGRGeometryTypeToName(arg1);
   17174              29 :     if ( bUseExceptions ) {
   17175               0 :       CPLErr eclass = CPLGetLastErrorType();
   17176               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17177               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17178                 :       }
   17179                 :     }
   17180                 :   }
   17181              29 :   resultobj = SWIG_FromCharPtr((const char *)result);
   17182              29 :   return resultobj;
   17183                 : fail:
   17184               0 :   return NULL;
   17185                 : }
   17186                 : 
   17187                 : 
   17188             294 : SWIGINTERN PyObject *_wrap_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17189             294 :   PyObject *resultobj = 0;
   17190                 :   OGRFieldType arg1 ;
   17191                 :   int val1 ;
   17192             294 :   int ecode1 = 0 ;
   17193             294 :   PyObject * obj0 = 0 ;
   17194             294 :   char *result = 0 ;
   17195                 :   
   17196             294 :   if (!PyArg_ParseTuple(args,(char *)"O:GetFieldTypeName",&obj0)) SWIG_fail;
   17197             294 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   17198             294 :   if (!SWIG_IsOK(ecode1)) {
   17199               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldType""'");
   17200                 :   } 
   17201             294 :   arg1 = static_cast< OGRFieldType >(val1);
   17202                 :   {
   17203             294 :     if ( bUseExceptions ) {
   17204               0 :       CPLErrorReset();
   17205                 :     }
   17206             294 :     result = (char *)OGR_GetFieldTypeName(arg1);
   17207             294 :     if ( bUseExceptions ) {
   17208               0 :       CPLErr eclass = CPLGetLastErrorType();
   17209               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17210               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17211                 :       }
   17212                 :     }
   17213                 :   }
   17214             294 :   resultobj = SWIG_FromCharPtr((const char *)result);
   17215             294 :   return resultobj;
   17216                 : fail:
   17217               0 :   return NULL;
   17218                 : }
   17219                 : 
   17220                 : 
   17221               1 : SWIGINTERN PyObject *_wrap_GetOpenDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17222               1 :   PyObject *resultobj = 0;
   17223                 :   int arg1 ;
   17224                 :   int val1 ;
   17225               1 :   int ecode1 = 0 ;
   17226               1 :   PyObject * obj0 = 0 ;
   17227               1 :   OGRDataSourceShadow *result = 0 ;
   17228                 :   
   17229               1 :   if (!PyArg_ParseTuple(args,(char *)"O:GetOpenDS",&obj0)) SWIG_fail;
   17230               1 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   17231               1 :   if (!SWIG_IsOK(ecode1)) {
   17232               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetOpenDS" "', argument " "1"" of type '" "int""'");
   17233                 :   } 
   17234               1 :   arg1 = static_cast< int >(val1);
   17235                 :   {
   17236               1 :     if ( bUseExceptions ) {
   17237               0 :       CPLErrorReset();
   17238                 :     }
   17239               1 :     result = (OGRDataSourceShadow *)GetOpenDS(arg1);
   17240               1 :     if ( bUseExceptions ) {
   17241               0 :       CPLErr eclass = CPLGetLastErrorType();
   17242               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17243               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17244                 :       }
   17245                 :     }
   17246                 :   }
   17247               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
   17248               1 :   return resultobj;
   17249                 : fail:
   17250               0 :   return NULL;
   17251                 : }
   17252                 : 
   17253                 : 
   17254             919 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17255             919 :   PyObject *resultobj = 0;
   17256             919 :   char *arg1 = (char *) 0 ;
   17257             919 :   int arg2 = (int) 0 ;
   17258             919 :   int bToFree1 = 0 ;
   17259                 :   int val2 ;
   17260             919 :   int ecode2 = 0 ;
   17261             919 :   PyObject * obj0 = 0 ;
   17262             919 :   PyObject * obj1 = 0 ;
   17263                 :   char *  kwnames[] = {
   17264                 :     (char *) "utf8_path",(char *) "update", NULL 
   17265             919 :   };
   17266             919 :   OGRDataSourceShadow *result = 0 ;
   17267                 :   
   17268             919 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Open",kwnames,&obj0,&obj1)) SWIG_fail;
   17269                 :   {
   17270                 :     /* %typemap(in) (const char *utf8_path) */
   17271             919 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   17272             919 :     if (arg1 == NULL)
   17273                 :     {
   17274               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   17275               0 :       SWIG_fail;
   17276                 :     }
   17277                 :   }
   17278             919 :   if (obj1) {
   17279             236 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   17280             236 :     if (!SWIG_IsOK(ecode2)) {
   17281               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Open" "', argument " "2"" of type '" "int""'");
   17282                 :     } 
   17283             236 :     arg2 = static_cast< int >(val2);
   17284                 :   }
   17285                 :   {
   17286             919 :     if ( bUseExceptions ) {
   17287               0 :       CPLErrorReset();
   17288                 :     }
   17289             919 :     result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
   17290             919 :     if ( bUseExceptions ) {
   17291               0 :       CPLErr eclass = CPLGetLastErrorType();
   17292               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17293               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17294                 :       }
   17295                 :     }
   17296                 :   }
   17297             919 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
   17298                 :   {
   17299                 :     /* %typemap(freearg) (const char *utf8_path) */
   17300             919 :     GDALPythonFreeCStr(arg1, bToFree1);
   17301                 :   }
   17302             919 :   return resultobj;
   17303                 : fail:
   17304                 :   {
   17305                 :     /* %typemap(freearg) (const char *utf8_path) */
   17306               0 :     GDALPythonFreeCStr(arg1, bToFree1);
   17307                 :   }
   17308               0 :   return NULL;
   17309                 : }
   17310                 : 
   17311                 : 
   17312               9 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17313               9 :   PyObject *resultobj = 0;
   17314               9 :   char *arg1 = (char *) 0 ;
   17315               9 :   int arg2 = (int) 0 ;
   17316               9 :   int bToFree1 = 0 ;
   17317                 :   int val2 ;
   17318               9 :   int ecode2 = 0 ;
   17319               9 :   PyObject * obj0 = 0 ;
   17320               9 :   PyObject * obj1 = 0 ;
   17321                 :   char *  kwnames[] = {
   17322                 :     (char *) "utf8_path",(char *) "update", NULL 
   17323               9 :   };
   17324               9 :   OGRDataSourceShadow *result = 0 ;
   17325                 :   
   17326               9 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:OpenShared",kwnames,&obj0,&obj1)) SWIG_fail;
   17327                 :   {
   17328                 :     /* %typemap(in) (const char *utf8_path) */
   17329               9 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   17330               9 :     if (arg1 == NULL)
   17331                 :     {
   17332               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   17333               0 :       SWIG_fail;
   17334                 :     }
   17335                 :   }
   17336               9 :   if (obj1) {
   17337               5 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   17338               5 :     if (!SWIG_IsOK(ecode2)) {
   17339               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenShared" "', argument " "2"" of type '" "int""'");
   17340                 :     } 
   17341               5 :     arg2 = static_cast< int >(val2);
   17342                 :   }
   17343                 :   {
   17344               9 :     if ( bUseExceptions ) {
   17345               0 :       CPLErrorReset();
   17346                 :     }
   17347               9 :     result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
   17348               9 :     if ( bUseExceptions ) {
   17349               0 :       CPLErr eclass = CPLGetLastErrorType();
   17350               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17351               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17352                 :       }
   17353                 :     }
   17354                 :   }
   17355               9 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
   17356                 :   {
   17357                 :     /* %typemap(freearg) (const char *utf8_path) */
   17358               9 :     GDALPythonFreeCStr(arg1, bToFree1);
   17359                 :   }
   17360               9 :   return resultobj;
   17361                 : fail:
   17362                 :   {
   17363                 :     /* %typemap(freearg) (const char *utf8_path) */
   17364               0 :     GDALPythonFreeCStr(arg1, bToFree1);
   17365                 :   }
   17366               0 :   return NULL;
   17367                 : }
   17368                 : 
   17369                 : 
   17370             532 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17371             532 :   PyObject *resultobj = 0;
   17372             532 :   char *arg1 = (char *) 0 ;
   17373                 :   int res1 ;
   17374             532 :   char *buf1 = 0 ;
   17375             532 :   int alloc1 = 0 ;
   17376             532 :   PyObject * obj0 = 0 ;
   17377             532 :   OGRDriverShadow *result = 0 ;
   17378                 :   
   17379             532 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDriverByName",&obj0)) SWIG_fail;
   17380             532 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   17381             532 :   if (!SWIG_IsOK(res1)) {
   17382               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
   17383                 :   }
   17384             532 :   arg1 = reinterpret_cast< char * >(buf1);
   17385                 :   {
   17386             532 :     if (!arg1) {
   17387               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17388                 :     }
   17389                 :   }
   17390                 :   {
   17391             532 :     if ( bUseExceptions ) {
   17392               0 :       CPLErrorReset();
   17393                 :     }
   17394             532 :     result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
   17395             532 :     if ( bUseExceptions ) {
   17396               0 :       CPLErr eclass = CPLGetLastErrorType();
   17397               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17398               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17399                 :       }
   17400                 :     }
   17401                 :   }
   17402             532 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
   17403             532 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17404             532 :   return resultobj;
   17405                 : fail:
   17406               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17407               0 :   return NULL;
   17408                 : }
   17409                 : 
   17410                 : 
   17411               0 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17412               0 :   PyObject *resultobj = 0;
   17413                 :   int arg1 ;
   17414                 :   int val1 ;
   17415               0 :   int ecode1 = 0 ;
   17416               0 :   PyObject * obj0 = 0 ;
   17417               0 :   OGRDriverShadow *result = 0 ;
   17418                 :   
   17419               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDriver",&obj0)) SWIG_fail;
   17420               0 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   17421               0 :   if (!SWIG_IsOK(ecode1)) {
   17422               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
   17423                 :   } 
   17424               0 :   arg1 = static_cast< int >(val1);
   17425                 :   {
   17426               0 :     if ( bUseExceptions ) {
   17427               0 :       CPLErrorReset();
   17428                 :     }
   17429               0 :     result = (OGRDriverShadow *)GetDriver(arg1);
   17430               0 :     if ( bUseExceptions ) {
   17431               0 :       CPLErr eclass = CPLGetLastErrorType();
   17432               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17433               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17434                 :       }
   17435                 :     }
   17436                 :   }
   17437               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
   17438               0 :   return resultobj;
   17439                 : fail:
   17440               0 :   return NULL;
   17441                 : }
   17442                 : 
   17443                 : 
   17444              55 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17445              55 :   PyObject *resultobj = 0;
   17446              55 :   char **arg1 = (char **) 0 ;
   17447              55 :   int arg2 = (int) 0 ;
   17448                 :   int val2 ;
   17449              55 :   int ecode2 = 0 ;
   17450              55 :   PyObject * obj0 = 0 ;
   17451              55 :   PyObject * obj1 = 0 ;
   17452              55 :   char **result = 0 ;
   17453                 :   
   17454              55 :   if (!PyArg_ParseTuple(args,(char *)"O|O:GeneralCmdLineProcessor",&obj0,&obj1)) SWIG_fail;
   17455                 :   {
   17456                 :     /* %typemap(in) char **options */
   17457                 :     /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
   17458              55 :     if ( ! PySequence_Check(obj0) || PyUnicode_Check(obj0)
   17459                 :   #if PY_VERSION_HEX < 0x03000000
   17460                 :       || PyString_Check(obj0)
   17461                 :   #endif
   17462                 :       ) {
   17463               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   17464               0 :       SWIG_fail;
   17465                 :     }
   17466                 :     
   17467              55 :     int size = PySequence_Size(obj0);
   17468             335 :     for (int i = 0; i < size; i++) {
   17469             280 :       PyObject* pyObj = PySequence_GetItem(obj0,i);
   17470             280 :       if (PyUnicode_Check(pyObj))
   17471                 :       {
   17472                 :         char *pszStr;
   17473                 :         Py_ssize_t nLen;
   17474               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   17475                 : #if PY_VERSION_HEX >= 0x03000000
   17476                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   17477                 : #else
   17478               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   17479                 : #endif
   17480               0 :         arg1 = CSLAddString( arg1, pszStr );
   17481               0 :         Py_XDECREF(pyUTF8Str);
   17482                 :       }
   17483                 : #if PY_VERSION_HEX >= 0x03000000
   17484                 :       else if (PyBytes_Check(pyObj))
   17485                 :       arg1 = CSLAddString( arg1, PyBytes_AsString(pyObj) );
   17486                 : #else
   17487             280 :       else if (PyString_Check(pyObj))
   17488             280 :       arg1 = CSLAddString( arg1, PyString_AsString(pyObj) );
   17489                 : #endif
   17490                 :       else
   17491                 :       {
   17492               0 :         Py_DECREF(pyObj);
   17493               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   17494               0 :         SWIG_fail;
   17495                 :       }
   17496             280 :       Py_DECREF(pyObj);
   17497                 :     }
   17498                 :   }
   17499              55 :   if (obj1) {
   17500               0 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   17501               0 :     if (!SWIG_IsOK(ecode2)) {
   17502               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
   17503                 :     } 
   17504               0 :     arg2 = static_cast< int >(val2);
   17505                 :   }
   17506                 :   {
   17507              55 :     if ( bUseExceptions ) {
   17508               0 :       CPLErrorReset();
   17509                 :     }
   17510              55 :     result = (char **)GeneralCmdLineProcessor(arg1,arg2);
   17511              55 :     if ( bUseExceptions ) {
   17512               0 :       CPLErr eclass = CPLGetLastErrorType();
   17513               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17514               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17515                 :       }
   17516                 :     }
   17517                 :   }
   17518                 :   {
   17519                 :     /* %typemap(out) char **CSL -> ( string ) */
   17520              55 :     char **stringarray = result;
   17521              55 :     if ( stringarray == NULL ) {
   17522               0 :       resultobj = Py_None;
   17523               0 :       Py_INCREF( resultobj );
   17524                 :     }
   17525                 :     else {
   17526              55 :       int len = CSLCount( stringarray );
   17527              55 :       resultobj = PyList_New( len );
   17528             335 :       for ( int i = 0; i < len; ++i ) {
   17529             280 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   17530             280 :         PyList_SetItem(resultobj, i, o );
   17531                 :       }
   17532                 :     }
   17533              55 :     CSLDestroy(result);
   17534                 :   }
   17535                 :   {
   17536                 :     /* %typemap(freearg) char **options */
   17537              55 :     CSLDestroy( arg1 );
   17538                 :   }
   17539              55 :   return resultobj;
   17540                 : fail:
   17541                 :   {
   17542                 :     /* %typemap(freearg) char **options */
   17543               0 :     CSLDestroy( arg1 );
   17544                 :   }
   17545               0 :   return NULL;
   17546                 : }
   17547                 : 
   17548                 : 
   17549               0 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17550               0 :   PyObject *resultobj = 0;
   17551                 :   double arg1 ;
   17552               0 :   char *arg2 = (char *) NULL ;
   17553               0 :   void *arg3 = (void *) NULL ;
   17554                 :   double val1 ;
   17555               0 :   int ecode1 = 0 ;
   17556                 :   int res2 ;
   17557               0 :   char *buf2 = 0 ;
   17558               0 :   int alloc2 = 0 ;
   17559                 :   int res3 ;
   17560               0 :   PyObject * obj0 = 0 ;
   17561               0 :   PyObject * obj1 = 0 ;
   17562               0 :   PyObject * obj2 = 0 ;
   17563                 :   char *  kwnames[] = {
   17564                 :     (char *) "dfProgress",(char *) "pszMessage",(char *) "pData", NULL 
   17565               0 :   };
   17566                 :   int result;
   17567                 :   
   17568               0 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:TermProgress_nocb",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   17569               0 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   17570               0 :   if (!SWIG_IsOK(ecode1)) {
   17571               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
   17572                 :   } 
   17573               0 :   arg1 = static_cast< double >(val1);
   17574               0 :   if (obj1) {
   17575               0 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   17576               0 :     if (!SWIG_IsOK(res2)) {
   17577               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
   17578                 :     }
   17579               0 :     arg2 = reinterpret_cast< char * >(buf2);
   17580                 :   }
   17581               0 :   if (obj2) {
   17582               0 :     res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
   17583               0 :     if (!SWIG_IsOK(res3)) {
   17584               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
   17585                 :     }
   17586                 :   }
   17587                 :   {
   17588               0 :     if ( bUseExceptions ) {
   17589               0 :       CPLErrorReset();
   17590                 :     }
   17591               0 :     result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
   17592               0 :     if ( bUseExceptions ) {
   17593               0 :       CPLErr eclass = CPLGetLastErrorType();
   17594               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17595               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17596                 :       }
   17597                 :     }
   17598                 :   }
   17599               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17600               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17601               0 :   return resultobj;
   17602                 : fail:
   17603               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17604               0 :   return NULL;
   17605                 : }
   17606                 : 
   17607                 : 
   17608                 : static PyMethodDef SwigMethods[] = {
   17609                 :    { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
   17610                 :    { (char *)"GetUseExceptions", _wrap_GetUseExceptions, METH_VARARGS, (char *)"GetUseExceptions() -> int"},
   17611                 :    { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, (char *)"UseExceptions()"},
   17612                 :    { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, (char *)"DontUseExceptions()"},
   17613                 :    { (char *)"Driver_name_get", _wrap_Driver_name_get, METH_VARARGS, (char *)"Driver_name_get(Driver self) -> char"},
   17614                 :    { (char *)"Driver_CreateDataSource", (PyCFunction) _wrap_Driver_CreateDataSource, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   17615                 :     "Driver_CreateDataSource(Driver self, char utf8_path, char options = None) -> DataSource\n"
   17616                 :     "\n"
   17617                 :     "OGRDataSourceH\n"
   17618                 :     "OGR_Dr_CreateDataSource(OGRSFDriverH hDriver, const char *pszName,\n"
   17619                 :     "char **papszOptions)\n"
   17620                 :     "\n"
   17621                 :     "This function attempts to create a new data source based on the passed\n"
   17622                 :     "driver.\n"
   17623                 :     "\n"
   17624                 :     "The papszOptions argument can be used to control driver specific\n"
   17625                 :     "creation options. These options are normally documented in the format\n"
   17626                 :     "specific documentation.\n"
   17627                 :     "\n"
   17628                 :     "It is important to call OGR_DS_Destroy() when the datasource is no\n"
   17629                 :     "longer used to ensure that all data has been properly flushed to disk.\n"
   17630                 :     "\n"
   17631                 :     "This function is the same as the C++ method\n"
   17632                 :     "OGRSFDriver::CreateDataSource().\n"
   17633                 :     "\n"
   17634                 :     "Parameters:\n"
   17635                 :     "-----------\n"
   17636                 :     "\n"
   17637                 :     "hDriver:  handle to the driver on which data source creation is based.\n"
   17638                 :     "\n"
   17639                 :     "pszName:  the name for the new data source. UTF-8 encoded.\n"
   17640                 :     "\n"
   17641                 :     "papszOptions:  a StringList of name=value options. Options are driver\n"
   17642                 :     "specific, and driver information can be found at the following\n"
   17643                 :     "url:http://www.gdal.org/ogr/ogr_formats.html\n"
   17644                 :     "\n"
   17645                 :     "NULL is returned on failure, or a new OGRDataSource handle on success.\n"
   17646                 :     "\n"
   17647                 :     ""},
   17648                 :    { (char *)"Driver_CopyDataSource", (PyCFunction) _wrap_Driver_CopyDataSource, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   17649                 :     "Driver_CopyDataSource(Driver self, DataSource copy_ds, char utf8_path, char options = None) -> DataSource\n"
   17650                 :     "\n"
   17651                 :     "OGRDataSourceH\n"
   17652                 :     "OGR_Dr_CopyDataSource(OGRSFDriverH hDriver, OGRDataSourceH hSrcDS,\n"
   17653                 :     "const char *pszNewName, char **papszOptions)\n"
   17654                 :     "\n"
   17655                 :     "This function creates a new datasource by copying all the layers from\n"
   17656                 :     "the source datasource.\n"
   17657                 :     "\n"
   17658                 :     "It is important to call OGR_DS_Destroy() when the datasource is no\n"
   17659                 :     "longer used to ensure that all data has been properly flushed to disk.\n"
   17660                 :     "\n"
   17661                 :     "This function is the same as the C++ method\n"
   17662                 :     "OGRSFDriver::CopyDataSource().\n"
   17663                 :     "\n"
   17664                 :     "Parameters:\n"
   17665                 :     "-----------\n"
   17666                 :     "\n"
   17667                 :     "hDriver:  handle to the driver on which data source creation is based.\n"
   17668                 :     "\n"
   17669                 :     "hSrcDS:  source datasource\n"
   17670                 :     "\n"
   17671                 :     "pszNewName:  the name for the new data source.\n"
   17672                 :     "\n"
   17673                 :     "papszOptions:  a StringList of name=value options. Options are driver\n"
   17674                 :     "specific, and driver information can be found at the following\n"
   17675                 :     "url:http://www.gdal.org/ogr/ogr_formats.html\n"
   17676                 :     "\n"
   17677                 :     "NULL is returned on failure, or a new OGRDataSource handle on success.\n"
   17678                 :     "\n"
   17679                 :     ""},
   17680                 :    { (char *)"Driver_Open", (PyCFunction) _wrap_Driver_Open, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   17681                 :     "Driver_Open(Driver self, char utf8_path, int update = 0) -> DataSource\n"
   17682                 :     "\n"
   17683                 :     "OGRDataSourceH OGR_Dr_Open(OGRSFDriverH\n"
   17684                 :     "hDriver, const char *pszName, int bUpdate)\n"
   17685                 :     "\n"
   17686                 :     "Attempt to open file with this driver.\n"
   17687                 :     "\n"
   17688                 :     "This function is the same as the C++ method OGRSFDriver::Open().\n"
   17689                 :     "\n"
   17690                 :     "Parameters:\n"
   17691                 :     "-----------\n"
   17692                 :     "\n"
   17693                 :     "hDriver:  handle to the driver that is used to open file.\n"
   17694                 :     "\n"
   17695                 :     "pszName:  the name of the file, or data source to try and open.\n"
   17696                 :     "\n"
   17697                 :     "bUpdate:  TRUE if update access is required, otherwise FALSE (the\n"
   17698                 :     "default).\n"
   17699                 :     "\n"
   17700                 :     "NULL on error or if the pass name is not supported by this driver,\n"
   17701                 :     "otherwise an handle to an OGRDataSource. This OGRDataSource should be\n"
   17702                 :     "closed by deleting the object when it is no longer needed. \n"
   17703                 :     ""},
   17704                 :    { (char *)"Driver_DeleteDataSource", _wrap_Driver_DeleteDataSource, METH_VARARGS, (char *)"\n"
   17705                 :     "Driver_DeleteDataSource(Driver self, char utf8_path) -> int\n"
   17706                 :     "\n"
   17707                 :     "OGRErr\n"
   17708                 :     "OGR_Dr_DeleteDataSource(OGRSFDriverH hDriver, const char\n"
   17709                 :     "*pszDataSource)\n"
   17710                 :     "\n"
   17711                 :     "Delete a datasource.\n"
   17712                 :     "\n"
   17713                 :     "Delete (from the disk, in the database, ...) the named datasource.\n"
   17714                 :     "Normally it would be safest if the datasource was not open at the\n"
   17715                 :     "time.\n"
   17716                 :     "\n"
   17717                 :     "Whether this is a supported operation on this driver case be tested\n"
   17718                 :     "using TestCapability() on ODrCDeleteDataSource.\n"
   17719                 :     "\n"
   17720                 :     "This method is the same as the C++ method\n"
   17721                 :     "OGRSFDriver::DeleteDataSource().\n"
   17722                 :     "\n"
   17723                 :     "Parameters:\n"
   17724                 :     "-----------\n"
   17725                 :     "\n"
   17726                 :     "hDriver:  handle to the driver on which data source deletion is based.\n"
   17727                 :     "\n"
   17728                 :     "pszDataSource:  the name of the datasource to delete.\n"
   17729                 :     "\n"
   17730                 :     "OGRERR_NONE on success, and OGRERR_UNSUPPORTED_OPERATION if this is\n"
   17731                 :     "not supported by this driver. \n"
   17732                 :     ""},
   17733                 :    { (char *)"Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, (char *)"\n"
   17734                 :     "Driver_TestCapability(Driver self, char cap) -> bool\n"
   17735                 :     "\n"
   17736                 :     "int\n"
   17737                 :     "OGR_Dr_TestCapability(OGRSFDriverH hDriver, const char *pszCap)\n"
   17738                 :     "\n"
   17739                 :     "Test if capability is available.\n"
   17740                 :     "\n"
   17741                 :     "One of the following data source capability names can be passed into\n"
   17742                 :     "this function, and a TRUE or FALSE value will be returned indicating\n"
   17743                 :     "whether or not the capability is available for this object.\n"
   17744                 :     "\n"
   17745                 :     "ODrCCreateDataSource: True if this driver can support creating data\n"
   17746                 :     "sources.\n"
   17747                 :     "\n"
   17748                 :     "ODrCDeleteDataSource: True if this driver supports deleting data\n"
   17749                 :     "sources.\n"
   17750                 :     "\n"
   17751                 :     "The #define macro forms of the capability names should be used in\n"
   17752                 :     "preference to the strings themselves to avoid mispelling.\n"
   17753                 :     "\n"
   17754                 :     "This function is the same as the C++ method\n"
   17755                 :     "OGRSFDriver::TestCapability().\n"
   17756                 :     "\n"
   17757                 :     "Parameters:\n"
   17758                 :     "-----------\n"
   17759                 :     "\n"
   17760                 :     "hDriver:  handle to the driver to test the capability against.\n"
   17761                 :     "\n"
   17762                 :     "pszCap:  the capability to test.\n"
   17763                 :     "\n"
   17764                 :     "TRUE if capability available otherwise FALSE. \n"
   17765                 :     ""},
   17766                 :    { (char *)"Driver_GetName", _wrap_Driver_GetName, METH_VARARGS, (char *)"\n"
   17767                 :     "Driver_GetName(Driver self) -> char\n"
   17768                 :     "\n"
   17769                 :     "const char*\n"
   17770                 :     "OGR_Dr_GetName(OGRSFDriverH hDriver)\n"
   17771                 :     "\n"
   17772                 :     "Fetch name of driver (file format). This name should be relatively\n"
   17773                 :     "short (10-40 characters), and should reflect the underlying file\n"
   17774                 :     "format. For instance \"ESRI Shapefile\".\n"
   17775                 :     "\n"
   17776                 :     "This function is the same as the C++ method OGRSFDriver::GetName().\n"
   17777                 :     "\n"
   17778                 :     "Parameters:\n"
   17779                 :     "-----------\n"
   17780                 :     "\n"
   17781                 :     "hDriver:  handle to the the driver to get the name from.\n"
   17782                 :     "\n"
   17783                 :     "driver name. This is an internal string and should not be modified or\n"
   17784                 :     "freed. \n"
   17785                 :     ""},
   17786                 :    { (char *)"Driver_Register", _wrap_Driver_Register, METH_VARARGS, (char *)"Driver_Register(Driver self)"},
   17787                 :    { (char *)"Driver_Deregister", _wrap_Driver_Deregister, METH_VARARGS, (char *)"Driver_Deregister(Driver self)"},
   17788                 :    { (char *)"Driver_swigregister", Driver_swigregister, METH_VARARGS, NULL},
   17789                 :    { (char *)"DataSource_name_get", _wrap_DataSource_name_get, METH_VARARGS, (char *)"DataSource_name_get(DataSource self) -> char"},
   17790                 :    { (char *)"delete_DataSource", _wrap_delete_DataSource, METH_VARARGS, (char *)"delete_DataSource(DataSource self)"},
   17791                 :    { (char *)"DataSource_GetRefCount", _wrap_DataSource_GetRefCount, METH_VARARGS, (char *)"\n"
   17792                 :     "DataSource_GetRefCount(DataSource self) -> int\n"
   17793                 :     "\n"
   17794                 :     "int\n"
   17795                 :     "OGR_DS_GetRefCount(OGRDataSourceH hDataSource) \n"
   17796                 :     ""},
   17797                 :    { (char *)"DataSource_GetSummaryRefCount", _wrap_DataSource_GetSummaryRefCount, METH_VARARGS, (char *)"\n"
   17798                 :     "DataSource_GetSummaryRefCount(DataSource self) -> int\n"
   17799                 :     "\n"
   17800                 :     "int\n"
   17801                 :     "OGR_DS_GetSummaryRefCount(OGRDataSourceH hDataSource) \n"
   17802                 :     ""},
   17803                 :    { (char *)"DataSource_GetLayerCount", _wrap_DataSource_GetLayerCount, METH_VARARGS, (char *)"\n"
   17804                 :     "DataSource_GetLayerCount(DataSource self) -> int\n"
   17805                 :     "\n"
   17806                 :     "int\n"
   17807                 :     "OGR_DS_GetLayerCount(OGRDataSourceH hDS)\n"
   17808                 :     "\n"
   17809                 :     "Get the number of layers in this data source.\n"
   17810                 :     "\n"
   17811                 :     "This function is the same as the C++ method\n"
   17812                 :     "OGRDataSource::GetLayerCount().\n"
   17813                 :     "\n"
   17814                 :     "Parameters:\n"
   17815                 :     "-----------\n"
   17816                 :     "\n"
   17817                 :     "hDS:  handle to the data source from which to get the number of\n"
   17818                 :     "layers.\n"
   17819                 :     "\n"
   17820                 :     "layer count. \n"
   17821                 :     ""},
   17822                 :    { (char *)"DataSource_GetDriver", _wrap_DataSource_GetDriver, METH_VARARGS, (char *)"\n"
   17823                 :     "DataSource_GetDriver(DataSource self) -> Driver\n"
   17824                 :     "\n"
   17825                 :     "OGRSFDriverH\n"
   17826                 :     "OGR_DS_GetDriver(OGRDataSourceH hDS)\n"
   17827                 :     "\n"
   17828                 :     "Returns the driver that the dataset was opened with.\n"
   17829                 :     "\n"
   17830                 :     "This method is the same as the C++ method OGRDataSource::GetDriver()\n"
   17831                 :     "\n"
   17832                 :     "Parameters:\n"
   17833                 :     "-----------\n"
   17834                 :     "\n"
   17835                 :     "hDS:  handle to the datasource\n"
   17836                 :     "\n"
   17837                 :     "NULL if driver info is not available, or pointer to a driver owned by\n"
   17838                 :     "the OGRSFDriverManager. \n"
   17839                 :     ""},
   17840                 :    { (char *)"DataSource_GetName", _wrap_DataSource_GetName, METH_VARARGS, (char *)"\n"
   17841                 :     "DataSource_GetName(DataSource self) -> char\n"
   17842                 :     "\n"
   17843                 :     "const char*\n"
   17844                 :     "OGR_DS_GetName(OGRDataSourceH hDS)\n"
   17845                 :     "\n"
   17846                 :     "Returns the name of the data source.\n"
   17847                 :     "\n"
   17848                 :     "This string should be sufficient to open the data source if passed to\n"
   17849                 :     "the same OGRSFDriver that this data source was opened with, but it\n"
   17850                 :     "need not be exactly the same string that was used to open the data\n"
   17851                 :     "source. Normally this is a filename.\n"
   17852                 :     "\n"
   17853                 :     "This function is the same as the C++ method OGRDataSource::GetName().\n"
   17854                 :     "\n"
   17855                 :     "Parameters:\n"
   17856                 :     "-----------\n"
   17857                 :     "\n"
   17858                 :     "hDS:  handle to the data source to get the name from.\n"
   17859                 :     "\n"
   17860                 :     "pointer to an internal name string which should not be modified or\n"
   17861                 :     "freed by the caller. \n"
   17862                 :     ""},
   17863                 :    { (char *)"DataSource_DeleteLayer", _wrap_DataSource_DeleteLayer, METH_VARARGS, (char *)"\n"
   17864                 :     "DataSource_DeleteLayer(DataSource self, int index) -> OGRErr\n"
   17865                 :     "\n"
   17866                 :     "OGRErr\n"
   17867                 :     "OGR_DS_DeleteLayer(OGRDataSourceH hDS, int iLayer)\n"
   17868                 :     "\n"
   17869                 :     "Delete the indicated layer from the datasource.\n"
   17870                 :     "\n"
   17871                 :     "If this method is supported the ODsCDeleteLayer capability will test\n"
   17872                 :     "TRUE on the OGRDataSource.\n"
   17873                 :     "\n"
   17874                 :     "This method is the same as the C++ method\n"
   17875                 :     "OGRDataSource::DeleteLayer().\n"
   17876                 :     "\n"
   17877                 :     "Parameters:\n"
   17878                 :     "-----------\n"
   17879                 :     "\n"
   17880                 :     "hDS:  handle to the datasource\n"
   17881                 :     "\n"
   17882                 :     "iLayer:  the index of the layer to delete.\n"
   17883                 :     "\n"
   17884                 :     "OGRERR_NONE on success, or OGRERR_UNSUPPORTED_OPERATION if deleting\n"
   17885                 :     "layers is not supported for this datasource. \n"
   17886                 :     ""},
   17887                 :    { (char *)"DataSource_SyncToDisk", _wrap_DataSource_SyncToDisk, METH_VARARGS, (char *)"\n"
   17888                 :     "DataSource_SyncToDisk(DataSource self) -> OGRErr\n"
   17889                 :     "\n"
   17890                 :     "OGRErr\n"
   17891                 :     "OGR_DS_SyncToDisk(OGRDataSourceH hDS)\n"
   17892                 :     "\n"
   17893                 :     "Flush pending changes to disk.\n"
   17894                 :     "\n"
   17895                 :     "This call is intended to force the datasource to flush any pending\n"
   17896                 :     "writes to disk, and leave the disk file in a consistent state. It\n"
   17897                 :     "would not normally have any effect on read-only datasources.\n"
   17898                 :     "\n"
   17899                 :     "Some data sources do not implement this method, and will still return\n"
   17900                 :     "OGRERR_NONE. An error is only returned if an error occurs while\n"
   17901                 :     "attempting to flush to disk.\n"
   17902                 :     "\n"
   17903                 :     "The default implementation of this method just calls the SyncToDisk()\n"
   17904                 :     "method on each of the layers. Conceptionally, calling SyncToDisk() on\n"
   17905                 :     "a datasource should include any work that might be accomplished by\n"
   17906                 :     "calling SyncToDisk() on layers in that data source.\n"
   17907                 :     "\n"
   17908                 :     "In any event, you should always close any opened datasource with\n"
   17909                 :     "OGR_DS_Destroy() that will ensure all data is correctly flushed.\n"
   17910                 :     "\n"
   17911                 :     "This method is the same as the C++ method OGRDataSource::SyncToDisk()\n"
   17912                 :     "\n"
   17913                 :     "Parameters:\n"
   17914                 :     "-----------\n"
   17915                 :     "\n"
   17916                 :     "hDS:  handle to the data source\n"
   17917                 :     "\n"
   17918                 :     "OGRERR_NONE if no error occurs (even if nothing is done) or an error\n"
   17919                 :     "code. \n"
   17920                 :     ""},
   17921                 :    { (char *)"DataSource_CreateLayer", (PyCFunction) _wrap_DataSource_CreateLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   17922                 :     "DataSource_CreateLayer(DataSource self, char name, SpatialReference srs = None, \n"
   17923                 :     "    OGRwkbGeometryType geom_type = wkbUnknown, \n"
   17924                 :     "    char options = None) -> Layer\n"
   17925                 :     "\n"
   17926                 :     "OGRLayerH\n"
   17927                 :     "OGR_DS_CreateLayer(OGRDataSourceH hDS, const char *pszName,\n"
   17928                 :     "OGRSpatialReferenceH hSpatialRef, OGRwkbGeometryType eType, char\n"
   17929                 :     "**papszOptions)\n"
   17930                 :     "\n"
   17931                 :     "This function attempts to create a new layer on the data source with\n"
   17932                 :     "the indicated name, coordinate system, geometry type.\n"
   17933                 :     "\n"
   17934                 :     "The papszOptions argument can be used to control driver specific\n"
   17935                 :     "creation options. These options are normally documented in the format\n"
   17936                 :     "specific documentation.\n"
   17937                 :     "\n"
   17938                 :     "This function is the same as the C++ method\n"
   17939                 :     "OGRDataSource::CreateLayer().\n"
   17940                 :     "\n"
   17941                 :     "Parameters:\n"
   17942                 :     "-----------\n"
   17943                 :     "\n"
   17944                 :     "hDS:  The dataset handle.\n"
   17945                 :     "\n"
   17946                 :     "pszName:  the name for the new layer. This should ideally not match\n"
   17947                 :     "any existing layer on the datasource.\n"
   17948                 :     "\n"
   17949                 :     "hSpatialRef:  handle to the coordinate system to use for the new\n"
   17950                 :     "layer, or NULL if no coordinate system is available.\n"
   17951                 :     "\n"
   17952                 :     "eType:  the geometry type for the layer. Use wkbUnknown if there are\n"
   17953                 :     "no constraints on the types geometry to be written.\n"
   17954                 :     "\n"
   17955                 :     "papszOptions:  a StringList of name=value options. Options are driver\n"
   17956                 :     "specific, and driver information can be found at the following\n"
   17957                 :     "url:http://www.gdal.org/ogr/ogr_formats.html\n"
   17958                 :     "\n"
   17959                 :     "NULL is returned on failure, or a new OGRLayer handle on success.\n"
   17960                 :     "Example: \n"
   17961                 :     ""},
   17962                 :    { (char *)"DataSource_CopyLayer", (PyCFunction) _wrap_DataSource_CopyLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   17963                 :     "DataSource_CopyLayer(DataSource self, Layer src_layer, char new_name, char options = None) -> Layer\n"
   17964                 :     "\n"
   17965                 :     "OGRLayerH\n"
   17966                 :     "OGR_DS_CopyLayer(OGRDataSourceH hDS, OGRLayerH hSrcLayer, const char\n"
   17967                 :     "*pszNewName, char **papszOptions)\n"
   17968                 :     "\n"
   17969                 :     "Duplicate an existing layer.\n"
   17970                 :     "\n"
   17971                 :     "This function creates a new layer, duplicate the field definitions of\n"
   17972                 :     "the source layer and then duplicate each features of the source layer.\n"
   17973                 :     "The papszOptions argument can be used to control driver specific\n"
   17974                 :     "creation options. These options are normally documented in the format\n"
   17975                 :     "specific documentation. The source layer may come from another\n"
   17976                 :     "dataset.\n"
   17977                 :     "\n"
   17978                 :     "This function is the same as the C++ method OGRDataSource::CopyLayer\n"
   17979                 :     "\n"
   17980                 :     "Parameters:\n"
   17981                 :     "-----------\n"
   17982                 :     "\n"
   17983                 :     "hDS:  handle to the data source where to create the new layer\n"
   17984                 :     "\n"
   17985                 :     "hSrcLayer:  handle to the source layer.\n"
   17986                 :     "\n"
   17987                 :     "pszNewName:  the name of the layer to create.\n"
   17988                 :     "\n"
   17989                 :     "papszOptions:  a StringList of name=value options. Options are driver\n"
   17990                 :     "specific.\n"
   17991                 :     "\n"
   17992                 :     "an handle to the layer, or NULL if an error occurs. \n"
   17993                 :     ""},
   17994                 :    { (char *)"DataSource_GetLayerByIndex", _wrap_DataSource_GetLayerByIndex, METH_VARARGS, (char *)"DataSource_GetLayerByIndex(DataSource self, int index = 0) -> Layer"},
   17995                 :    { (char *)"DataSource_GetLayerByName", _wrap_DataSource_GetLayerByName, METH_VARARGS, (char *)"\n"
   17996                 :     "DataSource_GetLayerByName(DataSource self, char layer_name) -> Layer\n"
   17997                 :     "\n"
   17998                 :     "OGRLayerH\n"
   17999                 :     "OGR_DS_GetLayerByName(OGRDataSourceH hDS, const char *pszName)\n"
   18000                 :     "\n"
   18001                 :     "Fetch a layer by name.\n"
   18002                 :     "\n"
   18003                 :     "The returned layer remains owned by the OGRDataSource and should not\n"
   18004                 :     "be deleted by the application.\n"
   18005                 :     "\n"
   18006                 :     "This function is the same as the C++ method\n"
   18007                 :     "OGRDataSource::GetLayerByName().\n"
   18008                 :     "\n"
   18009                 :     "Parameters:\n"
   18010                 :     "-----------\n"
   18011                 :     "\n"
   18012                 :     "hDS:  handle to the data source from which to get the layer.\n"
   18013                 :     "\n"
   18014                 :     "pszLayerName:  Layer the layer name of the layer to fetch.\n"
   18015                 :     "\n"
   18016                 :     "an handle to the layer, or NULL if the layer is not found or an error\n"
   18017                 :     "occurs. \n"
   18018                 :     ""},
   18019                 :    { (char *)"DataSource_TestCapability", _wrap_DataSource_TestCapability, METH_VARARGS, (char *)"\n"
   18020                 :     "DataSource_TestCapability(DataSource self, char cap) -> bool\n"
   18021                 :     "\n"
   18022                 :     "int\n"
   18023                 :     "OGR_DS_TestCapability(OGRDataSourceH hDS, const char *pszCap)\n"
   18024                 :     "\n"
   18025                 :     "Test if capability is available.\n"
   18026                 :     "\n"
   18027                 :     "One of the following data source capability names can be passed into\n"
   18028                 :     "this function, and a TRUE or FALSE value will be returned indicating\n"
   18029                 :     "whether or not the capability is available for this object.\n"
   18030                 :     "\n"
   18031                 :     "ODsCCreateLayer: True if this datasource can create new layers.\n"
   18032                 :     "\n"
   18033                 :     "The #define macro forms of the capability names should be used in\n"
   18034                 :     "preference to the strings themselves to avoid mispelling.\n"
   18035                 :     "\n"
   18036                 :     "This function is the same as the C++ method\n"
   18037                 :     "OGRDataSource::TestCapability().\n"
   18038                 :     "\n"
   18039                 :     "Parameters:\n"
   18040                 :     "-----------\n"
   18041                 :     "\n"
   18042                 :     "hDS:  handle to the data source against which to test the capability.\n"
   18043                 :     "\n"
   18044                 :     "pszCapability:  the capability to test.\n"
   18045                 :     "\n"
   18046                 :     "TRUE if capability available otherwise FALSE. \n"
   18047                 :     ""},
   18048                 :    { (char *)"DataSource_ExecuteSQL", (PyCFunction) _wrap_DataSource_ExecuteSQL, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   18049                 :     "DataSource_ExecuteSQL(DataSource self, char statement, Geometry spatialFilter = None, \n"
   18050                 :     "    char dialect = \"\") -> Layer\n"
   18051                 :     "\n"
   18052                 :     "OGRLayerH\n"
   18053                 :     "OGR_DS_ExecuteSQL(OGRDataSourceH hDS, const char *pszStatement,\n"
   18054                 :     "OGRGeometryH hSpatialFilter, const char *pszDialect)\n"
   18055                 :     "\n"
   18056                 :     "Execute an SQL statement against the data store.\n"
   18057                 :     "\n"
   18058                 :     "The result of an SQL query is either NULL for statements that are in\n"
   18059                 :     "error, or that have no results set, or an OGRLayer handle representing\n"
   18060                 :     "a results set from the query. Note that this OGRLayer is in addition\n"
   18061                 :     "to the layers in the data store and must be destroyed with\n"
   18062                 :     "OGR_DS_ReleaseResultSet() before the data source is closed\n"
   18063                 :     "(destroyed).\n"
   18064                 :     "\n"
   18065                 :     "For more information on the SQL dialect supported internally by OGR\n"
   18066                 :     "review theOGR SQL document. Some drivers (ie. Oracle and PostGIS) pass\n"
   18067                 :     "the SQL directly through to the underlying RDBMS.\n"
   18068                 :     "\n"
   18069                 :     "This function is the same as the C++ method\n"
   18070                 :     "OGRDataSource::ExecuteSQL();\n"
   18071                 :     "\n"
   18072                 :     "Parameters:\n"
   18073                 :     "-----------\n"
   18074                 :     "\n"
   18075                 :     "hDS:  handle to the data source on which the SQL query is executed.\n"
   18076                 :     "\n"
   18077                 :     "pszSQLCommand:  the SQL statement to execute.\n"
   18078                 :     "\n"
   18079                 :     "hSpatialFilter:  handle to a geometry which represents a spatial\n"
   18080                 :     "filter. Can be NULL.\n"
   18081                 :     "\n"
   18082                 :     "pszDialect:  allows control of the statement dialect. If set to NULL,\n"
   18083                 :     "the OGR SQL engine will be used, except for RDBMS drivers that will\n"
   18084                 :     "use their dedicated SQL engine, unless OGRSQL is explicitely passed as\n"
   18085                 :     "the dialect.\n"
   18086                 :     "\n"
   18087                 :     "an handle to a OGRLayer containing the results of the query.\n"
   18088                 :     "Deallocate with OGR_DS_ReleaseResultSet(). \n"
   18089                 :     ""},
   18090                 :    { (char *)"DataSource_ReleaseResultSet", _wrap_DataSource_ReleaseResultSet, METH_VARARGS, (char *)"\n"
   18091                 :     "DataSource_ReleaseResultSet(DataSource self, Layer layer)\n"
   18092                 :     "\n"
   18093                 :     "void\n"
   18094                 :     "OGR_DS_ReleaseResultSet(OGRDataSourceH hDS, OGRLayerH hLayer)\n"
   18095                 :     "\n"
   18096                 :     "Release results of OGR_DS_ExecuteSQL().\n"
   18097                 :     "\n"
   18098                 :     "This function should only be used to deallocate OGRLayers resulting\n"
   18099                 :     "from an OGR_DS_ExecuteSQL() call on the same OGRDataSource. Failure to\n"
   18100                 :     "deallocate a results set before destroying the OGRDataSource may cause\n"
   18101                 :     "errors.\n"
   18102                 :     "\n"
   18103                 :     "This function is the same as the C++ method\n"
   18104                 :     "OGRDataSource::ReleaseResultSet().\n"
   18105                 :     "\n"
   18106                 :     "Parameters:\n"
   18107                 :     "-----------\n"
   18108                 :     "\n"
   18109                 :     "hDS:  an handle to the data source on which was executed an SQL query.\n"
   18110                 :     "\n"
   18111                 :     "hLayer:  handle to the result of a previous OGR_DS_ExecuteSQL() call.\n"
   18112                 :     "\n"
   18113                 :     ""},
   18114                 :    { (char *)"DataSource_swigregister", DataSource_swigregister, METH_VARARGS, NULL},
   18115                 :    { (char *)"Layer_GetRefCount", _wrap_Layer_GetRefCount, METH_VARARGS, (char *)"\n"
   18116                 :     "Layer_GetRefCount(Layer self) -> int\n"
   18117                 :     "\n"
   18118                 :     "int OGR_L_GetRefCount(OGRLayerH\n"
   18119                 :     "hLayer) \n"
   18120                 :     ""},
   18121                 :    { (char *)"Layer_SetSpatialFilter", _wrap_Layer_SetSpatialFilter, METH_VARARGS, (char *)"\n"
   18122                 :     "Layer_SetSpatialFilter(Layer self, Geometry filter)\n"
   18123                 :     "\n"
   18124                 :     "void\n"
   18125                 :     "OGR_L_SetSpatialFilter(OGRLayerH hLayer, OGRGeometryH hGeom)\n"
   18126                 :     "\n"
   18127                 :     "Set a new spatial filter.\n"
   18128                 :     "\n"
   18129                 :     "This function set the geometry to be used as a spatial filter when\n"
   18130                 :     "fetching features via the OGR_L_GetNextFeature() function. Only\n"
   18131                 :     "features that geometrically intersect the filter geometry will be\n"
   18132                 :     "returned.\n"
   18133                 :     "\n"
   18134                 :     "Currently this test is may be inaccurately implemented, but it is\n"
   18135                 :     "guaranteed that all features who's envelope (as returned by\n"
   18136                 :     "OGR_G_GetEnvelope()) overlaps the envelope of the spatial filter will\n"
   18137                 :     "be returned. This can result in more shapes being returned that should\n"
   18138                 :     "strictly be the case.\n"
   18139                 :     "\n"
   18140                 :     "This function makes an internal copy of the passed geometry. The\n"
   18141                 :     "passed geometry remains the responsibility of the caller, and may be\n"
   18142                 :     "safely destroyed.\n"
   18143                 :     "\n"
   18144                 :     "For the time being the passed filter geometry should be in the same\n"
   18145                 :     "SRS as the layer (as returned by OGR_L_GetSpatialRef()). In the future\n"
   18146                 :     "this may be generalized.\n"
   18147                 :     "\n"
   18148                 :     "This function is the same as the C++ method\n"
   18149                 :     "OGRLayer::SetSpatialFilter.\n"
   18150                 :     "\n"
   18151                 :     "Parameters:\n"
   18152                 :     "-----------\n"
   18153                 :     "\n"
   18154                 :     "hLayer:  handle to the layer on which to set the spatial filter.\n"
   18155                 :     "\n"
   18156                 :     "hGeom:  handle to the geometry to use as a filtering region. NULL may\n"
   18157                 :     "be passed indicating that the current spatial filter should be\n"
   18158                 :     "cleared, but no new one instituted. \n"
   18159                 :     ""},
   18160                 :    { (char *)"Layer_SetSpatialFilterRect", _wrap_Layer_SetSpatialFilterRect, METH_VARARGS, (char *)"\n"
   18161                 :     "Layer_SetSpatialFilterRect(Layer self, double minx, double miny, double maxx, \n"
   18162                 :     "    double maxy)\n"
   18163                 :     "\n"
   18164                 :     "void\n"
   18165                 :     "OGR_L_SetSpatialFilterRect(OGRLayerH hLayer, double dfMinX, double\n"
   18166                 :     "dfMinY, double dfMaxX, double dfMaxY)\n"
   18167                 :     "\n"
   18168                 :     "Set a new rectangular spatial filter.\n"
   18169                 :     "\n"
   18170                 :     "This method set rectangle to be used as a spatial filter when fetching\n"
   18171                 :     "features via the OGR_L_GetNextFeature() method. Only features that\n"
   18172                 :     "geometrically intersect the given rectangle will be returned.\n"
   18173                 :     "\n"
   18174                 :     "The x/y values should be in the same coordinate system as the layer as\n"
   18175                 :     "a whole (as returned by OGRLayer::GetSpatialRef()). Internally this\n"
   18176                 :     "method is normally implemented as creating a 5 vertex closed\n"
   18177                 :     "rectangular polygon and passing it to OGRLayer::SetSpatialFilter(). It\n"
   18178                 :     "exists as a convenience.\n"
   18179                 :     "\n"
   18180                 :     "The only way to clear a spatial filter set with this method is to call\n"
   18181                 :     "OGRLayer::SetSpatialFilter(NULL).\n"
   18182                 :     "\n"
   18183                 :     "This method is the same as the C++ method\n"
   18184                 :     "OGRLayer::SetSpatialFilterRect().\n"
   18185                 :     "\n"
   18186                 :     "Parameters:\n"
   18187                 :     "-----------\n"
   18188                 :     "\n"
   18189                 :     "hLayer:  handle to the layer on which to set the spatial filter.\n"
   18190                 :     "\n"
   18191                 :     "dfMinX:  the minimum X coordinate for the rectangular region.\n"
   18192                 :     "\n"
   18193                 :     "dfMinY:  the minimum Y coordinate for the rectangular region.\n"
   18194                 :     "\n"
   18195                 :     "dfMaxX:  the maximum X coordinate for the rectangular region.\n"
   18196                 :     "\n"
   18197                 :     "dfMaxY:  the maximum Y coordinate for the rectangular region. \n"
   18198                 :     ""},
   18199                 :    { (char *)"Layer_GetSpatialFilter", _wrap_Layer_GetSpatialFilter, METH_VARARGS, (char *)"\n"
   18200                 :     "Layer_GetSpatialFilter(Layer self) -> Geometry\n"
   18201                 :     "\n"
   18202                 :     "OGRGeometryH\n"
   18203                 :     "OGR_L_GetSpatialFilter(OGRLayerH hLayer)\n"
   18204                 :     "\n"
   18205                 :     "This function returns the current spatial filter for this layer.\n"
   18206                 :     "\n"
   18207                 :     "The returned pointer is to an internally owned object, and should not\n"
   18208                 :     "be altered or deleted by the caller.\n"
   18209                 :     "\n"
   18210                 :     "This function is the same as the C++ method\n"
   18211                 :     "OGRLayer::GetSpatialFilter().\n"
   18212                 :     "\n"
   18213                 :     "Parameters:\n"
   18214                 :     "-----------\n"
   18215                 :     "\n"
   18216                 :     "hLayer:  handle to the layer to get the spatial filter from.\n"
   18217                 :     "\n"
   18218                 :     "an handle to the spatial filter geometry. \n"
   18219                 :     ""},
   18220                 :    { (char *)"Layer_SetAttributeFilter", _wrap_Layer_SetAttributeFilter, METH_VARARGS, (char *)"\n"
   18221                 :     "Layer_SetAttributeFilter(Layer self, char filter_string) -> OGRErr\n"
   18222                 :     "\n"
   18223                 :     "OGRErr\n"
   18224                 :     "OGR_L_SetAttributeFilter(OGRLayerH hLayer, const char *pszQuery)\n"
   18225                 :     "\n"
   18226                 :     "Set a new attribute query.\n"
   18227                 :     "\n"
   18228                 :     "This function sets the attribute query string to be used when fetching\n"
   18229                 :     "features via the OGR_L_GetNextFeature() function. Only features for\n"
   18230                 :     "which the query evaluates as true will be returned.\n"
   18231                 :     "\n"
   18232                 :     "The query string should be in the format of an SQL WHERE clause. For\n"
   18233                 :     "instance \"population > 1000000 and population < 5000000\" where\n"
   18234                 :     "population is an attribute in the layer. The query format is a\n"
   18235                 :     "restricted form of SQL WHERE clause as defined\n"
   18236                 :     "\"eq_format=restricted_where\" about half way through this document:\n"
   18237                 :     "\n"
   18238                 :     "http://ogdi.sourceforge.net/prop/6.2.CapabilitiesMetadata.html\n"
   18239                 :     "\n"
   18240                 :     "Note that installing a query string will generally result in resetting\n"
   18241                 :     "the current reading position (ala OGR_L_ResetReading()).\n"
   18242                 :     "\n"
   18243                 :     "This function is the same as the C++ method\n"
   18244                 :     "OGRLayer::SetAttributeFilter().\n"
   18245                 :     "\n"
   18246                 :     "Parameters:\n"
   18247                 :     "-----------\n"
   18248                 :     "\n"
   18249                 :     "hLayer:  handle to the layer on which attribute query will be\n"
   18250                 :     "executed.\n"
   18251                 :     "\n"
   18252                 :     "pszQuery:  query in restricted SQL WHERE format, or NULL to clear the\n"
   18253                 :     "current query.\n"
   18254                 :     "\n"
   18255                 :     "OGRERR_NONE if successfully installed, or an error code if the query\n"
   18256                 :     "expression is in error, or some other failure occurs. \n"
   18257                 :     ""},
   18258                 :    { (char *)"Layer_ResetReading", _wrap_Layer_ResetReading, METH_VARARGS, (char *)"\n"
   18259                 :     "Layer_ResetReading(Layer self)\n"
   18260                 :     "\n"
   18261                 :     "void\n"
   18262                 :     "OGR_L_ResetReading(OGRLayerH hLayer)\n"
   18263                 :     "\n"
   18264                 :     "Reset feature reading to start on the first feature.\n"
   18265                 :     "\n"
   18266                 :     "This affects GetNextFeature().\n"
   18267                 :     "\n"
   18268                 :     "This function is the same as the C++ method OGRLayer::ResetReading().\n"
   18269                 :     "\n"
   18270                 :     "Parameters:\n"
   18271                 :     "-----------\n"
   18272                 :     "\n"
   18273                 :     "hLayer:  handle to the layer on which features are read. \n"
   18274                 :     ""},
   18275                 :    { (char *)"Layer_GetName", _wrap_Layer_GetName, METH_VARARGS, (char *)"\n"
   18276                 :     "Layer_GetName(Layer self) -> char\n"
   18277                 :     "\n"
   18278                 :     "const char* OGR_L_GetName(OGRLayerH\n"
   18279                 :     "hLayer)\n"
   18280                 :     "\n"
   18281                 :     "Return the layer name.\n"
   18282                 :     "\n"
   18283                 :     "This returns the same content as\n"
   18284                 :     "OGR_FD_GetName(OGR_L_GetLayerDefn(hLayer)), but for a few drivers,\n"
   18285                 :     "calling OGR_L_GetName() directly can avoid lengthy layer definition\n"
   18286                 :     "initialization.\n"
   18287                 :     "\n"
   18288                 :     "This function is the same as the C++ method OGRLayer::GetName().\n"
   18289                 :     "\n"
   18290                 :     "Parameters:\n"
   18291                 :     "-----------\n"
   18292                 :     "\n"
   18293                 :     "hLayer:  handle to the layer.\n"
   18294                 :     "\n"
   18295                 :     "the layer name (must not been freed)\n"
   18296                 :     "\n"
   18297                 :     "OGR 1.8.0 \n"
   18298                 :     ""},
   18299                 :    { (char *)"Layer_GetGeomType", _wrap_Layer_GetGeomType, METH_VARARGS, (char *)"\n"
   18300                 :     "Layer_GetGeomType(Layer self) -> OGRwkbGeometryType\n"
   18301                 :     "\n"
   18302                 :     "OGRwkbGeometryType\n"
   18303                 :     "OGR_L_GetGeomType(OGRLayerH hLayer)\n"
   18304                 :     "\n"
   18305                 :     "Return the layer geometry type.\n"
   18306                 :     "\n"
   18307                 :     "This returns the same result as\n"
   18308                 :     "OGR_FD_GetGeomType(OGR_L_GetLayerDefn(hLayer)), but for a few drivers,\n"
   18309                 :     "calling OGR_L_GetGeomType() directly can avoid lengthy layer\n"
   18310                 :     "definition initialization.\n"
   18311                 :     "\n"
   18312                 :     "This function is the same as the C++ method OGRLayer::GetGeomType().\n"
   18313                 :     "\n"
   18314                 :     "Parameters:\n"
   18315                 :     "-----------\n"
   18316                 :     "\n"
   18317                 :     "hLayer:  handle to the layer.\n"
   18318                 :     "\n"
   18319                 :     "the geometry type\n"
   18320                 :     "\n"
   18321                 :     "OGR 1.8.0 \n"
   18322                 :     ""},
   18323                 :    { (char *)"Layer_GetGeometryColumn", _wrap_Layer_GetGeometryColumn, METH_VARARGS, (char *)"\n"
   18324                 :     "Layer_GetGeometryColumn(Layer self) -> char\n"
   18325                 :     "\n"
   18326                 :     "const char*\n"
   18327                 :     "OGR_L_GetGeometryColumn(OGRLayerH hLayer)\n"
   18328                 :     "\n"
   18329                 :     "This method returns the name of the underlying database column being\n"
   18330                 :     "used as the geometry column, or \"\" if not supported.\n"
   18331                 :     "\n"
   18332                 :     "This method is the same as the C++ method\n"
   18333                 :     "OGRLayer::GetGeometryColumn()\n"
   18334                 :     "\n"
   18335                 :     "Parameters:\n"
   18336                 :     "-----------\n"
   18337                 :     "\n"
   18338                 :     "hLayer:  handle to the layer\n"
   18339                 :     "\n"
   18340                 :     "geometry column name. \n"
   18341                 :     ""},
   18342                 :    { (char *)"Layer_GetFIDColumn", _wrap_Layer_GetFIDColumn, METH_VARARGS, (char *)"\n"
   18343                 :     "Layer_GetFIDColumn(Layer self) -> char\n"
   18344                 :     "\n"
   18345                 :     "const char*\n"
   18346                 :     "OGR_L_GetFIDColumn(OGRLayerH hLayer)\n"
   18347                 :     "\n"
   18348                 :     "This method returns the name of the underlying database column being\n"
   18349                 :     "used as the FID column, or \"\" if not supported.\n"
   18350                 :     "\n"
   18351                 :     "This method is the same as the C++ method OGRLayer::GetFIDColumn()\n"
   18352                 :     "\n"
   18353                 :     "Parameters:\n"
   18354                 :     "-----------\n"
   18355                 :     "\n"
   18356                 :     "hLayer:  handle to the layer\n"
   18357                 :     "\n"
   18358                 :     "fid column name. \n"
   18359                 :     ""},
   18360                 :    { (char *)"Layer_GetFeature", _wrap_Layer_GetFeature, METH_VARARGS, (char *)"\n"
   18361                 :     "Layer_GetFeature(Layer self, long fid) -> Feature\n"
   18362                 :     "\n"
   18363                 :     "OGRFeatureH\n"
   18364                 :     "OGR_L_GetFeature(OGRLayerH hLayer, long nFeatureId)\n"
   18365                 :     "\n"
   18366                 :     "Fetch a feature by its identifier.\n"
   18367                 :     "\n"
   18368                 :     "This function will attempt to read the identified feature. The nFID\n"
   18369                 :     "value cannot be OGRNullFID. Success or failure of this operation is\n"
   18370                 :     "unaffected by the spatial or attribute filters.\n"
   18371                 :     "\n"
   18372                 :     "If this function returns a non-NULL feature, it is guaranteed that its\n"
   18373                 :     "feature id ( OGR_F_GetFID()) will be the same as nFID.\n"
   18374                 :     "\n"
   18375                 :     "Use OGR_L_TestCapability(OLCRandomRead) to establish if this layer\n"
   18376                 :     "supports efficient random access reading via OGR_L_GetFeature();\n"
   18377                 :     "however, the call should always work if the feature exists as a\n"
   18378                 :     "fallback implementation just scans all the features in the layer\n"
   18379                 :     "looking for the desired feature.\n"
   18380                 :     "\n"
   18381                 :     "Sequential reads are generally considered interrupted by a\n"
   18382                 :     "OGR_L_GetFeature() call.\n"
   18383                 :     "\n"
   18384                 :     "The returned feature should be free with OGR_F_Destroy().\n"
   18385                 :     "\n"
   18386                 :     "This function is the same as the C++ method OGRLayer::GetFeature( ).\n"
   18387                 :     "\n"
   18388                 :     "Parameters:\n"
   18389                 :     "-----------\n"
   18390                 :     "\n"
   18391                 :     "hLayer:  handle to the layer that owned the feature.\n"
   18392                 :     "\n"
   18393                 :     "nFeatureId:  the feature id of the feature to read.\n"
   18394                 :     "\n"
   18395                 :     "an handle to a feature now owned by the caller, or NULL on failure. \n"
   18396                 :     ""},
   18397                 :    { (char *)"Layer_GetNextFeature", _wrap_Layer_GetNextFeature, METH_VARARGS, (char *)"\n"
   18398                 :     "Layer_GetNextFeature(Layer self) -> Feature\n"
   18399                 :     "\n"
   18400                 :     "OGRFeatureH\n"
   18401                 :     "OGR_L_GetNextFeature(OGRLayerH hLayer)\n"
   18402                 :     "\n"
   18403                 :     "Fetch the next available feature from this layer.\n"
   18404                 :     "\n"
   18405                 :     "The returned feature becomes the responsiblity of the caller to delete\n"
   18406                 :     "with OGR_F_Destroy(). It is critical that all features associated with\n"
   18407                 :     "an OGRLayer (more specifically an OGRFeatureDefn) be deleted before\n"
   18408                 :     "that layer/datasource is deleted.\n"
   18409                 :     "\n"
   18410                 :     "Only features matching the current spatial filter (set with\n"
   18411                 :     "SetSpatialFilter()) will be returned.\n"
   18412                 :     "\n"
   18413                 :     "This function implements sequential access to the features of a layer.\n"
   18414                 :     "The OGR_L_ResetReading() function can be used to start at the\n"
   18415                 :     "beginning again.\n"
   18416                 :     "\n"
   18417                 :     "This function is the same as the C++ method\n"
   18418                 :     "OGRLayer::GetNextFeature().\n"
   18419                 :     "\n"
   18420                 :     "Parameters:\n"
   18421                 :     "-----------\n"
   18422                 :     "\n"
   18423                 :     "hLayer:  handle to the layer from which feature are read.\n"
   18424                 :     "\n"
   18425                 :     "an handle to a feature, or NULL if no more features are available. \n"
   18426                 :     ""},
   18427                 :    { (char *)"Layer_SetNextByIndex", _wrap_Layer_SetNextByIndex, METH_VARARGS, (char *)"\n"
   18428                 :     "Layer_SetNextByIndex(Layer self, long new_index) -> OGRErr\n"
   18429                 :     "\n"
   18430                 :     "OGRErr\n"
   18431                 :     "OGR_L_SetNextByIndex(OGRLayerH hLayer, long nIndex)\n"
   18432                 :     "\n"
   18433                 :     "Move read cursor to the nIndex'th feature in the current resultset.\n"
   18434                 :     "\n"
   18435                 :     "This method allows positioning of a layer such that the\n"
   18436                 :     "GetNextFeature() call will read the requested feature, where nIndex is\n"
   18437                 :     "an absolute index into the current result set. So, setting it to 3\n"
   18438                 :     "would mean the next feature read with GetNextFeature() would have been\n"
   18439                 :     "the 4th feature to have been read if sequential reading took place\n"
   18440                 :     "from the beginning of the layer, including accounting for spatial and\n"
   18441                 :     "attribute filters.\n"
   18442                 :     "\n"
   18443                 :     "Only in rare circumstances is SetNextByIndex() efficiently\n"
   18444                 :     "implemented. In all other cases the default implementation which calls\n"
   18445                 :     "ResetReading() and then calls GetNextFeature() nIndex times is used.\n"
   18446                 :     "To determine if fast seeking is available on the current layer use the\n"
   18447                 :     "TestCapability() method with a value of OLCFastSetNextByIndex.\n"
   18448                 :     "\n"
   18449                 :     "This method is the same as the C++ method OGRLayer::SetNextByIndex()\n"
   18450                 :     "\n"
   18451                 :     "Parameters:\n"
   18452                 :     "-----------\n"
   18453                 :     "\n"
   18454                 :     "hLayer:  handle to the layer\n"
   18455                 :     "\n"
   18456                 :     "nIndex:  the index indicating how many steps into the result set to\n"
   18457                 :     "seek.\n"
   18458                 :     "\n"
   18459                 :     "OGRERR_NONE on success or an error code. \n"
   18460                 :     ""},
   18461                 :    { (char *)"Layer_SetFeature", _wrap_Layer_SetFeature, METH_VARARGS, (char *)"\n"
   18462                 :     "Layer_SetFeature(Layer self, Feature feature) -> OGRErr\n"
   18463                 :     "\n"
   18464                 :     "OGRErr OGR_L_SetFeature(OGRLayerH\n"
   18465                 :     "hLayer, OGRFeatureH hFeat)\n"
   18466                 :     "\n"
   18467                 :     "Rewrite an existing feature.\n"
   18468                 :     "\n"
   18469                 :     "This function will write a feature to the layer, based on the feature\n"
   18470                 :     "id within the OGRFeature.\n"
   18471                 :     "\n"
   18472                 :     "Use OGR_L_TestCapability(OLCRandomWrite) to establish if this layer\n"
   18473                 :     "supports random access writing via OGR_L_SetFeature().\n"
   18474                 :     "\n"
   18475                 :     "This function is the same as the C++ method OGRLayer::SetFeature().\n"
   18476                 :     "\n"
   18477                 :     "Parameters:\n"
   18478                 :     "-----------\n"
   18479                 :     "\n"
   18480                 :     "hLayer:  handle to the layer to write the feature.\n"
   18481                 :     "\n"
   18482                 :     "hFeat:  the feature to write.\n"
   18483                 :     "\n"
   18484                 :     "OGRERR_NONE if the operation works, otherwise an appropriate error\n"
   18485                 :     "code. \n"
   18486                 :     ""},
   18487                 :    { (char *)"Layer_CreateFeature", _wrap_Layer_CreateFeature, METH_VARARGS, (char *)"\n"
   18488                 :     "Layer_CreateFeature(Layer self, Feature feature) -> OGRErr\n"
   18489                 :     "\n"
   18490                 :     "OGRErr\n"
   18491                 :     "OGR_L_CreateFeature(OGRLayerH hLayer, OGRFeatureH hFeat)\n"
   18492                 :     "\n"
   18493                 :     "Create and write a new feature within a layer.\n"
   18494                 :     "\n"
   18495                 :     "The passed feature is written to the layer as a new feature, rather\n"
   18496                 :     "than overwriting an existing one. If the feature has a feature id\n"
   18497                 :     "other than OGRNullFID, then the native implementation may use that as\n"
   18498                 :     "the feature id of the new feature, but not necessarily. Upon\n"
   18499                 :     "successful return the passed feature will have been updated with the\n"
   18500                 :     "new feature id.\n"
   18501                 :     "\n"
   18502                 :     "This function is the same as the C++ method OGRLayer::CreateFeature().\n"
   18503                 :     "\n"
   18504                 :     "Parameters:\n"
   18505                 :     "-----------\n"
   18506                 :     "\n"
   18507                 :     "hLayer:  handle to the layer to write the feature to.\n"
   18508                 :     "\n"
   18509                 :     "hFeat:  the handle of the feature to write to disk.\n"
   18510                 :     "\n"
   18511                 :     "OGRERR_NONE on success. \n"
   18512                 :     ""},
   18513                 :    { (char *)"Layer_DeleteFeature", _wrap_Layer_DeleteFeature, METH_VARARGS, (char *)"\n"
   18514                 :     "Layer_DeleteFeature(Layer self, long fid) -> OGRErr\n"
   18515                 :     "\n"
   18516                 :     "OGRErr\n"
   18517                 :     "OGR_L_DeleteFeature(OGRLayerH hDS, long nFID)\n"
   18518                 :     "\n"
   18519                 :     "Delete feature from layer.\n"
   18520                 :     "\n"
   18521                 :     "The feature with the indicated feature id is deleted from the layer if\n"
   18522                 :     "supported by the driver. Most drivers do not support feature deletion,\n"
   18523                 :     "and will return OGRERR_UNSUPPORTED_OPERATION. The\n"
   18524                 :     "OGR_L_TestCapability() function may be called with OLCDeleteFeature to\n"
   18525                 :     "check if the driver supports feature deletion.\n"
   18526                 :     "\n"
   18527                 :     "This method is the same as the C++ method OGRLayer::DeleteFeature().\n"
   18528                 :     "\n"
   18529                 :     "Parameters:\n"
   18530                 :     "-----------\n"
   18531                 :     "\n"
   18532                 :     "hLayer:  handle to the layer\n"
   18533                 :     "\n"
   18534                 :     "nFID:  the feature id to be deleted from the layer\n"
   18535                 :     "\n"
   18536                 :     "OGRERR_NONE on success. \n"
   18537                 :     ""},
   18538                 :    { (char *)"Layer_SyncToDisk", _wrap_Layer_SyncToDisk, METH_VARARGS, (char *)"\n"
   18539                 :     "Layer_SyncToDisk(Layer self) -> OGRErr\n"
   18540                 :     "\n"
   18541                 :     "OGRErr OGR_L_SyncToDisk(OGRLayerH\n"
   18542                 :     "hDS)\n"
   18543                 :     "\n"
   18544                 :     "Flush pending changes to disk.\n"
   18545                 :     "\n"
   18546                 :     "This call is intended to force the layer to flush any pending writes\n"
   18547                 :     "to disk, and leave the disk file in a consistent state. It would not\n"
   18548                 :     "normally have any effect on read-only datasources.\n"
   18549                 :     "\n"
   18550                 :     "Some layers do not implement this method, and will still return\n"
   18551                 :     "OGRERR_NONE. The default implementation just returns OGRERR_NONE. An\n"
   18552                 :     "error is only returned if an error occurs while attempting to flush to\n"
   18553                 :     "disk.\n"
   18554                 :     "\n"
   18555                 :     "In any event, you should always close any opened datasource with\n"
   18556                 :     "OGR_DS_Destroy() that will ensure all data is correctly flushed.\n"
   18557                 :     "\n"
   18558                 :     "This method is the same as the C++ method OGRLayer::SyncToDisk()\n"
   18559                 :     "\n"
   18560                 :     "Parameters:\n"
   18561                 :     "-----------\n"
   18562                 :     "\n"
   18563                 :     "hLayer:  handle to the layer\n"
   18564                 :     "\n"
   18565                 :     "OGRERR_NONE if no error occurs (even if nothing is done) or an error\n"
   18566                 :     "code. \n"
   18567                 :     ""},
   18568                 :    { (char *)"Layer_GetLayerDefn", _wrap_Layer_GetLayerDefn, METH_VARARGS, (char *)"\n"
   18569                 :     "Layer_GetLayerDefn(Layer self) -> FeatureDefn\n"
   18570                 :     "\n"
   18571                 :     "OGRFeatureDefnH\n"
   18572                 :     "OGR_L_GetLayerDefn(OGRLayerH hLayer)\n"
   18573                 :     "\n"
   18574                 :     "Fetch the schema information for this layer.\n"
   18575                 :     "\n"
   18576                 :     "The returned handle to the OGRFeatureDefn is owned by the OGRLayer,\n"
   18577                 :     "and should not be modified or freed by the application. It\n"
   18578                 :     "encapsulates the attribute schema of the features of the layer.\n"
   18579                 :     "\n"
   18580                 :     "This function is the same as the C++ method OGRLayer::GetLayerDefn().\n"
   18581                 :     "\n"
   18582                 :     "Parameters:\n"
   18583                 :     "-----------\n"
   18584                 :     "\n"
   18585                 :     "hLayer:  handle to the layer to get the schema information.\n"
   18586                 :     "\n"
   18587                 :     "an handle to the feature definition. \n"
   18588                 :     ""},
   18589                 :    { (char *)"Layer_GetFeatureCount", (PyCFunction) _wrap_Layer_GetFeatureCount, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   18590                 :     "Layer_GetFeatureCount(Layer self, int force = 1) -> int\n"
   18591                 :     "\n"
   18592                 :     "int\n"
   18593                 :     "OGR_L_GetFeatureCount(OGRLayerH hLayer, int bForce)\n"
   18594                 :     "\n"
   18595                 :     "Fetch the feature count in this layer.\n"
   18596                 :     "\n"
   18597                 :     "Returns the number of features in the layer. For dynamic databases the\n"
   18598                 :     "count may not be exact. If bForce is FALSE, and it would be expensive\n"
   18599                 :     "to establish the feature count a value of -1 may be returned\n"
   18600                 :     "indicating that the count isn't know. If bForce is TRUE some\n"
   18601                 :     "implementations will actually scan the entire layer once to count\n"
   18602                 :     "objects.\n"
   18603                 :     "\n"
   18604                 :     "The returned count takes the spatial filter into account.\n"
   18605                 :     "\n"
   18606                 :     "Note that some implementations of this method may alter the read\n"
   18607                 :     "cursor of the layer.\n"
   18608                 :     "\n"
   18609                 :     "This function is the same as the CPP OGRLayer::GetFeatureCount().\n"
   18610                 :     "\n"
   18611                 :     "Parameters:\n"
   18612                 :     "-----------\n"
   18613                 :     "\n"
   18614                 :     "hLayer:  handle to the layer that owned the features.\n"
   18615                 :     "\n"
   18616                 :     "bForce:  Flag indicating whether the count should be computed even if\n"
   18617                 :     "it is expensive.\n"
   18618                 :     "\n"
   18619                 :     "feature count, -1 if count not known. \n"
   18620                 :     ""},
   18621                 :    { (char *)"Layer_GetExtent", (PyCFunction) _wrap_Layer_GetExtent, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   18622                 :     "Layer_GetExtent(Layer self, int force = 1, int can_return_null = 0)\n"
   18623                 :     "\n"
   18624                 :     "OGRErr OGR_L_GetExtent(OGRLayerH\n"
   18625                 :     "hLayer, OGREnvelope *psExtent, int bForce)\n"
   18626                 :     "\n"
   18627                 :     "Fetch the extent of this layer.\n"
   18628                 :     "\n"
   18629                 :     "Returns the extent (MBR) of the data in the layer. If bForce is FALSE,\n"
   18630                 :     "and it would be expensive to establish the extent then OGRERR_FAILURE\n"
   18631                 :     "will be returned indicating that the extent isn't know. If bForce is\n"
   18632                 :     "TRUE then some implementations will actually scan the entire layer\n"
   18633                 :     "once to compute the MBR of all the features in the layer.\n"
   18634                 :     "\n"
   18635                 :     "Depending on the drivers, the returned extent may or may not take the\n"
   18636                 :     "spatial filter into account. So it is safer to call OGR_L_GetExtent()\n"
   18637                 :     "without setting a spatial filter.\n"
   18638                 :     "\n"
   18639                 :     "Layers without any geometry may return OGRERR_FAILURE just indicating\n"
   18640                 :     "that no meaningful extents could be collected.\n"
   18641                 :     "\n"
   18642                 :     "Note that some implementations of this method may alter the read\n"
   18643                 :     "cursor of the layer.\n"
   18644                 :     "\n"
   18645                 :     "This function is the same as the C++ method OGRLayer::GetExtent().\n"
   18646                 :     "\n"
   18647                 :     "Parameters:\n"
   18648                 :     "-----------\n"
   18649                 :     "\n"
   18650                 :     "hLayer:  handle to the layer from which to get extent.\n"
   18651                 :     "\n"
   18652                 :     "psExtent:  the structure in which the extent value will be returned.\n"
   18653                 :     "\n"
   18654                 :     "bForce:  Flag indicating whether the extent should be computed even if\n"
   18655                 :     "it is expensive.\n"
   18656                 :     "\n"
   18657                 :     "OGRERR_NONE on success, OGRERR_FAILURE if extent not known. \n"
   18658                 :     ""},
   18659                 :    { (char *)"Layer_TestCapability", _wrap_Layer_TestCapability, METH_VARARGS, (char *)"\n"
   18660                 :     "Layer_TestCapability(Layer self, char cap) -> bool\n"
   18661                 :     "\n"
   18662                 :     "int\n"
   18663                 :     "OGR_L_TestCapability(OGRLayerH hLayer, const char *pszCap)\n"
   18664                 :     "\n"
   18665                 :     "Test if this layer supported the named capability.\n"
   18666                 :     "\n"
   18667                 :     "The capability codes that can be tested are represented as strings,\n"
   18668                 :     "but #defined constants exists to ensure correct spelling. Specific\n"
   18669                 :     "layer types may implement class specific capabilities, but this can't\n"
   18670                 :     "generally be discovered by the caller.\n"
   18671                 :     "\n"
   18672                 :     "OLCRandomRead / \"RandomRead\": TRUE if the GetFeature() method is\n"
   18673                 :     "implemented in an optimized way for this layer, as opposed to the\n"
   18674                 :     "default implementation using ResetReading() and GetNextFeature() to\n"
   18675                 :     "find the requested feature id.\n"
   18676                 :     "\n"
   18677                 :     "OLCSequentialWrite / \"SequentialWrite\": TRUE if the CreateFeature()\n"
   18678                 :     "method works for this layer. Note this means that this particular\n"
   18679                 :     "layer is writable. The same OGRLayer class may returned FALSE for\n"
   18680                 :     "other layer instances that are effectively read-only.\n"
   18681                 :     "\n"
   18682                 :     "OLCRandomWrite / \"RandomWrite\": TRUE if the SetFeature() method is\n"
   18683                 :     "operational on this layer. Note this means that this particular layer\n"
   18684                 :     "is writable. The same OGRLayer class may returned FALSE for other\n"
   18685                 :     "layer instances that are effectively read-only.\n"
   18686                 :     "\n"
   18687                 :     "OLCFastSpatialFilter / \"FastSpatialFilter\": TRUE if this layer\n"
   18688                 :     "implements spatial filtering efficiently. Layers that effectively read\n"
   18689                 :     "all features, and test them with the OGRFeature intersection methods\n"
   18690                 :     "should return FALSE. This can be used as a clue by the application\n"
   18691                 :     "whether it should build and maintain its own spatial index for\n"
   18692                 :     "features in this layer.\n"
   18693                 :     "\n"
   18694                 :     "OLCFastFeatureCount / \"FastFeatureCount\": TRUE if this layer can\n"
   18695                 :     "return a feature count (via OGR_L_GetFeatureCount()) efficiently ...\n"
   18696                 :     "ie. without counting the features. In some cases this will return TRUE\n"
   18697                 :     "until a spatial filter is installed after which it will return FALSE.\n"
   18698                 :     "\n"
   18699                 :     "OLCFastGetExtent / \"FastGetExtent\": TRUE if this layer can return\n"
   18700                 :     "its data extent (via OGR_L_GetExtent()) efficiently ... ie. without\n"
   18701                 :     "scanning all the features. In some cases this will return TRUE until a\n"
   18702                 :     "spatial filter is installed after which it will return FALSE.\n"
   18703                 :     "\n"
   18704                 :     "OLCFastSetNextByIndex / \"FastSetNextByIndex\": TRUE if this layer can\n"
   18705                 :     "perform the SetNextByIndex() call efficiently, otherwise FALSE.\n"
   18706                 :     "\n"
   18707                 :     "OLCCreateField / \"CreateField\": TRUE if this layer can create new\n"
   18708                 :     "fields on the current layer using CreateField(), otherwise FALSE.\n"
   18709                 :     "\n"
   18710                 :     "OLCDeleteField / \"DeleteField\": TRUE if this layer can delete\n"
   18711                 :     "existing fields on the current layer using DeleteField(), otherwise\n"
   18712                 :     "FALSE.\n"
   18713                 :     "\n"
   18714                 :     "OLCReorderFields / \"ReorderFields\": TRUE if this layer can reorder\n"
   18715                 :     "existing fields on the current layer using ReorderField() or\n"
   18716                 :     "ReorderFields(), otherwise FALSE.\n"
   18717                 :     "\n"
   18718                 :     "OLCAlterFieldDefn / \"AlterFieldDefn\": TRUE if this layer can alter\n"
   18719                 :     "the definition of an existing field on the current layer using\n"
   18720                 :     "AlterFieldDefn(), otherwise FALSE.\n"
   18721                 :     "\n"
   18722                 :     "OLCDeleteFeature / \"DeleteFeature\": TRUE if the DeleteFeature()\n"
   18723                 :     "method is supported on this layer, otherwise FALSE.\n"
   18724                 :     "\n"
   18725                 :     "OLCStringsAsUTF8 / \"StringsAsUTF8\": TRUE if values of OFTString\n"
   18726                 :     "fields are assured to be in UTF-8 format. If FALSE the encoding of\n"
   18727                 :     "fields is uncertain, though it might still be UTF-8.\n"
   18728                 :     "\n"
   18729                 :     "OLCTransactions / \"Transactions\": TRUE if the StartTransaction(),\n"
   18730                 :     "CommitTransaction() and RollbackTransaction() methods work in a\n"
   18731                 :     "meaningful way, otherwise FALSE.\n"
   18732                 :     "\n"
   18733                 :     "This function is the same as the C++ method\n"
   18734                 :     "OGRLayer::TestCapability().\n"
   18735                 :     "\n"
   18736                 :     "Parameters:\n"
   18737                 :     "-----------\n"
   18738                 :     "\n"
   18739                 :     "hLayer:  handle to the layer to get the capability from.\n"
   18740                 :     "\n"
   18741                 :     "pszCap:  the name of the capability to test.\n"
   18742                 :     "\n"
   18743                 :     "TRUE if the layer has the requested capability, or FALSE otherwise.\n"
   18744                 :     "OGRLayers will return FALSE for any unrecognised capabilities. \n"
   18745                 :     ""},
   18746                 :    { (char *)"Layer_CreateField", (PyCFunction) _wrap_Layer_CreateField, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   18747                 :     "Layer_CreateField(Layer self, FieldDefn field_def, int approx_ok = 1) -> OGRErr\n"
   18748                 :     "\n"
   18749                 :     "OGRErr\n"
   18750                 :     "OGR_L_CreateField(OGRLayerH hLayer, OGRFieldDefnH hField, int\n"
   18751                 :     "bApproxOK)\n"
   18752                 :     "\n"
   18753                 :     "Create a new field on a layer.\n"
   18754                 :     "\n"
   18755                 :     "You must use this to create new fields on a real layer. Internally the\n"
   18756                 :     "OGRFeatureDefn for the layer will be updated to reflect the new field.\n"
   18757                 :     "Applications should never modify the OGRFeatureDefn used by a layer\n"
   18758                 :     "directly.\n"
   18759                 :     "\n"
   18760                 :     "This function should not be called while there are feature objects in\n"
   18761                 :     "existance that were obtained or created with the previous layer\n"
   18762                 :     "definition.\n"
   18763                 :     "\n"
   18764                 :     "Not all drivers support this function. You can query a layer to check\n"
   18765                 :     "if it supports it with the OLCCreateField capability. Some drivers may\n"
   18766                 :     "only support this method while there are still no features in the\n"
   18767                 :     "layer. When it is supported, the existings features of the backing\n"
   18768                 :     "file/database should be updated accordingly.\n"
   18769                 :     "\n"
   18770                 :     "This function is the same as the C++ method OGRLayer::CreateField().\n"
   18771                 :     "\n"
   18772                 :     "Parameters:\n"
   18773                 :     "-----------\n"
   18774                 :     "\n"
   18775                 :     "hLayer:  handle to the layer to write the field definition.\n"
   18776                 :     "\n"
   18777                 :     "hField:  handle of the field definition to write to disk.\n"
   18778                 :     "\n"
   18779                 :     "bApproxOK:  If TRUE, the field may be created in a slightly different\n"
   18780                 :     "form depending on the limitations of the format driver.\n"
   18781                 :     "\n"
   18782                 :     "OGRERR_NONE on success. \n"
   18783                 :     ""},
   18784                 :    { (char *)"Layer_DeleteField", _wrap_Layer_DeleteField, METH_VARARGS, (char *)"\n"
   18785                 :     "Layer_DeleteField(Layer self, int iField) -> OGRErr\n"
   18786                 :     "\n"
   18787                 :     "OGRErr\n"
   18788                 :     "OGR_L_DeleteField(OGRLayerH hLayer, int iField)\n"
   18789                 :     "\n"
   18790                 :     "Create a new field on a layer.\n"
   18791                 :     "\n"
   18792                 :     "You must use this to delete existing fields on a real layer.\n"
   18793                 :     "Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
   18794                 :     "the deleted field. Applications should never modify the OGRFeatureDefn\n"
   18795                 :     "used by a layer directly.\n"
   18796                 :     "\n"
   18797                 :     "This function should not be called while there are feature objects in\n"
   18798                 :     "existance that were obtained or created with the previous layer\n"
   18799                 :     "definition.\n"
   18800                 :     "\n"
   18801                 :     "Not all drivers support this function. You can query a layer to check\n"
   18802                 :     "if it supports it with the OLCDeleteField capability. Some drivers may\n"
   18803                 :     "only support this method while there are still no features in the\n"
   18804                 :     "layer. When it is supported, the existings features of the backing\n"
   18805                 :     "file/database should be updated accordingly.\n"
   18806                 :     "\n"
   18807                 :     "This function is the same as the C++ method OGRLayer::DeleteField().\n"
   18808                 :     "\n"
   18809                 :     "Parameters:\n"
   18810                 :     "-----------\n"
   18811                 :     "\n"
   18812                 :     "hLayer:  handle to the layer.\n"
   18813                 :     "\n"
   18814                 :     "iField:  index of the field to delete.\n"
   18815                 :     "\n"
   18816                 :     "OGRERR_NONE on success.\n"
   18817                 :     "\n"
   18818                 :     "OGR 1.9.0 \n"
   18819                 :     ""},
   18820                 :    { (char *)"Layer_ReorderField", _wrap_Layer_ReorderField, METH_VARARGS, (char *)"\n"
   18821                 :     "Layer_ReorderField(Layer self, int iOldFieldPos, int iNewFieldPos) -> OGRErr\n"
   18822                 :     "\n"
   18823                 :     "OGRErr\n"
   18824                 :     "OGR_L_ReorderField(OGRLayerH hLayer, int iOldFieldPos, int\n"
   18825                 :     "iNewFieldPos)\n"
   18826                 :     "\n"
   18827                 :     "Reorder an existing field on a layer.\n"
   18828                 :     "\n"
   18829                 :     "This function is a conveniency wrapper of OGR_L_ReorderFields()\n"
   18830                 :     "dedicated to move a single field.\n"
   18831                 :     "\n"
   18832                 :     "You must use this to reorder existing fields on a real layer.\n"
   18833                 :     "Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
   18834                 :     "the reordering of the fields. Applications should never modify the\n"
   18835                 :     "OGRFeatureDefn used by a layer directly.\n"
   18836                 :     "\n"
   18837                 :     "This function should not be called while there are feature objects in\n"
   18838                 :     "existance that were obtained or created with the previous layer\n"
   18839                 :     "definition.\n"
   18840                 :     "\n"
   18841                 :     "The field definition that was at initial position iOldFieldPos will be\n"
   18842                 :     "moved at position iNewFieldPos, and elements between will be shuffled\n"
   18843                 :     "accordingly.\n"
   18844                 :     "\n"
   18845                 :     "For example, let suppose the fields were \"0\",\"1\",\"2\",\"3\",\"4\"\n"
   18846                 :     "initially. ReorderField(1, 3) will reorder them as\n"
   18847                 :     "\"0\",\"2\",\"3\",\"1\",\"4\".\n"
   18848                 :     "\n"
   18849                 :     "Not all drivers support this function. You can query a layer to check\n"
   18850                 :     "if it supports it with the OLCReorderFields capability. Some drivers\n"
   18851                 :     "may only support this method while there are still no features in the\n"
   18852                 :     "layer. When it is supported, the existings features of the backing\n"
   18853                 :     "file/database should be updated accordingly.\n"
   18854                 :     "\n"
   18855                 :     "This function is the same as the C++ method OGRLayer::ReorderField().\n"
   18856                 :     "\n"
   18857                 :     "Parameters:\n"
   18858                 :     "-----------\n"
   18859                 :     "\n"
   18860                 :     "hLayer:  handle to the layer.\n"
   18861                 :     "\n"
   18862                 :     "iOldFieldPos:  previous position of the field to move. Must be in the\n"
   18863                 :     "range [0,GetFieldCount()-1].\n"
   18864                 :     "\n"
   18865                 :     "iNewFieldPos:  new position of the field to move. Must be in the range\n"
   18866                 :     "[0,GetFieldCount()-1].\n"
   18867                 :     "\n"
   18868                 :     "OGRERR_NONE on success.\n"
   18869                 :     "\n"
   18870                 :     "OGR 1.9.0 \n"
   18871                 :     ""},
   18872                 :    { (char *)"Layer_ReorderFields", _wrap_Layer_ReorderFields, METH_VARARGS, (char *)"\n"
   18873                 :     "Layer_ReorderFields(Layer self, int nList) -> OGRErr\n"
   18874                 :     "\n"
   18875                 :     "OGRErr\n"
   18876                 :     "OGR_L_ReorderFields(OGRLayerH hLayer, int *panMap)\n"
   18877                 :     "\n"
   18878                 :     "Reorder all the fields of a layer.\n"
   18879                 :     "\n"
   18880                 :     "You must use this to reorder existing fields on a real layer.\n"
   18881                 :     "Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
   18882                 :     "the reordering of the fields. Applications should never modify the\n"
   18883                 :     "OGRFeatureDefn used by a layer directly.\n"
   18884                 :     "\n"
   18885                 :     "This function should not be called while there are feature objects in\n"
   18886                 :     "existance that were obtained or created with the previous layer\n"
   18887                 :     "definition.\n"
   18888                 :     "\n"
   18889                 :     "panMap is such that,for each field definition at position i after\n"
   18890                 :     "reordering, its position before reordering was panMap[i].\n"
   18891                 :     "\n"
   18892                 :     "For example, let suppose the fields were \"0\",\"1\",\"2\",\"3\",\"4\"\n"
   18893                 :     "initially. ReorderFields([0,2,3,1,4]) will reorder them as\n"
   18894                 :     "\"0\",\"2\",\"3\",\"1\",\"4\".\n"
   18895                 :     "\n"
   18896                 :     "Not all drivers support this function. You can query a layer to check\n"
   18897                 :     "if it supports it with the OLCReorderFields capability. Some drivers\n"
   18898                 :     "may only support this method while there are still no features in the\n"
   18899                 :     "layer. When it is supported, the existings features of the backing\n"
   18900                 :     "file/database should be updated accordingly.\n"
   18901                 :     "\n"
   18902                 :     "This function is the same as the C++ method OGRLayer::ReorderFields().\n"
   18903                 :     "\n"
   18904                 :     "Parameters:\n"
   18905                 :     "-----------\n"
   18906                 :     "\n"
   18907                 :     "hLayer:  handle to the layer.\n"
   18908                 :     "\n"
   18909                 :     "panMap:  an array of GetLayerDefn()->GetFieldCount() elements which is\n"
   18910                 :     "a permutation of [0, GetLayerDefn()->GetFieldCount()-1].\n"
   18911                 :     "\n"
   18912                 :     "OGRERR_NONE on success.\n"
   18913                 :     "\n"
   18914                 :     "OGR 1.9.0 \n"
   18915                 :     ""},
   18916                 :    { (char *)"Layer_AlterFieldDefn", _wrap_Layer_AlterFieldDefn, METH_VARARGS, (char *)"\n"
   18917                 :     "Layer_AlterFieldDefn(Layer self, int iField, FieldDefn field_def, int nFlags) -> OGRErr\n"
   18918                 :     "\n"
   18919                 :     "OGRErr\n"
   18920                 :     "OGR_L_AlterFieldDefn(OGRLayerH hLayer, int iField, OGRFieldDefnH\n"
   18921                 :     "hNewFieldDefn, int nFlags)\n"
   18922                 :     "\n"
   18923                 :     "Alter the definition of an existing field on a layer.\n"
   18924                 :     "\n"
   18925                 :     "You must use this to alter the definition of an existing field of a\n"
   18926                 :     "real layer. Internally the OGRFeatureDefn for the layer will be\n"
   18927                 :     "updated to reflect the altered field. Applications should never modify\n"
   18928                 :     "the OGRFeatureDefn used by a layer directly.\n"
   18929                 :     "\n"
   18930                 :     "This function should not be called while there are feature objects in\n"
   18931                 :     "existance that were obtained or created with the previous layer\n"
   18932                 :     "definition.\n"
   18933                 :     "\n"
   18934                 :     "Not all drivers support this function. You can query a layer to check\n"
   18935                 :     "if it supports it with the OLCAlterFieldDefn capability. Some drivers\n"
   18936                 :     "may only support this method while there are still no features in the\n"
   18937                 :     "layer. When it is supported, the existings features of the backing\n"
   18938                 :     "file/database should be updated accordingly. Some drivers might also\n"
   18939                 :     "not support all update flags.\n"
   18940                 :     "\n"
   18941                 :     "This function is the same as the C++ method\n"
   18942                 :     "OGRLayer::AlterFieldDefn().\n"
   18943                 :     "\n"
   18944                 :     "Parameters:\n"
   18945                 :     "-----------\n"
   18946                 :     "\n"
   18947                 :     "hLayer:  handle to the layer.\n"
   18948                 :     "\n"
   18949                 :     "iField:  index of the field whose definition must be altered.\n"
   18950                 :     "\n"
   18951                 :     "hNewFieldDefn:  new field definition\n"
   18952                 :     "\n"
   18953                 :     "nFlags:  combination of ALTER_NAME_FLAG, ALTER_TYPE_FLAG and\n"
   18954                 :     "ALTER_WIDTH_PRECISION_FLAG to indicate which of the name and/or type\n"
   18955                 :     "and/or width and precision fields from the new field definition must\n"
   18956                 :     "be taken into account.\n"
   18957                 :     "\n"
   18958                 :     "OGRERR_NONE on success.\n"
   18959                 :     "\n"
   18960                 :     "OGR 1.9.0 \n"
   18961                 :     ""},
   18962                 :    { (char *)"Layer_StartTransaction", _wrap_Layer_StartTransaction, METH_VARARGS, (char *)"\n"
   18963                 :     "Layer_StartTransaction(Layer self) -> OGRErr\n"
   18964                 :     "\n"
   18965                 :     "OGRErr\n"
   18966                 :     "OGR_L_StartTransaction(OGRLayerH hLayer)\n"
   18967                 :     "\n"
   18968                 :     "For datasources which support transactions, StartTransaction creates a\n"
   18969                 :     "transaction.\n"
   18970                 :     "\n"
   18971                 :     "If starting the transaction fails, will return OGRERR_FAILURE.\n"
   18972                 :     "Datasources which do not support transactions will always return\n"
   18973                 :     "OGRERR_NONE.\n"
   18974                 :     "\n"
   18975                 :     "This function is the same as the C++ method\n"
   18976                 :     "OGRLayer::StartTransaction().\n"
   18977                 :     "\n"
   18978                 :     "Parameters:\n"
   18979                 :     "-----------\n"
   18980                 :     "\n"
   18981                 :     "hLayer:  handle to the layer\n"
   18982                 :     "\n"
   18983                 :     "OGRERR_NONE on success. \n"
   18984                 :     ""},
   18985                 :    { (char *)"Layer_CommitTransaction", _wrap_Layer_CommitTransaction, METH_VARARGS, (char *)"\n"
   18986                 :     "Layer_CommitTransaction(Layer self) -> OGRErr\n"
   18987                 :     "\n"
   18988                 :     "OGRErr\n"
   18989                 :     "OGR_L_CommitTransaction(OGRLayerH hLayer)\n"
   18990                 :     "\n"
   18991                 :     "For datasources which support transactions, CommitTransaction commits\n"
   18992                 :     "a transaction.\n"
   18993                 :     "\n"
   18994                 :     "If no transaction is active, or the commit fails, will return\n"
   18995                 :     "OGRERR_FAILURE. Datasources which do not support transactions will\n"
   18996                 :     "always return OGRERR_NONE.\n"
   18997                 :     "\n"
   18998                 :     "This function is the same as the C++ method\n"
   18999                 :     "OGRLayer::CommitTransaction().\n"
   19000                 :     "\n"
   19001                 :     "Parameters:\n"
   19002                 :     "-----------\n"
   19003                 :     "\n"
   19004                 :     "hLayer:  handle to the layer\n"
   19005                 :     "\n"
   19006                 :     "OGRERR_NONE on success. \n"
   19007                 :     ""},
   19008                 :    { (char *)"Layer_RollbackTransaction", _wrap_Layer_RollbackTransaction, METH_VARARGS, (char *)"\n"
   19009                 :     "Layer_RollbackTransaction(Layer self) -> OGRErr\n"
   19010                 :     "\n"
   19011                 :     "OGRErr\n"
   19012                 :     "OGR_L_RollbackTransaction(OGRLayerH hLayer)\n"
   19013                 :     "\n"
   19014                 :     "For datasources which support transactions, RollbackTransaction will\n"
   19015                 :     "roll back a datasource to its state before the start of the current\n"
   19016                 :     "transaction. If no transaction is active, or the rollback fails, will\n"
   19017                 :     "return OGRERR_FAILURE. Datasources which do not support transactions\n"
   19018                 :     "will always return OGRERR_NONE.\n"
   19019                 :     "\n"
   19020                 :     "This function is the same as the C++ method\n"
   19021                 :     "OGRLayer::RollbackTransaction().\n"
   19022                 :     "\n"
   19023                 :     "Parameters:\n"
   19024                 :     "-----------\n"
   19025                 :     "\n"
   19026                 :     "hLayer:  handle to the layer\n"
   19027                 :     "\n"
   19028                 :     "OGRERR_NONE on success. \n"
   19029                 :     ""},
   19030                 :    { (char *)"Layer_GetSpatialRef", _wrap_Layer_GetSpatialRef, METH_VARARGS, (char *)"\n"
   19031                 :     "Layer_GetSpatialRef(Layer self) -> SpatialReference\n"
   19032                 :     "\n"
   19033                 :     "OGRSpatialReferenceH\n"
   19034                 :     "OGR_L_GetSpatialRef(OGRLayerH hLayer)\n"
   19035                 :     "\n"
   19036                 :     "Fetch the spatial reference system for this layer.\n"
   19037                 :     "\n"
   19038                 :     "The returned object is owned by the OGRLayer and should not be\n"
   19039                 :     "modified or freed by the application.\n"
   19040                 :     "\n"
   19041                 :     "This function is the same as the C++ method OGRLayer::GetSpatialRef().\n"
   19042                 :     "\n"
   19043                 :     "Parameters:\n"
   19044                 :     "-----------\n"
   19045                 :     "\n"
   19046                 :     "hLayer:  handle to the layer to get the spatial reference from.\n"
   19047                 :     "\n"
   19048                 :     "spatial reference, or NULL if there isn't one. \n"
   19049                 :     ""},
   19050                 :    { (char *)"Layer_GetFeaturesRead", _wrap_Layer_GetFeaturesRead, METH_VARARGS, (char *)"\n"
   19051                 :     "Layer_GetFeaturesRead(Layer self) -> GIntBig\n"
   19052                 :     "\n"
   19053                 :     "GIntBig\n"
   19054                 :     "OGR_L_GetFeaturesRead(OGRLayerH hLayer) \n"
   19055                 :     ""},
   19056                 :    { (char *)"Layer_SetIgnoredFields", _wrap_Layer_SetIgnoredFields, METH_VARARGS, (char *)"\n"
   19057                 :     "Layer_SetIgnoredFields(Layer self, char options) -> OGRErr\n"
   19058                 :     "\n"
   19059                 :     "OGRErr\n"
   19060                 :     "OGR_L_SetIgnoredFields(OGRLayerH hLayer, const char **papszFields)\n"
   19061                 :     "\n"
   19062                 :     "Set which fields can be omitted when retrieving features from the\n"
   19063                 :     "layer.\n"
   19064                 :     "\n"
   19065                 :     "If the driver supports this functionality (testable using\n"
   19066                 :     "OLCIgnoreFields capability), it will not fetch the specified fields in\n"
   19067                 :     "subsequent calls to GetFeature() / GetNextFeature() and thus save some\n"
   19068                 :     "processing time and/or bandwidth.\n"
   19069                 :     "\n"
   19070                 :     "Besides field names of the layers, the following special fields can be\n"
   19071                 :     "passed: \"OGR_GEOMETRY\" to ignore geometry and \"OGR_STYLE\" to\n"
   19072                 :     "ignore layer style.\n"
   19073                 :     "\n"
   19074                 :     "By default, no fields are ignored.\n"
   19075                 :     "\n"
   19076                 :     "This method is the same as the C++ method OGRLayer::SetIgnoredFields()\n"
   19077                 :     "\n"
   19078                 :     "Parameters:\n"
   19079                 :     "-----------\n"
   19080                 :     "\n"
   19081                 :     "papszFields:  an array of field names terminated by NULL item. If NULL\n"
   19082                 :     "is passed, the ignored list is cleared.\n"
   19083                 :     "\n"
   19084                 :     "OGRERR_NONE if all field names have been resolved (even if the driver\n"
   19085                 :     "does not support this method) \n"
   19086                 :     ""},
   19087                 :    { (char *)"Layer_Intersection", (PyCFunction) _wrap_Layer_Intersection, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   19088                 :     "Layer_Intersection(Layer self, Layer method_layer, Layer result_layer, \n"
   19089                 :     "    char options = None, GDALProgressFunc callback = None, \n"
   19090                 :     "    void callback_data = None) -> OGRErr\n"
   19091                 :     ""},
   19092                 :    { (char *)"Layer_Union", (PyCFunction) _wrap_Layer_Union, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   19093                 :     "Layer_Union(Layer self, Layer method_layer, Layer result_layer, \n"
   19094                 :     "    char options = None, GDALProgressFunc callback = None, \n"
   19095                 :     "    void callback_data = None) -> OGRErr\n"
   19096                 :     ""},
   19097                 :    { (char *)"Layer_SymDifference", (PyCFunction) _wrap_Layer_SymDifference, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   19098                 :     "Layer_SymDifference(Layer self, Layer method_layer, Layer result_layer, \n"
   19099                 :     "    char options = None, GDALProgressFunc callback = None, \n"
   19100                 :     "    void callback_data = None) -> OGRErr\n"
   19101                 :     ""},
   19102                 :    { (char *)"Layer_Identity", (PyCFunction) _wrap_Layer_Identity, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   19103                 :     "Layer_Identity(Layer self, Layer method_layer, Layer result_layer, \n"
   19104                 :     "    char options = None, GDALProgressFunc callback = None, \n"
   19105                 :     "    void callback_data = None) -> OGRErr\n"
   19106                 :     ""},
   19107                 :    { (char *)"Layer_Update", (PyCFunction) _wrap_Layer_Update, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   19108                 :     "Layer_Update(Layer self, Layer method_layer, Layer result_layer, \n"
   19109                 :     "    char options = None, GDALProgressFunc callback = None, \n"
   19110                 :     "    void callback_data = None) -> OGRErr\n"
   19111                 :     ""},
   19112                 :    { (char *)"Layer_Clip", (PyCFunction) _wrap_Layer_Clip, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   19113                 :     "Layer_Clip(Layer self, Layer method_layer, Layer result_layer, \n"
   19114                 :     "    char options = None, GDALProgressFunc callback = None, \n"
   19115                 :     "    void callback_data = None) -> OGRErr\n"
   19116                 :     ""},
   19117                 :    { (char *)"Layer_Erase", (PyCFunction) _wrap_Layer_Erase, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   19118                 :     "Layer_Erase(Layer self, Layer method_layer, Layer result_layer, \n"
   19119                 :     "    char options = None, GDALProgressFunc callback = None, \n"
   19120                 :     "    void callback_data = None) -> OGRErr\n"
   19121                 :     ""},
   19122                 :    { (char *)"Layer_swigregister", Layer_swigregister, METH_VARARGS, NULL},
   19123                 :    { (char *)"delete_Feature", _wrap_delete_Feature, METH_VARARGS, (char *)"delete_Feature(Feature self)"},
   19124                 :    { (char *)"new_Feature", (PyCFunction) _wrap_new_Feature, METH_VARARGS | METH_KEYWORDS, (char *)"new_Feature(FeatureDefn feature_def) -> Feature"},
   19125                 :    { (char *)"Feature_GetDefnRef", _wrap_Feature_GetDefnRef, METH_VARARGS, (char *)"\n"
   19126                 :     "Feature_GetDefnRef(Feature self) -> FeatureDefn\n"
   19127                 :     "\n"
   19128                 :     "OGRFeatureDefnH\n"
   19129                 :     "OGR_F_GetDefnRef(OGRFeatureH hFeat)\n"
   19130                 :     "\n"
   19131                 :     "Fetch feature definition.\n"
   19132                 :     "\n"
   19133                 :     "This function is the same as the C++ method OGRFeature::GetDefnRef().\n"
   19134                 :     "\n"
   19135                 :     "Parameters:\n"
   19136                 :     "-----------\n"
   19137                 :     "\n"
   19138                 :     "hFeat:  handle to the feature to get the feature definition from.\n"
   19139                 :     "\n"
   19140                 :     "an handle to the feature definition object on which feature depends.\n"
   19141                 :     "\n"
   19142                 :     ""},
   19143                 :    { (char *)"Feature_SetGeometry", _wrap_Feature_SetGeometry, METH_VARARGS, (char *)"\n"
   19144                 :     "Feature_SetGeometry(Feature self, Geometry geom) -> OGRErr\n"
   19145                 :     "\n"
   19146                 :     "OGRErr\n"
   19147                 :     "OGR_F_SetGeometry(OGRFeatureH hFeat, OGRGeometryH hGeom)\n"
   19148                 :     "\n"
   19149                 :     "Set feature geometry.\n"
   19150                 :     "\n"
   19151                 :     "This function updates the features geometry, and operate exactly as\n"
   19152                 :     "SetGeometryDirectly(), except that this function does not assume\n"
   19153                 :     "ownership of the passed geometry, but instead makes a copy of it.\n"
   19154                 :     "\n"
   19155                 :     "This function is the same as the C++ OGRFeature::SetGeometry().\n"
   19156                 :     "\n"
   19157                 :     "Parameters:\n"
   19158                 :     "-----------\n"
   19159                 :     "\n"
   19160                 :     "hFeat:  handle to the feature on which new geometry is applied to.\n"
   19161                 :     "\n"
   19162                 :     "hGeom:  handle to the new geometry to apply to feature.\n"
   19163                 :     "\n"
   19164                 :     "OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the\n"
   19165                 :     "geometry type is illegal for the OGRFeatureDefn (checking not yet\n"
   19166                 :     "implemented). \n"
   19167                 :     ""},
   19168                 :    { (char *)"Feature_SetGeometryDirectly", _wrap_Feature_SetGeometryDirectly, METH_VARARGS, (char *)"\n"
   19169                 :     "Feature_SetGeometryDirectly(Feature self, Geometry geom) -> OGRErr\n"
   19170                 :     "\n"
   19171                 :     "OGRErr\n"
   19172                 :     "OGR_F_SetGeometryDirectly(OGRFeatureH hFeat, OGRGeometryH hGeom)\n"
   19173                 :     "\n"
   19174                 :     "Set feature geometry.\n"
   19175                 :     "\n"
   19176                 :     "This function updates the features geometry, and operate exactly as\n"
   19177                 :     "SetGeometry(), except that this function assumes ownership of the\n"
   19178                 :     "passed geometry.\n"
   19179                 :     "\n"
   19180                 :     "This function is the same as the C++ method\n"
   19181                 :     "OGRFeature::SetGeometryDirectly.\n"
   19182                 :     "\n"
   19183                 :     "Parameters:\n"
   19184                 :     "-----------\n"
   19185                 :     "\n"
   19186                 :     "hFeat:  handle to the feature on which to apply the geometry.\n"
   19187                 :     "\n"
   19188                 :     "hGeom:  handle to the new geometry to apply to feature.\n"
   19189                 :     "\n"
   19190                 :     "OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the\n"
   19191                 :     "geometry type is illegal for the OGRFeatureDefn (checking not yet\n"
   19192                 :     "implemented). \n"
   19193                 :     ""},
   19194                 :    { (char *)"Feature_GetGeometryRef", _wrap_Feature_GetGeometryRef, METH_VARARGS, (char *)"\n"
   19195                 :     "Feature_GetGeometryRef(Feature self) -> Geometry\n"
   19196                 :     "\n"
   19197                 :     "OGRGeometryH\n"
   19198                 :     "OGR_F_GetGeometryRef(OGRFeatureH hFeat)\n"
   19199                 :     "\n"
   19200                 :     "Fetch an handle to feature geometry.\n"
   19201                 :     "\n"
   19202                 :     "This function is the same as the C++ method\n"
   19203                 :     "OGRFeature::GetGeometryRef().\n"
   19204                 :     "\n"
   19205                 :     "Parameters:\n"
   19206                 :     "-----------\n"
   19207                 :     "\n"
   19208                 :     "hFeat:  handle to the feature to get geometry from.\n"
   19209                 :     "\n"
   19210                 :     "an handle to internal feature geometry. This object should not be\n"
   19211                 :     "modified. \n"
   19212                 :     ""},
   19213                 :    { (char *)"Feature_Clone", _wrap_Feature_Clone, METH_VARARGS, (char *)"\n"
   19214                 :     "Feature_Clone(Feature self) -> Feature\n"
   19215                 :     "\n"
   19216                 :     "OGRFeatureH OGR_F_Clone(OGRFeatureH\n"
   19217                 :     "hFeat)\n"
   19218                 :     "\n"
   19219                 :     "Duplicate feature.\n"
   19220                 :     "\n"
   19221                 :     "The newly created feature is owned by the caller, and will have it's\n"
   19222                 :     "own reference to the OGRFeatureDefn.\n"
   19223                 :     "\n"
   19224                 :     "This function is the same as the C++ method OGRFeature::Clone().\n"
   19225                 :     "\n"
   19226                 :     "Parameters:\n"
   19227                 :     "-----------\n"
   19228                 :     "\n"
   19229                 :     "hFeat:  handle to the feature to clone.\n"
   19230                 :     "\n"
   19231                 :     "an handle to the new feature, exactly matching this feature. \n"
   19232                 :     ""},
   19233                 :    { (char *)"Feature_Equal", _wrap_Feature_Equal, METH_VARARGS, (char *)"\n"
   19234                 :     "Feature_Equal(Feature self, Feature feature) -> bool\n"
   19235                 :     "\n"
   19236                 :     "int OGR_F_Equal(OGRFeatureH hFeat,\n"
   19237                 :     "OGRFeatureH hOtherFeat)\n"
   19238                 :     "\n"
   19239                 :     "Test if two features are the same.\n"
   19240                 :     "\n"
   19241                 :     "Two features are considered equal if the share them (handle equality)\n"
   19242                 :     "same OGRFeatureDefn, have the same field values, and the same geometry\n"
   19243                 :     "(as tested by OGR_G_Equal()) as well as the same feature id.\n"
   19244                 :     "\n"
   19245                 :     "This function is the same as the C++ method OGRFeature::Equal().\n"
   19246                 :     "\n"
   19247                 :     "Parameters:\n"
   19248                 :     "-----------\n"
   19249                 :     "\n"
   19250                 :     "hFeat:  handle to one of the feature.\n"
   19251                 :     "\n"
   19252                 :     "hOtherFeat:  handle to the other feature to test this one against.\n"
   19253                 :     "\n"
   19254                 :     "TRUE if they are equal, otherwise FALSE. \n"
   19255                 :     ""},
   19256                 :    { (char *)"Feature_GetFieldCount", _wrap_Feature_GetFieldCount, METH_VARARGS, (char *)"\n"
   19257                 :     "Feature_GetFieldCount(Feature self) -> int\n"
   19258                 :     "\n"
   19259                 :     "int\n"
   19260                 :     "OGR_F_GetFieldCount(OGRFeatureH hFeat)\n"
   19261                 :     "\n"
   19262                 :     "Fetch number of fields on this feature This will always be the same as\n"
   19263                 :     "the field count for the OGRFeatureDefn.\n"
   19264                 :     "\n"
   19265                 :     "This function is the same as the C++ method\n"
   19266                 :     "OGRFeature::GetFieldCount().\n"
   19267                 :     "\n"
   19268                 :     "Parameters:\n"
   19269                 :     "-----------\n"
   19270                 :     "\n"
   19271                 :     "hFeat:  handle to the feature to get the fields count from.\n"
   19272                 :     "\n"
   19273                 :     "count of fields. \n"
   19274                 :     ""},
   19275                 :    { (char *)"Feature_GetFieldDefnRef", _wrap_Feature_GetFieldDefnRef, METH_VARARGS, (char *)"\n"
   19276                 :     "GetFieldDefnRef(int id) -> FieldDefn\n"
   19277                 :     "Feature_GetFieldDefnRef(Feature self, char name) -> FieldDefn\n"
   19278                 :     "\n"
   19279                 :     "OGRFieldDefnH\n"
   19280                 :     "OGR_F_GetFieldDefnRef(OGRFeatureH hFeat, int i)\n"
   19281                 :     "\n"
   19282                 :     "Fetch definition for this field.\n"
   19283                 :     "\n"
   19284                 :     "This function is the same as the C++ method\n"
   19285                 :     "OGRFeature::GetFieldDefnRef().\n"
   19286                 :     "\n"
   19287                 :     "Parameters:\n"
   19288                 :     "-----------\n"
   19289                 :     "\n"
   19290                 :     "hFeat:  handle to the feature on which the field is found.\n"
   19291                 :     "\n"
   19292                 :     "i:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   19293                 :     "\n"
   19294                 :     "an handle to the field definition (from the OGRFeatureDefn). This is\n"
   19295                 :     "an internal reference, and should not be deleted or modified. \n"
   19296                 :     ""},
   19297                 :    { (char *)"Feature_GetFieldAsString", _wrap_Feature_GetFieldAsString, METH_VARARGS, (char *)"\n"
   19298                 :     "GetFieldAsString(int id) -> char\n"
   19299                 :     "Feature_GetFieldAsString(Feature self, char name) -> char\n"
   19300                 :     "\n"
   19301                 :     "const char*\n"
   19302                 :     "OGR_F_GetFieldAsString(OGRFeatureH hFeat, int iField)\n"
   19303                 :     "\n"
   19304                 :     "Fetch field value as a string.\n"
   19305                 :     "\n"
   19306                 :     "OFTReal and OFTInteger fields will be translated to string using\n"
   19307                 :     "sprintf(), but not necessarily using the established formatting rules.\n"
   19308                 :     "Other field types, or errors will result in a return value of zero.\n"
   19309                 :     "\n"
   19310                 :     "This function is the same as the C++ method\n"
   19311                 :     "OGRFeature::GetFieldAsString().\n"
   19312                 :     "\n"
   19313                 :     "Parameters:\n"
   19314                 :     "-----------\n"
   19315                 :     "\n"
   19316                 :     "hFeat:  handle to the feature that owned the field.\n"
   19317                 :     "\n"
   19318                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   19319                 :     "\n"
   19320                 :     "the field value. This string is internal, and should not be modified,\n"
   19321                 :     "or freed. Its lifetime may be very brief. \n"
   19322                 :     ""},
   19323                 :    { (char *)"Feature_GetFieldAsInteger", _wrap_Feature_GetFieldAsInteger, METH_VARARGS, (char *)"\n"
   19324                 :     "GetFieldAsInteger(int id) -> int\n"
   19325                 :     "Feature_GetFieldAsInteger(Feature self, char name) -> int\n"
   19326                 :     "\n"
   19327                 :     "int\n"
   19328                 :     "OGR_F_GetFieldAsInteger(OGRFeatureH hFeat, int iField)\n"
   19329                 :     "\n"
   19330                 :     "Fetch field value as integer.\n"
   19331                 :     "\n"
   19332                 :     "OFTString features will be translated using atoi(). OFTReal fields\n"
   19333                 :     "will be cast to integer. Other field types, or errors will result in a\n"
   19334                 :     "return value of zero.\n"
   19335                 :     "\n"
   19336                 :     "This function is the same as the C++ method\n"
   19337                 :     "OGRFeature::GetFieldAsInteger().\n"
   19338                 :     "\n"
   19339                 :     "Parameters:\n"
   19340                 :     "-----------\n"
   19341                 :     "\n"
   19342                 :     "hFeat:  handle to the feature that owned the field.\n"
   19343                 :     "\n"
   19344                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   19345                 :     "\n"
   19346                 :     "the field value. \n"
   19347                 :     ""},
   19348                 :    { (char *)"Feature_GetFieldAsDouble", _wrap_Feature_GetFieldAsDouble, METH_VARARGS, (char *)"\n"
   19349                 :     "GetFieldAsDouble(int id) -> double\n"
   19350                 :     "Feature_GetFieldAsDouble(Feature self, char name) -> double\n"
   19351                 :     "\n"
   19352                 :     "double\n"
   19353                 :     "OGR_F_GetFieldAsDouble(OGRFeatureH hFeat, int iField)\n"
   19354                 :     "\n"
   19355                 :     "Fetch field value as a double.\n"
   19356                 :     "\n"
   19357                 :     "OFTString features will be translated using atof(). OFTInteger fields\n"
   19358                 :     "will be cast to double. Other field types, or errors will result in a\n"
   19359                 :     "return value of zero.\n"
   19360                 :     "\n"
   19361                 :     "This function is the same as the C++ method\n"
   19362                 :     "OGRFeature::GetFieldAsDouble().\n"
   19363                 :     "\n"
   19364                 :     "Parameters:\n"
   19365                 :     "-----------\n"
   19366                 :     "\n"
   19367                 :     "hFeat:  handle to the feature that owned the field.\n"
   19368                 :     "\n"
   19369                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   19370                 :     "\n"
   19371                 :     "the field value. \n"
   19372                 :     ""},
   19373                 :    { (char *)"Feature_GetFieldAsDateTime", _wrap_Feature_GetFieldAsDateTime, METH_VARARGS, (char *)"\n"
   19374                 :     "Feature_GetFieldAsDateTime(Feature self, int id)\n"
   19375                 :     "\n"
   19376                 :     "int\n"
   19377                 :     "OGR_F_GetFieldAsDateTime(OGRFeatureH hFeat, int iField, int *pnYear,\n"
   19378                 :     "int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, int *pnSecond,\n"
   19379                 :     "int *pnTZFlag)\n"
   19380                 :     "\n"
   19381                 :     "Fetch field value as date and time.\n"
   19382                 :     "\n"
   19383                 :     "Currently this method only works for OFTDate, OFTTime and OFTDateTime\n"
   19384                 :     "fields.\n"
   19385                 :     "\n"
   19386                 :     "This function is the same as the C++ method\n"
   19387                 :     "OGRFeature::GetFieldAsDateTime().\n"
   19388                 :     "\n"
   19389                 :     "Parameters:\n"
   19390                 :     "-----------\n"
   19391                 :     "\n"
   19392                 :     "hFeat:  handle to the feature that owned the field.\n"
   19393                 :     "\n"
   19394                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   19395                 :     "\n"
   19396                 :     "pnYear:  (including century)\n"
   19397                 :     "\n"
   19398                 :     "pnMonth:  (1-12)\n"
   19399                 :     "\n"
   19400                 :     "pnDay:  (1-31)\n"
   19401                 :     "\n"
   19402                 :     "pnHour:  (0-23)\n"
   19403                 :     "\n"
   19404                 :     "pnMinute:  (0-59)\n"
   19405                 :     "\n"
   19406                 :     "pnSecond:  (0-59)\n"
   19407                 :     "\n"
   19408                 :     "pnTZFlag:  (0=unknown, 1=localtime, 100=GMT, see data model for\n"
   19409                 :     "details)\n"
   19410                 :     "\n"
   19411                 :     "TRUE on success or FALSE on failure. \n"
   19412                 :     ""},
   19413                 :    { (char *)"Feature_GetFieldAsIntegerList", _wrap_Feature_GetFieldAsIntegerList, METH_VARARGS, (char *)"\n"
   19414                 :     "Feature_GetFieldAsIntegerList(Feature self, int id)\n"
   19415                 :     "\n"
   19416                 :     "const int*\n"
   19417                 :     "OGR_F_GetFieldAsIntegerList(OGRFeatureH hFeat, int iField, int\n"
   19418                 :     "*pnCount)\n"
   19419                 :     "\n"
   19420                 :     "Fetch field value as a list of integers.\n"
   19421                 :     "\n"
   19422                 :     "Currently this function only works for OFTIntegerList fields.\n"
   19423                 :     "\n"
   19424                 :     "This function is the same as the C++ method\n"
   19425                 :     "OGRFeature::GetFieldAsIntegerList().\n"
   19426                 :     "\n"
   19427                 :     "Parameters:\n"
   19428                 :     "-----------\n"
   19429                 :     "\n"
   19430                 :     "hFeat:  handle to the feature that owned the field.\n"
   19431                 :     "\n"
   19432                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   19433                 :     "\n"
   19434                 :     "pnCount:  an integer to put the list count (number of integers) into.\n"
   19435                 :     "\n"
   19436                 :     "the field value. This list is internal, and should not be modified, or\n"
   19437                 :     "freed. Its lifetime may be very brief. If *pnCount is zero on return\n"
   19438                 :     "the returned pointer may be NULL or non-NULL. \n"
   19439                 :     ""},
   19440                 :    { (char *)"Feature_GetFieldAsDoubleList", _wrap_Feature_GetFieldAsDoubleList, METH_VARARGS, (char *)"\n"
   19441                 :     "Feature_GetFieldAsDoubleList(Feature self, int id)\n"
   19442                 :     "\n"
   19443                 :     "const double*\n"
   19444                 :     "OGR_F_GetFieldAsDoubleList(OGRFeatureH hFeat, int iField, int\n"
   19445                 :     "*pnCount)\n"
   19446                 :     "\n"
   19447                 :     "Fetch field value as a list of doubles.\n"
   19448                 :     "\n"
   19449                 :     "Currently this function only works for OFTRealList fields.\n"
   19450                 :     "\n"
   19451                 :     "This function is the same as the C++ method\n"
   19452                 :     "OGRFeature::GetFieldAsDoubleList().\n"
   19453                 :     "\n"
   19454                 :     "Parameters:\n"
   19455                 :     "-----------\n"
   19456                 :     "\n"
   19457                 :     "hFeat:  handle to the feature that owned the field.\n"
   19458                 :     "\n"
   19459                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   19460                 :     "\n"
   19461                 :     "pnCount:  an integer to put the list count (number of doubles) into.\n"
   19462                 :     "\n"
   19463                 :     "the field value. This list is internal, and should not be modified, or\n"
   19464                 :     "freed. Its lifetime may be very brief. If *pnCount is zero on return\n"
   19465                 :     "the returned pointer may be NULL or non-NULL. \n"
   19466                 :     ""},
   19467                 :    { (char *)"Feature_GetFieldAsStringList", _wrap_Feature_GetFieldAsStringList, METH_VARARGS, (char *)"\n"
   19468                 :     "Feature_GetFieldAsStringList(Feature self, int id) -> char\n"
   19469                 :     "\n"
   19470                 :     "char**\n"
   19471                 :     "OGR_F_GetFieldAsStringList(OGRFeatureH hFeat, int iField)\n"
   19472                 :     "\n"
   19473                 :     "Fetch field value as a list of strings.\n"
   19474                 :     "\n"
   19475                 :     "Currently this method only works for OFTStringList fields.\n"
   19476                 :     "\n"
   19477                 :     "The returned list is terminated by a NULL pointer. The number of\n"
   19478                 :     "elements can also be calculated using CSLCount().\n"
   19479                 :     "\n"
   19480                 :     "This function is the same as the C++ method\n"
   19481                 :     "OGRFeature::GetFieldAsStringList().\n"
   19482                 :     "\n"
   19483                 :     "Parameters:\n"
   19484                 :     "-----------\n"
   19485                 :     "\n"
   19486                 :     "hFeat:  handle to the feature that owned the field.\n"
   19487                 :     "\n"
   19488                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   19489                 :     "\n"
   19490                 :     "the field value. This list is internal, and should not be modified, or\n"
   19491                 :     "freed. Its lifetime may be very brief. \n"
   19492                 :     ""},
   19493                 :    { (char *)"Feature_IsFieldSet", _wrap_Feature_IsFieldSet, METH_VARARGS, (char *)"\n"
   19494                 :     "IsFieldSet(int id) -> bool\n"
   19495                 :     "Feature_IsFieldSet(Feature self, char name) -> bool\n"
   19496                 :     "\n"
   19497                 :     "int OGR_F_IsFieldSet(OGRFeatureH\n"
   19498                 :     "hFeat, int iField)\n"
   19499                 :     "\n"
   19500                 :     "Test if a field has ever been assigned a value or not.\n"
   19501                 :     "\n"
   19502                 :     "This function is the same as the C++ method OGRFeature::IsFieldSet().\n"
   19503                 :     "\n"
   19504                 :     "Parameters:\n"
   19505                 :     "-----------\n"
   19506                 :     "\n"
   19507                 :     "hFeat:  handle to the feature on which the field is.\n"
   19508                 :     "\n"
   19509                 :     "iField:  the field to test.\n"
   19510                 :     "\n"
   19511                 :     "TRUE if the field has been set, otherwise false. \n"
   19512                 :     ""},
   19513                 :    { (char *)"Feature_GetFieldIndex", _wrap_Feature_GetFieldIndex, METH_VARARGS, (char *)"\n"
   19514                 :     "Feature_GetFieldIndex(Feature self, char name) -> int\n"
   19515                 :     "\n"
   19516                 :     "int\n"
   19517                 :     "OGR_F_GetFieldIndex(OGRFeatureH hFeat, const char *pszName)\n"
   19518                 :     "\n"
   19519                 :     "Fetch the field index given field name.\n"
   19520                 :     "\n"
   19521                 :     "This is a cover for the OGRFeatureDefn::GetFieldIndex() method.\n"
   19522                 :     "\n"
   19523                 :     "This function is the same as the C++ method\n"
   19524                 :     "OGRFeature::GetFieldIndex().\n"
   19525                 :     "\n"
   19526                 :     "Parameters:\n"
   19527                 :     "-----------\n"
   19528                 :     "\n"
   19529                 :     "hFeat:  handle to the feature on which the field is found.\n"
   19530                 :     "\n"
   19531                 :     "pszName:  the name of the field to search for.\n"
   19532                 :     "\n"
   19533                 :     "the field index, or -1 if no matching field is found. \n"
   19534                 :     ""},
   19535                 :    { (char *)"Feature_GetFID", _wrap_Feature_GetFID, METH_VARARGS, (char *)"\n"
   19536                 :     "Feature_GetFID(Feature self) -> int\n"
   19537                 :     "\n"
   19538                 :     "long OGR_F_GetFID(OGRFeatureH hFeat)\n"
   19539                 :     "\n"
   19540                 :     "Get feature identifier.\n"
   19541                 :     "\n"
   19542                 :     "This function is the same as the C++ method OGRFeature::GetFID().\n"
   19543                 :     "\n"
   19544                 :     "Parameters:\n"
   19545                 :     "-----------\n"
   19546                 :     "\n"
   19547                 :     "hFeat:  handle to the feature from which to get the feature\n"
   19548                 :     "identifier.\n"
   19549                 :     "\n"
   19550                 :     "feature id or OGRNullFID if none has been assigned. \n"
   19551                 :     ""},
   19552                 :    { (char *)"Feature_SetFID", _wrap_Feature_SetFID, METH_VARARGS, (char *)"\n"
   19553                 :     "Feature_SetFID(Feature self, int fid) -> OGRErr\n"
   19554                 :     "\n"
   19555                 :     "OGRErr OGR_F_SetFID(OGRFeatureH hFeat,\n"
   19556                 :     "long nFID)\n"
   19557                 :     "\n"
   19558                 :     "Set the feature identifier.\n"
   19559                 :     "\n"
   19560                 :     "For specific types of features this operation may fail on illegal\n"
   19561                 :     "features ids. Generally it always succeeds. Feature ids should be\n"
   19562                 :     "greater than or equal to zero, with the exception of OGRNullFID (-1)\n"
   19563                 :     "indicating that the feature id is unknown.\n"
   19564                 :     "\n"
   19565                 :     "This function is the same as the C++ method OGRFeature::SetFID().\n"
   19566                 :     "\n"
   19567                 :     "Parameters:\n"
   19568                 :     "-----------\n"
   19569                 :     "\n"
   19570                 :     "hFeat:  handle to the feature to set the feature id to.\n"
   19571                 :     "\n"
   19572                 :     "nFID:  the new feature identifier value to assign.\n"
   19573                 :     "\n"
   19574                 :     "On success OGRERR_NONE, or on failure some other value. \n"
   19575                 :     ""},
   19576                 :    { (char *)"Feature_DumpReadable", _wrap_Feature_DumpReadable, METH_VARARGS, (char *)"\n"
   19577                 :     "Feature_DumpReadable(Feature self)\n"
   19578                 :     "\n"
   19579                 :     "void\n"
   19580                 :     "OGR_F_DumpReadable(OGRFeatureH hFeat, FILE *fpOut)\n"
   19581                 :     "\n"
   19582                 :     "Dump this feature in a human readable form.\n"
   19583                 :     "\n"
   19584                 :     "This dumps the attributes, and geometry; however, it doesn't\n"
   19585                 :     "definition information (other than field types and names), nor does it\n"
   19586                 :     "report the geometry spatial reference system.\n"
   19587                 :     "\n"
   19588                 :     "This function is the same as the C++ method\n"
   19589                 :     "OGRFeature::DumpReadable().\n"
   19590                 :     "\n"
   19591                 :     "Parameters:\n"
   19592                 :     "-----------\n"
   19593                 :     "\n"
   19594                 :     "hFeat:  handle to the feature to dump.\n"
   19595                 :     "\n"
   19596                 :     "fpOut:  the stream to write to, such as strout. \n"
   19597                 :     ""},
   19598                 :    { (char *)"Feature_UnsetField", _wrap_Feature_UnsetField, METH_VARARGS, (char *)"\n"
   19599                 :     "UnsetField(int id)\n"
   19600                 :     "Feature_UnsetField(Feature self, char name)\n"
   19601                 :     "\n"
   19602                 :     "void OGR_F_UnsetField(OGRFeatureH\n"
   19603                 :     "hFeat, int iField)\n"
   19604                 :     "\n"
   19605                 :     "Clear a field, marking it as unset.\n"
   19606                 :     "\n"
   19607                 :     "This function is the same as the C++ method OGRFeature::UnsetField().\n"
   19608                 :     "\n"
   19609                 :     "Parameters:\n"
   19610                 :     "-----------\n"
   19611                 :     "\n"
   19612                 :     "hFeat:  handle to the feature on which the field is.\n"
   19613                 :     "\n"
   19614                 :     "iField:  the field to unset. \n"
   19615                 :     ""},
   19616                 :    { (char *)"Feature_SetField", _wrap_Feature_SetField, METH_VARARGS, (char *)"\n"
   19617                 :     "SetField(int id, char value)\n"
   19618                 :     "SetField(char name, char value)\n"
   19619                 :     "SetField(int id, int value)\n"
   19620                 :     "SetField(char name, int value)\n"
   19621                 :     "SetField(int id, double value)\n"
   19622                 :     "SetField(char name, double value)\n"
   19623                 :     "SetField(int id, int year, int month, int day, int hour, int minute, \n"
   19624                 :     "    int second, int tzflag)\n"
   19625                 :     "Feature_SetField(Feature self, char name, int year, int month, int day, \n"
   19626                 :     "    int hour, int minute, int second, int tzflag)\n"
   19627                 :     ""},
   19628                 :    { (char *)"Feature_SetFieldIntegerList", _wrap_Feature_SetFieldIntegerList, METH_VARARGS, (char *)"\n"
   19629                 :     "Feature_SetFieldIntegerList(Feature self, int id, int nList)\n"
   19630                 :     "\n"
   19631                 :     "void\n"
   19632                 :     "OGR_F_SetFieldIntegerList(OGRFeatureH hFeat, int iField, int nCount,\n"
   19633                 :     "int *panValues)\n"
   19634                 :     "\n"
   19635                 :     "Set field to list of integers value.\n"
   19636                 :     "\n"
   19637                 :     "This function currently on has an effect of OFTIntegerList fields.\n"
   19638                 :     "\n"
   19639                 :     "This function is the same as the C++ method OGRFeature::SetField().\n"
   19640                 :     "\n"
   19641                 :     "Parameters:\n"
   19642                 :     "-----------\n"
   19643                 :     "\n"
   19644                 :     "hFeat:  handle to the feature that owned the field.\n"
   19645                 :     "\n"
   19646                 :     "iField:  the field to set, from 0 to GetFieldCount()-1.\n"
   19647                 :     "\n"
   19648                 :     "nCount:  the number of values in the list being assigned.\n"
   19649                 :     "\n"
   19650                 :     "panValues:  the values to assign. \n"
   19651                 :     ""},
   19652                 :    { (char *)"Feature_SetFieldDoubleList", _wrap_Feature_SetFieldDoubleList, METH_VARARGS, (char *)"\n"
   19653                 :     "Feature_SetFieldDoubleList(Feature self, int id, int nList)\n"
   19654                 :     "\n"
   19655                 :     "void\n"
   19656                 :     "OGR_F_SetFieldDoubleList(OGRFeatureH hFeat, int iField, int nCount,\n"
   19657                 :     "double *padfValues)\n"
   19658                 :     "\n"
   19659                 :     "Set field to list of doubles value.\n"
   19660                 :     "\n"
   19661                 :     "This function currently on has an effect of OFTRealList fields.\n"
   19662                 :     "\n"
   19663                 :     "This function is the same as the C++ method OGRFeature::SetField().\n"
   19664                 :     "\n"
   19665                 :     "Parameters:\n"
   19666                 :     "-----------\n"
   19667                 :     "\n"
   19668                 :     "hFeat:  handle to the feature that owned the field.\n"
   19669                 :     "\n"
   19670                 :     "iField:  the field to set, from 0 to GetFieldCount()-1.\n"
   19671                 :     "\n"
   19672                 :     "nCount:  the number of values in the list being assigned.\n"
   19673                 :     "\n"
   19674                 :     "padfValues:  the values to assign. \n"
   19675                 :     ""},
   19676                 :    { (char *)"Feature_SetFieldStringList", _wrap_Feature_SetFieldStringList, METH_VARARGS, (char *)"\n"
   19677                 :     "Feature_SetFieldStringList(Feature self, int id, char pList)\n"
   19678                 :     "\n"
   19679                 :     "void\n"
   19680                 :     "OGR_F_SetFieldStringList(OGRFeatureH hFeat, int iField, char\n"
   19681                 :     "**papszValues)\n"
   19682                 :     "\n"
   19683                 :     "Set field to list of strings value.\n"
   19684                 :     "\n"
   19685                 :     "This function currently on has an effect of OFTStringList fields.\n"
   19686                 :     "\n"
   19687                 :     "This function is the same as the C++ method OGRFeature::SetField().\n"
   19688                 :     "\n"
   19689                 :     "Parameters:\n"
   19690                 :     "-----------\n"
   19691                 :     "\n"
   19692                 :     "hFeat:  handle to the feature that owned the field.\n"
   19693                 :     "\n"
   19694                 :     "iField:  the field to set, from 0 to GetFieldCount()-1.\n"
   19695                 :     "\n"
   19696                 :     "papszValues:  the values to assign. \n"
   19697                 :     ""},
   19698                 :    { (char *)"Feature_SetFrom", (PyCFunction) _wrap_Feature_SetFrom, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   19699                 :     "Feature_SetFrom(Feature self, Feature other, int forgiving = 1) -> OGRErr\n"
   19700                 :     "\n"
   19701                 :     "OGRErr OGR_F_SetFrom(OGRFeatureH\n"
   19702                 :     "hFeat, OGRFeatureH hOtherFeat, int bForgiving)\n"
   19703                 :     "\n"
   19704                 :     "Set one feature from another.\n"
   19705                 :     "\n"
   19706                 :     "Overwrite the contents of this feature from the geometry and\n"
   19707                 :     "attributes of another. The hOtherFeature does not need to have the\n"
   19708                 :     "same OGRFeatureDefn. Field values are copied by corresponding field\n"
   19709                 :     "names. Field types do not have to exactly match. OGR_F_SetField*()\n"
   19710                 :     "function conversion rules will be applied as needed.\n"
   19711                 :     "\n"
   19712                 :     "This function is the same as the C++ method OGRFeature::SetFrom().\n"
   19713                 :     "\n"
   19714                 :     "Parameters:\n"
   19715                 :     "-----------\n"
   19716                 :     "\n"
   19717                 :     "hFeat:  handle to the feature to set to.\n"
   19718                 :     "\n"
   19719                 :     "hOtherFeat:  handle to the feature from which geometry, and field\n"
   19720                 :     "values will be copied.\n"
   19721                 :     "\n"
   19722                 :     "bForgiving:  TRUE if the operation should continue despite lacking\n"
   19723                 :     "output fields matching some of the source fields.\n"
   19724                 :     "\n"
   19725                 :     "OGRERR_NONE if the operation succeeds, even if some values are not\n"
   19726                 :     "transferred, otherwise an error code. \n"
   19727                 :     ""},
   19728                 :    { (char *)"Feature_SetFromWithMap", _wrap_Feature_SetFromWithMap, METH_VARARGS, (char *)"\n"
   19729                 :     "Feature_SetFromWithMap(Feature self, Feature other, int forgiving, int nList) -> OGRErr\n"
   19730                 :     "\n"
   19731                 :     "OGRErr\n"
   19732                 :     "OGR_F_SetFromWithMap(OGRFeatureH hFeat, OGRFeatureH hOtherFeat, int\n"
   19733                 :     "bForgiving, int *panMap)\n"
   19734                 :     "\n"
   19735                 :     "Set one feature from another.\n"
   19736                 :     "\n"
   19737                 :     "Overwrite the contents of this feature from the geometry and\n"
   19738                 :     "attributes of another. The hOtherFeature does not need to have the\n"
   19739                 :     "same OGRFeatureDefn. Field values are copied according to the provided\n"
   19740                 :     "indices map. Field types do not have to exactly match.\n"
   19741                 :     "OGR_F_SetField*() function conversion rules will be applied as needed.\n"
   19742                 :     "This is more efficient than OGR_F_SetFrom() in that this doesn't\n"
   19743                 :     "lookup the fields by their names. Particularly useful when the field\n"
   19744                 :     "names don't match.\n"
   19745                 :     "\n"
   19746                 :     "This function is the same as the C++ method OGRFeature::SetFrom().\n"
   19747                 :     "\n"
   19748                 :     "Parameters:\n"
   19749                 :     "-----------\n"
   19750                 :     "\n"
   19751                 :     "hFeat:  handle to the feature to set to.\n"
   19752                 :     "\n"
   19753                 :     "hOtherFeat:  handle to the feature from which geometry, and field\n"
   19754                 :     "values will be copied.\n"
   19755                 :     "\n"
   19756                 :     "panMap:  Array of the indices of the destination feature's fields\n"
   19757                 :     "stored at the corresponding index of the source feature's fields. A\n"
   19758                 :     "value of -1 should be used to ignore the source's field. The array\n"
   19759                 :     "should not be NULL and be as long as the number of fields in the\n"
   19760                 :     "source feature.\n"
   19761                 :     "\n"
   19762                 :     "bForgiving:  TRUE if the operation should continue despite lacking\n"
   19763                 :     "output fields matching some of the source fields.\n"
   19764                 :     "\n"
   19765                 :     "OGRERR_NONE if the operation succeeds, even if some values are not\n"
   19766                 :     "transferred, otherwise an error code. \n"
   19767                 :     ""},
   19768                 :    { (char *)"Feature_GetStyleString", _wrap_Feature_GetStyleString, METH_VARARGS, (char *)"\n"
   19769                 :     "Feature_GetStyleString(Feature self) -> char\n"
   19770                 :     "\n"
   19771                 :     "const char*\n"
   19772                 :     "OGR_F_GetStyleString(OGRFeatureH hFeat)\n"
   19773                 :     "\n"
   19774                 :     "Fetch style string for this feature.\n"
   19775                 :     "\n"
   19776                 :     "Set the OGR Feature Style Specification for details on the format of\n"
   19777                 :     "this string, and ogr_featurestyle.h for services available to parse\n"
   19778                 :     "it.\n"
   19779                 :     "\n"
   19780                 :     "This function is the same as the C++ method\n"
   19781                 :     "OGRFeature::GetStyleString().\n"
   19782                 :     "\n"
   19783                 :     "Parameters:\n"
   19784                 :     "-----------\n"
   19785                 :     "\n"
   19786                 :     "hFeat:  handle to the feature to get the style from.\n"
   19787                 :     "\n"
   19788                 :     "a reference to a representation in string format, or NULL if there\n"
   19789                 :     "isn't one. \n"
   19790                 :     ""},
   19791                 :    { (char *)"Feature_SetStyleString", _wrap_Feature_SetStyleString, METH_VARARGS, (char *)"\n"
   19792                 :     "Feature_SetStyleString(Feature self, char the_string)\n"
   19793                 :     "\n"
   19794                 :     "void\n"
   19795                 :     "OGR_F_SetStyleString(OGRFeatureH hFeat, const char *pszStyle)\n"
   19796                 :     "\n"
   19797                 :     "Set feature style string. This method operate exactly as\n"
   19798                 :     "OGR_F_SetStyleStringDirectly() except that it does not assume\n"
   19799                 :     "ownership of the passed string, but instead makes a copy of it.\n"
   19800                 :     "\n"
   19801                 :     "This function is the same as the C++ method\n"
   19802                 :     "OGRFeature::SetStyleString().\n"
   19803                 :     "\n"
   19804                 :     "Parameters:\n"
   19805                 :     "-----------\n"
   19806                 :     "\n"
   19807                 :     "hFeat:  handle to the feature to set style to.\n"
   19808                 :     "\n"
   19809                 :     "pszStyle:  the style string to apply to this feature, cannot be NULL.\n"
   19810                 :     "\n"
   19811                 :     ""},
   19812                 :    { (char *)"Feature_GetFieldType", _wrap_Feature_GetFieldType, METH_VARARGS, (char *)"\n"
   19813                 :     "GetFieldType(int id) -> OGRFieldType\n"
   19814                 :     "Feature_GetFieldType(Feature self, char name) -> OGRFieldType\n"
   19815                 :     ""},
   19816                 :    { (char *)"Feature_swigregister", Feature_swigregister, METH_VARARGS, NULL},
   19817                 :    { (char *)"delete_FeatureDefn", _wrap_delete_FeatureDefn, METH_VARARGS, (char *)"delete_FeatureDefn(FeatureDefn self)"},
   19818                 :    { (char *)"new_FeatureDefn", (PyCFunction) _wrap_new_FeatureDefn, METH_VARARGS | METH_KEYWORDS, (char *)"new_FeatureDefn(char name_null_ok = None) -> FeatureDefn"},
   19819                 :    { (char *)"FeatureDefn_GetName", _wrap_FeatureDefn_GetName, METH_VARARGS, (char *)"\n"
   19820                 :     "FeatureDefn_GetName(FeatureDefn self) -> char\n"
   19821                 :     "\n"
   19822                 :     "const char*\n"
   19823                 :     "OGR_FD_GetName(OGRFeatureDefnH hDefn)\n"
   19824                 :     "\n"
   19825                 :     "Get name of the OGRFeatureDefn passed as an argument.\n"
   19826                 :     "\n"
   19827                 :     "This function is the same as the C++ method OGRFeatureDefn::GetName().\n"
   19828                 :     "\n"
   19829                 :     "Parameters:\n"
   19830                 :     "-----------\n"
   19831                 :     "\n"
   19832                 :     "hDefn:  handle to the feature definition to get the name from.\n"
   19833                 :     "\n"
   19834                 :     "the name. This name is internal and should not be modified, or freed.\n"
   19835                 :     "\n"
   19836                 :     ""},
   19837                 :    { (char *)"FeatureDefn_GetFieldCount", _wrap_FeatureDefn_GetFieldCount, METH_VARARGS, (char *)"\n"
   19838                 :     "FeatureDefn_GetFieldCount(FeatureDefn self) -> int\n"
   19839                 :     "\n"
   19840                 :     "int\n"
   19841                 :     "OGR_FD_GetFieldCount(OGRFeatureDefnH hDefn)\n"
   19842                 :     "\n"
   19843                 :     "Fetch number of fields on the passed feature definition.\n"
   19844                 :     "\n"
   19845                 :     "This function is the same as the C++ OGRFeatureDefn::GetFieldCount().\n"
   19846                 :     "\n"
   19847                 :     "Parameters:\n"
   19848                 :     "-----------\n"
   19849                 :     "\n"
   19850                 :     "hDefn:  handle to the feature definition to get the fields count from.\n"
   19851                 :     "\n"
   19852                 :     "count of fields. \n"
   19853                 :     ""},
   19854                 :    { (char *)"FeatureDefn_GetFieldDefn", _wrap_FeatureDefn_GetFieldDefn, METH_VARARGS, (char *)"\n"
   19855                 :     "FeatureDefn_GetFieldDefn(FeatureDefn self, int i) -> FieldDefn\n"
   19856                 :     "\n"
   19857                 :     "OGRFieldDefnH\n"
   19858                 :     "OGR_FD_GetFieldDefn(OGRFeatureDefnH hDefn, int iField)\n"
   19859                 :     "\n"
   19860                 :     "Fetch field definition of the passed feature definition.\n"
   19861                 :     "\n"
   19862                 :     "This function is the same as the C++ method\n"
   19863                 :     "OGRFeatureDefn::GetFieldDefn().\n"
   19864                 :     "\n"
   19865                 :     "Starting with GDAL 1.7.0, this method will also issue an error if the\n"
   19866                 :     "index is not valid.\n"
   19867                 :     "\n"
   19868                 :     "Parameters:\n"
   19869                 :     "-----------\n"
   19870                 :     "\n"
   19871                 :     "hDefn:  handle to the feature definition to get the field definition\n"
   19872                 :     "from.\n"
   19873                 :     "\n"
   19874                 :     "iField:  the field to fetch, between 0 and GetFieldCount()-1.\n"
   19875                 :     "\n"
   19876                 :     "an handle to an internal field definition object or NULL if invalid\n"
   19877                 :     "index. This object should not be modified or freed by the application.\n"
   19878                 :     "\n"
   19879                 :     ""},
   19880                 :    { (char *)"FeatureDefn_GetFieldIndex", _wrap_FeatureDefn_GetFieldIndex, METH_VARARGS, (char *)"\n"
   19881                 :     "FeatureDefn_GetFieldIndex(FeatureDefn self, char name) -> int\n"
   19882                 :     "\n"
   19883                 :     "int\n"
   19884                 :     "OGR_FD_GetFieldIndex(OGRFeatureDefnH hDefn, const char *pszFieldName)\n"
   19885                 :     "\n"
   19886                 :     "Find field by name.\n"
   19887                 :     "\n"
   19888                 :     "The field index of the first field matching the passed field name\n"
   19889                 :     "(case insensitively) is returned.\n"
   19890                 :     "\n"
   19891                 :     "This function is the same as the C++ method\n"
   19892                 :     "OGRFeatureDefn::GetFieldIndex.\n"
   19893                 :     "\n"
   19894                 :     "Parameters:\n"
   19895                 :     "-----------\n"
   19896                 :     "\n"
   19897                 :     "hDefn:  handle to the feature definition to get field index from.\n"
   19898                 :     "\n"
   19899                 :     "pszFieldName:  the field name to search for.\n"
   19900                 :     "\n"
   19901                 :     "the field index, or -1 if no match found. \n"
   19902                 :     ""},
   19903                 :    { (char *)"FeatureDefn_AddFieldDefn", _wrap_FeatureDefn_AddFieldDefn, METH_VARARGS, (char *)"\n"
   19904                 :     "FeatureDefn_AddFieldDefn(FeatureDefn self, FieldDefn defn)\n"
   19905                 :     "\n"
   19906                 :     "void\n"
   19907                 :     "OGR_FD_AddFieldDefn(OGRFeatureDefnH hDefn, OGRFieldDefnH hNewField)\n"
   19908                 :     "\n"
   19909                 :     "Add a new field definition to the passed feature definition.\n"
   19910                 :     "\n"
   19911                 :     "To add a new field definition to a layer definition, do not use this\n"
   19912                 :     "function directly, but use OGR_L_CreateField() instead.\n"
   19913                 :     "\n"
   19914                 :     "This function should only be called while there are no OGRFeature\n"
   19915                 :     "objects in existance based on this OGRFeatureDefn. The OGRFieldDefn\n"
   19916                 :     "passed in is copied, and remains the responsibility of the caller.\n"
   19917                 :     "\n"
   19918                 :     "This function is the same as the C++ method\n"
   19919                 :     "OGRFeatureDefn::AddFieldDefn().\n"
   19920                 :     "\n"
   19921                 :     "Parameters:\n"
   19922                 :     "-----------\n"
   19923                 :     "\n"
   19924                 :     "hDefn:  handle to the feature definition to add the field definition\n"
   19925                 :     "to.\n"
   19926                 :     "\n"
   19927                 :     "hNewField:  handle to the new field definition. \n"
   19928                 :     ""},
   19929                 :    { (char *)"FeatureDefn_GetGeomType", _wrap_FeatureDefn_GetGeomType, METH_VARARGS, (char *)"\n"
   19930                 :     "FeatureDefn_GetGeomType(FeatureDefn self) -> OGRwkbGeometryType\n"
   19931                 :     "\n"
   19932                 :     "OGRwkbGeometryType\n"
   19933                 :     "OGR_FD_GetGeomType(OGRFeatureDefnH hDefn)\n"
   19934                 :     "\n"
   19935                 :     "Fetch the geometry base type of the passed feature definition.\n"
   19936                 :     "\n"
   19937                 :     "This function is the same as the C++ method\n"
   19938                 :     "OGRFeatureDefn::GetGeomType().\n"
   19939                 :     "\n"
   19940                 :     "Parameters:\n"
   19941                 :     "-----------\n"
   19942                 :     "\n"
   19943                 :     "hDefn:  handle to the feature definition to get the geometry type\n"
   19944                 :     "from.\n"
   19945                 :     "\n"
   19946                 :     "the base type for all geometry related to this definition. \n"
   19947                 :     ""},
   19948                 :    { (char *)"FeatureDefn_SetGeomType", _wrap_FeatureDefn_SetGeomType, METH_VARARGS, (char *)"\n"
   19949                 :     "FeatureDefn_SetGeomType(FeatureDefn self, OGRwkbGeometryType geom_type)\n"
   19950                 :     "\n"
   19951                 :     "void\n"
   19952                 :     "OGR_FD_SetGeomType(OGRFeatureDefnH hDefn, OGRwkbGeometryType eType)\n"
   19953                 :     "\n"
   19954                 :     "Assign the base geometry type for the passed layer (the same as the\n"
   19955                 :     "feature definition).\n"
   19956                 :     "\n"
   19957                 :     "All geometry objects using this type must be of the defined type or a\n"
   19958                 :     "derived type. The default upon creation is wkbUnknown which allows for\n"
   19959                 :     "any geometry type. The geometry type should generally not be changed\n"
   19960                 :     "after any OGRFeatures have been created against this definition.\n"
   19961                 :     "\n"
   19962                 :     "This function is the same as the C++ method\n"
   19963                 :     "OGRFeatureDefn::SetGeomType().\n"
   19964                 :     "\n"
   19965                 :     "Parameters:\n"
   19966                 :     "-----------\n"
   19967                 :     "\n"
   19968                 :     "hDefn:  handle to the layer or feature definition to set the geometry\n"
   19969                 :     "type to.\n"
   19970                 :     "\n"
   19971                 :     "eType:  the new type to assign. \n"
   19972                 :     ""},
   19973                 :    { (char *)"FeatureDefn_GetReferenceCount", _wrap_FeatureDefn_GetReferenceCount, METH_VARARGS, (char *)"\n"
   19974                 :     "FeatureDefn_GetReferenceCount(FeatureDefn self) -> int\n"
   19975                 :     "\n"
   19976                 :     "int\n"
   19977                 :     "OGR_FD_GetReferenceCount(OGRFeatureDefnH hDefn)\n"
   19978                 :     "\n"
   19979                 :     "Fetch current reference count.\n"
   19980                 :     "\n"
   19981                 :     "This function is the same as the C++ method\n"
   19982                 :     "OGRFeatureDefn::GetReferenceCount().\n"
   19983                 :     "\n"
   19984                 :     "Parameters:\n"
   19985                 :     "-----------\n"
   19986                 :     "\n"
   19987                 :     "hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
   19988                 :     "on.\n"
   19989                 :     "\n"
   19990                 :     "the current reference count. \n"
   19991                 :     ""},
   19992                 :    { (char *)"FeatureDefn_IsGeometryIgnored", _wrap_FeatureDefn_IsGeometryIgnored, METH_VARARGS, (char *)"\n"
   19993                 :     "FeatureDefn_IsGeometryIgnored(FeatureDefn self) -> int\n"
   19994                 :     "\n"
   19995                 :     "int\n"
   19996                 :     "OGR_FD_IsGeometryIgnored(OGRFeatureDefnH hDefn)\n"
   19997                 :     "\n"
   19998                 :     "Determine whether the geometry can be omitted when fetching features.\n"
   19999                 :     "\n"
   20000                 :     "This function is the same as the C++ method\n"
   20001                 :     "OGRFeatureDefn::IsGeometryIgnored().\n"
   20002                 :     "\n"
   20003                 :     "Parameters:\n"
   20004                 :     "-----------\n"
   20005                 :     "\n"
   20006                 :     "hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
   20007                 :     "on.\n"
   20008                 :     "\n"
   20009                 :     "ignore state \n"
   20010                 :     ""},
   20011                 :    { (char *)"FeatureDefn_SetGeometryIgnored", _wrap_FeatureDefn_SetGeometryIgnored, METH_VARARGS, (char *)"\n"
   20012                 :     "FeatureDefn_SetGeometryIgnored(FeatureDefn self, int bIgnored)\n"
   20013                 :     "\n"
   20014                 :     "void\n"
   20015                 :     "OGR_FD_SetGeometryIgnored(OGRFeatureDefnH hDefn, int bIgnore)\n"
   20016                 :     "\n"
   20017                 :     "Set whether the geometry can be omitted when fetching features.\n"
   20018                 :     "\n"
   20019                 :     "This function is the same as the C++ method\n"
   20020                 :     "OGRFeatureDefn::SetGeometryIgnored().\n"
   20021                 :     "\n"
   20022                 :     "Parameters:\n"
   20023                 :     "-----------\n"
   20024                 :     "\n"
   20025                 :     "hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
   20026                 :     "on.\n"
   20027                 :     "\n"
   20028                 :     "bIgnore:  ignore state \n"
   20029                 :     ""},
   20030                 :    { (char *)"FeatureDefn_IsStyleIgnored", _wrap_FeatureDefn_IsStyleIgnored, METH_VARARGS, (char *)"\n"
   20031                 :     "FeatureDefn_IsStyleIgnored(FeatureDefn self) -> int\n"
   20032                 :     "\n"
   20033                 :     "int\n"
   20034                 :     "OGR_FD_IsStyleIgnored(OGRFeatureDefnH hDefn)\n"
   20035                 :     "\n"
   20036                 :     "Determine whether the style can be omitted when fetching features.\n"
   20037                 :     "\n"
   20038                 :     "This function is the same as the C++ method\n"
   20039                 :     "OGRFeatureDefn::IsStyleIgnored().\n"
   20040                 :     "\n"
   20041                 :     "Parameters:\n"
   20042                 :     "-----------\n"
   20043                 :     "\n"
   20044                 :     "hDefn:  handle to the feature definition on which OGRFeature are based\n"
   20045                 :     "on.\n"
   20046                 :     "\n"
   20047                 :     "ignore state \n"
   20048                 :     ""},
   20049                 :    { (char *)"FeatureDefn_SetStyleIgnored", _wrap_FeatureDefn_SetStyleIgnored, METH_VARARGS, (char *)"\n"
   20050                 :     "FeatureDefn_SetStyleIgnored(FeatureDefn self, int bIgnored)\n"
   20051                 :     "\n"
   20052                 :     "void\n"
   20053                 :     "OGR_FD_SetStyleIgnored(OGRFeatureDefnH hDefn, int bIgnore)\n"
   20054                 :     "\n"
   20055                 :     "Set whether the style can be omitted when fetching features.\n"
   20056                 :     "\n"
   20057                 :     "This function is the same as the C++ method\n"
   20058                 :     "OGRFeatureDefn::SetStyleIgnored().\n"
   20059                 :     "\n"
   20060                 :     "Parameters:\n"
   20061                 :     "-----------\n"
   20062                 :     "\n"
   20063                 :     "hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
   20064                 :     "on.\n"
   20065                 :     "\n"
   20066                 :     "bIgnore:  ignore state \n"
   20067                 :     ""},
   20068                 :    { (char *)"FeatureDefn_swigregister", FeatureDefn_swigregister, METH_VARARGS, NULL},
   20069                 :    { (char *)"delete_FieldDefn", _wrap_delete_FieldDefn, METH_VARARGS, (char *)"delete_FieldDefn(FieldDefn self)"},
   20070                 :    { (char *)"new_FieldDefn", (PyCFunction) _wrap_new_FieldDefn, METH_VARARGS | METH_KEYWORDS, (char *)"new_FieldDefn(char name_null_ok = \"unnamed\", OGRFieldType field_type = OFTString) -> FieldDefn"},
   20071                 :    { (char *)"FieldDefn_GetName", _wrap_FieldDefn_GetName, METH_VARARGS, (char *)"FieldDefn_GetName(FieldDefn self) -> char"},
   20072                 :    { (char *)"FieldDefn_GetNameRef", _wrap_FieldDefn_GetNameRef, METH_VARARGS, (char *)"\n"
   20073                 :     "FieldDefn_GetNameRef(FieldDefn self) -> char\n"
   20074                 :     "\n"
   20075                 :     "const char*\n"
   20076                 :     "OGR_Fld_GetNameRef(OGRFieldDefnH hDefn)\n"
   20077                 :     "\n"
   20078                 :     "Fetch name of this field.\n"
   20079                 :     "\n"
   20080                 :     "This function is the same as the CPP method\n"
   20081                 :     "OGRFieldDefn::GetNameRef().\n"
   20082                 :     "\n"
   20083                 :     "Parameters:\n"
   20084                 :     "-----------\n"
   20085                 :     "\n"
   20086                 :     "hDefn:  handle to the field definition.\n"
   20087                 :     "\n"
   20088                 :     "the name of the field definition. \n"
   20089                 :     ""},
   20090                 :    { (char *)"FieldDefn_SetName", _wrap_FieldDefn_SetName, METH_VARARGS, (char *)"\n"
   20091                 :     "FieldDefn_SetName(FieldDefn self, char name)\n"
   20092                 :     "\n"
   20093                 :     "void OGR_Fld_SetName(OGRFieldDefnH\n"
   20094                 :     "hDefn, const char *pszName)\n"
   20095                 :     "\n"
   20096                 :     "Reset the name of this field.\n"
   20097                 :     "\n"
   20098                 :     "This function is the same as the CPP method OGRFieldDefn::SetName().\n"
   20099                 :     "\n"
   20100                 :     "Parameters:\n"
   20101                 :     "-----------\n"
   20102                 :     "\n"
   20103                 :     "hDefn:  handle to the field definition to apply the new name to.\n"
   20104                 :     "\n"
   20105                 :     "pszName:  the new name to apply. \n"
   20106                 :     ""},
   20107                 :    { (char *)"FieldDefn_GetType", _wrap_FieldDefn_GetType, METH_VARARGS, (char *)"\n"
   20108                 :     "FieldDefn_GetType(FieldDefn self) -> OGRFieldType\n"
   20109                 :     "\n"
   20110                 :     "OGRFieldType\n"
   20111                 :     "OGR_Fld_GetType(OGRFieldDefnH hDefn)\n"
   20112                 :     "\n"
   20113                 :     "Fetch type of this field.\n"
   20114                 :     "\n"
   20115                 :     "This function is the same as the CPP method OGRFieldDefn::GetType().\n"
   20116                 :     "\n"
   20117                 :     "Parameters:\n"
   20118                 :     "-----------\n"
   20119                 :     "\n"
   20120                 :     "hDefn:  handle to the field definition to get type from.\n"
   20121                 :     "\n"
   20122                 :     "field type. \n"
   20123                 :     ""},
   20124                 :    { (char *)"FieldDefn_SetType", _wrap_FieldDefn_SetType, METH_VARARGS, (char *)"\n"
   20125                 :     "FieldDefn_SetType(FieldDefn self, OGRFieldType type)\n"
   20126                 :     "\n"
   20127                 :     "void OGR_Fld_SetType(OGRFieldDefnH\n"
   20128                 :     "hDefn, OGRFieldType eType)\n"
   20129                 :     "\n"
   20130                 :     "Set the type of this field. This should never be done to an\n"
   20131                 :     "OGRFieldDefn that is already part of an OGRFeatureDefn.\n"
   20132                 :     "\n"
   20133                 :     "This function is the same as the CPP method OGRFieldDefn::SetType().\n"
   20134                 :     "\n"
   20135                 :     "Parameters:\n"
   20136                 :     "-----------\n"
   20137                 :     "\n"
   20138                 :     "hDefn:  handle to the field definition to set type to.\n"
   20139                 :     "\n"
   20140                 :     "eType:  the new field type. \n"
   20141                 :     ""},
   20142                 :    { (char *)"FieldDefn_GetJustify", _wrap_FieldDefn_GetJustify, METH_VARARGS, (char *)"\n"
   20143                 :     "FieldDefn_GetJustify(FieldDefn self) -> OGRJustification\n"
   20144                 :     "\n"
   20145                 :     "OGRJustification\n"
   20146                 :     "OGR_Fld_GetJustify(OGRFieldDefnH hDefn)\n"
   20147                 :     "\n"
   20148                 :     "Get the justification for this field.\n"
   20149                 :     "\n"
   20150                 :     "This function is the same as the CPP method\n"
   20151                 :     "OGRFieldDefn::GetJustify().\n"
   20152                 :     "\n"
   20153                 :     "Parameters:\n"
   20154                 :     "-----------\n"
   20155                 :     "\n"
   20156                 :     "hDefn:  handle to the field definition to get justification from.\n"
   20157                 :     "\n"
   20158                 :     "the justification. \n"
   20159                 :     ""},
   20160                 :    { (char *)"FieldDefn_SetJustify", _wrap_FieldDefn_SetJustify, METH_VARARGS, (char *)"\n"
   20161                 :     "FieldDefn_SetJustify(FieldDefn self, OGRJustification justify)\n"
   20162                 :     "\n"
   20163                 :     "void\n"
   20164                 :     "OGR_Fld_SetJustify(OGRFieldDefnH hDefn, OGRJustification eJustify)\n"
   20165                 :     "\n"
   20166                 :     "Set the justification for this field.\n"
   20167                 :     "\n"
   20168                 :     "This function is the same as the CPP method\n"
   20169                 :     "OGRFieldDefn::SetJustify().\n"
   20170                 :     "\n"
   20171                 :     "Parameters:\n"
   20172                 :     "-----------\n"
   20173                 :     "\n"
   20174                 :     "hDefn:  handle to the field definition to set justification to.\n"
   20175                 :     "\n"
   20176                 :     "eJustify:  the new justification. \n"
   20177                 :     ""},
   20178                 :    { (char *)"FieldDefn_GetWidth", _wrap_FieldDefn_GetWidth, METH_VARARGS, (char *)"\n"
   20179                 :     "FieldDefn_GetWidth(FieldDefn self) -> int\n"
   20180                 :     "\n"
   20181                 :     "int OGR_Fld_GetWidth(OGRFieldDefnH\n"
   20182                 :     "hDefn)\n"
   20183                 :     "\n"
   20184                 :     "Get the formatting width for this field.\n"
   20185                 :     "\n"
   20186                 :     "This function is the same as the CPP method OGRFieldDefn::GetWidth().\n"
   20187                 :     "\n"
   20188                 :     "Parameters:\n"
   20189                 :     "-----------\n"
   20190                 :     "\n"
   20191                 :     "hDefn:  handle to the field definition to get width from.\n"
   20192                 :     "\n"
   20193                 :     "the width, zero means no specified width. \n"
   20194                 :     ""},
   20195                 :    { (char *)"FieldDefn_SetWidth", _wrap_FieldDefn_SetWidth, METH_VARARGS, (char *)"\n"
   20196                 :     "FieldDefn_SetWidth(FieldDefn self, int width)\n"
   20197                 :     "\n"
   20198                 :     "void OGR_Fld_SetWidth(OGRFieldDefnH\n"
   20199                 :     "hDefn, int nNewWidth)\n"
   20200                 :     "\n"
   20201                 :     "Set the formatting width for this field in characters.\n"
   20202                 :     "\n"
   20203                 :     "This function is the same as the CPP method OGRFieldDefn::SetWidth().\n"
   20204                 :     "\n"
   20205                 :     "Parameters:\n"
   20206                 :     "-----------\n"
   20207                 :     "\n"
   20208                 :     "hDefn:  handle to the field definition to set width to.\n"
   20209                 :     "\n"
   20210                 :     "nNewWidth:  the new width. \n"
   20211                 :     ""},
   20212                 :    { (char *)"FieldDefn_GetPrecision", _wrap_FieldDefn_GetPrecision, METH_VARARGS, (char *)"\n"
   20213                 :     "FieldDefn_GetPrecision(FieldDefn self) -> int\n"
   20214                 :     "\n"
   20215                 :     "int\n"
   20216                 :     "OGR_Fld_GetPrecision(OGRFieldDefnH hDefn)\n"
   20217                 :     "\n"
   20218                 :     "Get the formatting precision for this field. This should normally be\n"
   20219                 :     "zero for fields of types other than OFTReal.\n"
   20220                 :     "\n"
   20221                 :     "This function is the same as the CPP method\n"
   20222                 :     "OGRFieldDefn::GetPrecision().\n"
   20223                 :     "\n"
   20224                 :     "Parameters:\n"
   20225                 :     "-----------\n"
   20226                 :     "\n"
   20227                 :     "hDefn:  handle to the field definition to get precision from.\n"
   20228                 :     "\n"
   20229                 :     "the precision. \n"
   20230                 :     ""},
   20231                 :    { (char *)"FieldDefn_SetPrecision", _wrap_FieldDefn_SetPrecision, METH_VARARGS, (char *)"\n"
   20232                 :     "FieldDefn_SetPrecision(FieldDefn self, int precision)\n"
   20233                 :     "\n"
   20234                 :     "void\n"
   20235                 :     "OGR_Fld_SetPrecision(OGRFieldDefnH hDefn, int nPrecision)\n"
   20236                 :     "\n"
   20237                 :     "Set the formatting precision for this field in characters.\n"
   20238                 :     "\n"
   20239                 :     "This should normally be zero for fields of types other than OFTReal.\n"
   20240                 :     "\n"
   20241                 :     "This function is the same as the CPP method\n"
   20242                 :     "OGRFieldDefn::SetPrecision().\n"
   20243                 :     "\n"
   20244                 :     "Parameters:\n"
   20245                 :     "-----------\n"
   20246                 :     "\n"
   20247                 :     "hDefn:  handle to the field definition to set precision to.\n"
   20248                 :     "\n"
   20249                 :     "nPrecision:  the new precision. \n"
   20250                 :     ""},
   20251                 :    { (char *)"FieldDefn_GetTypeName", _wrap_FieldDefn_GetTypeName, METH_VARARGS, (char *)"FieldDefn_GetTypeName(FieldDefn self) -> char"},
   20252                 :    { (char *)"FieldDefn_GetFieldTypeName", _wrap_FieldDefn_GetFieldTypeName, METH_VARARGS, (char *)"FieldDefn_GetFieldTypeName(FieldDefn self, OGRFieldType type) -> char"},
   20253                 :    { (char *)"FieldDefn_IsIgnored", _wrap_FieldDefn_IsIgnored, METH_VARARGS, (char *)"\n"
   20254                 :     "FieldDefn_IsIgnored(FieldDefn self) -> int\n"
   20255                 :     "\n"
   20256                 :     "int OGR_Fld_IsIgnored(OGRFieldDefnH\n"
   20257                 :     "hDefn)\n"
   20258                 :     "\n"
   20259                 :     "Return whether this field should be omitted when fetching features.\n"
   20260                 :     "\n"
   20261                 :     "This method is the same as the C++ method OGRFieldDefn::IsIgnored().\n"
   20262                 :     "\n"
   20263                 :     "Parameters:\n"
   20264                 :     "-----------\n"
   20265                 :     "\n"
   20266                 :     "hDefn:  handle to the field definition\n"
   20267                 :     "\n"
   20268                 :     "ignore state \n"
   20269                 :     ""},
   20270                 :    { (char *)"FieldDefn_SetIgnored", _wrap_FieldDefn_SetIgnored, METH_VARARGS, (char *)"\n"
   20271                 :     "FieldDefn_SetIgnored(FieldDefn self, int bIgnored)\n"
   20272                 :     "\n"
   20273                 :     "void\n"
   20274                 :     "OGR_Fld_SetIgnored(OGRFieldDefnH hDefn, int ignore)\n"
   20275                 :     "\n"
   20276                 :     "Set whether this field should be omitted when fetching features.\n"
   20277                 :     "\n"
   20278                 :     "This method is the same as the C function OGRFieldDefn::SetIgnored().\n"
   20279                 :     "\n"
   20280                 :     "Parameters:\n"
   20281                 :     "-----------\n"
   20282                 :     "\n"
   20283                 :     "hDefn:  handle to the field definition\n"
   20284                 :     "\n"
   20285                 :     "ignore:  ignore state \n"
   20286                 :     ""},
   20287                 :    { (char *)"FieldDefn_swigregister", FieldDefn_swigregister, METH_VARARGS, NULL},
   20288                 :    { (char *)"CreateGeometryFromWkb", (PyCFunction) _wrap_CreateGeometryFromWkb, METH_VARARGS | METH_KEYWORDS, (char *)"CreateGeometryFromWkb(int len, SpatialReference reference = None) -> Geometry"},
   20289                 :    { (char *)"CreateGeometryFromWkt", (PyCFunction) _wrap_CreateGeometryFromWkt, METH_VARARGS | METH_KEYWORDS, (char *)"CreateGeometryFromWkt(char val, SpatialReference reference = None) -> Geometry"},
   20290                 :    { (char *)"CreateGeometryFromGML", _wrap_CreateGeometryFromGML, METH_VARARGS, (char *)"CreateGeometryFromGML(char input_string) -> Geometry"},
   20291                 :    { (char *)"CreateGeometryFromJson", _wrap_CreateGeometryFromJson, METH_VARARGS, (char *)"CreateGeometryFromJson(char input_string) -> Geometry"},
   20292                 :    { (char *)"BuildPolygonFromEdges", (PyCFunction) _wrap_BuildPolygonFromEdges, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   20293                 :     "BuildPolygonFromEdges(Geometry hLineCollection, int bBestEffort = 0, int bAutoClose = 0, \n"
   20294                 :     "    double dfTolerance = 0) -> Geometry\n"
   20295                 :     ""},
   20296                 :    { (char *)"ApproximateArcAngles", (PyCFunction) _wrap_ApproximateArcAngles, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   20297                 :     "ApproximateArcAngles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, \n"
   20298                 :     "    double dfSecondaryAxis, \n"
   20299                 :     "    double dfRotation, double dfStartAngle, double dfEndAngle, \n"
   20300                 :     "    double dfMaxAngleStepSizeDegrees) -> Geometry\n"
   20301                 :     ""},
   20302                 :    { (char *)"ForceToPolygon", _wrap_ForceToPolygon, METH_VARARGS, (char *)"ForceToPolygon(Geometry geom_in) -> Geometry"},
   20303                 :    { (char *)"ForceToLineString", _wrap_ForceToLineString, METH_VARARGS, (char *)"ForceToLineString(Geometry geom_in) -> Geometry"},
   20304                 :    { (char *)"ForceToMultiPolygon", _wrap_ForceToMultiPolygon, METH_VARARGS, (char *)"ForceToMultiPolygon(Geometry geom_in) -> Geometry"},
   20305                 :    { (char *)"ForceToMultiPoint", _wrap_ForceToMultiPoint, METH_VARARGS, (char *)"ForceToMultiPoint(Geometry geom_in) -> Geometry"},
   20306                 :    { (char *)"ForceToMultiLineString", _wrap_ForceToMultiLineString, METH_VARARGS, (char *)"ForceToMultiLineString(Geometry geom_in) -> Geometry"},
   20307                 :    { (char *)"delete_Geometry", _wrap_delete_Geometry, METH_VARARGS, (char *)"delete_Geometry(Geometry self)"},
   20308                 :    { (char *)"new_Geometry", (PyCFunction) _wrap_new_Geometry, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   20309                 :     "new_Geometry(OGRwkbGeometryType type = wkbUnknown, char wkt = None, \n"
   20310                 :     "    int wkb = 0, char gml = None) -> Geometry\n"
   20311                 :     ""},
   20312                 :    { (char *)"Geometry_ExportToWkt", _wrap_Geometry_ExportToWkt, METH_VARARGS, (char *)"\n"
   20313                 :     "Geometry_ExportToWkt(Geometry self) -> OGRErr\n"
   20314                 :     "\n"
   20315                 :     "OGRErr\n"
   20316                 :     "OGR_G_ExportToWkt(OGRGeometryH hGeom, char **ppszSrcText)\n"
   20317                 :     "\n"
   20318                 :     "Convert a geometry into well known text format.\n"
   20319                 :     "\n"
   20320                 :     "This function relates to the SFCOM IWks::ExportToWKT() method.\n"
   20321                 :     "\n"
   20322                 :     "This function is the same as the CPP method\n"
   20323                 :     "OGRGeometry::exportToWkt().\n"
   20324                 :     "\n"
   20325                 :     "Parameters:\n"
   20326                 :     "-----------\n"
   20327                 :     "\n"
   20328                 :     "hGeom:  handle on the geometry to convert to a text format from.\n"
   20329                 :     "\n"
   20330                 :     "ppszSrcText:  a text buffer is allocated by the program, and assigned\n"
   20331                 :     "to the passed pointer.\n"
   20332                 :     "\n"
   20333                 :     "Currently OGRERR_NONE is always returned. \n"
   20334                 :     ""},
   20335                 :    { (char *)"Geometry_ExportToWkb", (PyCFunction) _wrap_Geometry_ExportToWkb, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   20336                 :     "Geometry_ExportToWkb(Geometry self, OGRwkbByteOrder byte_order = wkbXDR) -> OGRErr\n"
   20337                 :     "\n"
   20338                 :     "OGRErr\n"
   20339                 :     "OGR_G_ExportToWkb(OGRGeometryH hGeom, OGRwkbByteOrder eOrder, unsigned\n"
   20340                 :     "char *pabyDstBuffer)\n"
   20341                 :     "\n"
   20342                 :     "Convert a geometry into well known binary format.\n"
   20343                 :     "\n"
   20344                 :     "This function relates to the SFCOM IWks::ExportToWKB() method.\n"
   20345                 :     "\n"
   20346                 :     "This function is the same as the CPP method\n"
   20347                 :     "OGRGeometry::exportToWkb().\n"
   20348                 :     "\n"
   20349                 :     "Parameters:\n"
   20350                 :     "-----------\n"
   20351                 :     "\n"
   20352                 :     "hGeom:  handle on the geometry to convert to a well know binary data\n"
   20353                 :     "from.\n"
   20354                 :     "\n"
   20355                 :     "eOrder:  One of wkbXDR or wkbNDR indicating MSB or LSB byte order\n"
   20356                 :     "respectively.\n"
   20357                 :     "\n"
   20358                 :     "pabyDstBuffer:  a buffer into which the binary representation is\n"
   20359                 :     "written. This buffer must be at least OGR_G_WkbSize() byte in size.\n"
   20360                 :     "\n"
   20361                 :     "Currently OGRERR_NONE is always returned. \n"
   20362                 :     ""},
   20363                 :    { (char *)"Geometry_ExportToGML", (PyCFunction) _wrap_Geometry_ExportToGML, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_ExportToGML(Geometry self, char options = None) -> retStringAndCPLFree"},
   20364                 :    { (char *)"Geometry_ExportToKML", _wrap_Geometry_ExportToKML, METH_VARARGS, (char *)"Geometry_ExportToKML(Geometry self, char altitude_mode = None) -> retStringAndCPLFree"},
   20365                 :    { (char *)"Geometry_ExportToJson", (PyCFunction) _wrap_Geometry_ExportToJson, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_ExportToJson(Geometry self, char options = None) -> retStringAndCPLFree"},
   20366                 :    { (char *)"Geometry_AddPoint", (PyCFunction) _wrap_Geometry_AddPoint, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_AddPoint(Geometry self, double x, double y, double z = 0)"},
   20367                 :    { (char *)"Geometry_AddPoint_2D", _wrap_Geometry_AddPoint_2D, METH_VARARGS, (char *)"Geometry_AddPoint_2D(Geometry self, double x, double y)"},
   20368                 :    { (char *)"Geometry_AddGeometryDirectly", _wrap_Geometry_AddGeometryDirectly, METH_VARARGS, (char *)"Geometry_AddGeometryDirectly(Geometry self, Geometry other_disown) -> OGRErr"},
   20369                 :    { (char *)"Geometry_AddGeometry", _wrap_Geometry_AddGeometry, METH_VARARGS, (char *)"Geometry_AddGeometry(Geometry self, Geometry other) -> OGRErr"},
   20370                 :    { (char *)"Geometry_Clone", _wrap_Geometry_Clone, METH_VARARGS, (char *)"\n"
   20371                 :     "Geometry_Clone(Geometry self) -> Geometry\n"
   20372                 :     "\n"
   20373                 :     "OGRGeometryH OGR_G_Clone(OGRGeometryH\n"
   20374                 :     "hGeom)\n"
   20375                 :     "\n"
   20376                 :     "Make a copy of this object.\n"
   20377                 :     "\n"
   20378                 :     "This function relates to the SFCOM IGeometry::clone() method.\n"
   20379                 :     "\n"
   20380                 :     "This function is the same as the CPP method OGRGeometry::clone().\n"
   20381                 :     "\n"
   20382                 :     "Parameters:\n"
   20383                 :     "-----------\n"
   20384                 :     "\n"
   20385                 :     "hGeom:  handle on the geometry to clone from.\n"
   20386                 :     "\n"
   20387                 :     "an handle on the copy of the geometry with the spatial reference\n"
   20388                 :     "system as the original. \n"
   20389                 :     ""},
   20390                 :    { (char *)"Geometry_GetGeometryType", _wrap_Geometry_GetGeometryType, METH_VARARGS, (char *)"\n"
   20391                 :     "Geometry_GetGeometryType(Geometry self) -> OGRwkbGeometryType\n"
   20392                 :     "\n"
   20393                 :     "OGRwkbGeometryType\n"
   20394                 :     "OGR_G_GetGeometryType(OGRGeometryH hGeom)\n"
   20395                 :     "\n"
   20396                 :     "Fetch geometry type.\n"
   20397                 :     "\n"
   20398                 :     "Note that the geometry type may include the 2.5D flag. To get a 2D\n"
   20399                 :     "flattened version of the geometry type apply the wkbFlatten() macro to\n"
   20400                 :     "the return result.\n"
   20401                 :     "\n"
   20402                 :     "This function is the same as the CPP method\n"
   20403                 :     "OGRGeometry::getGeometryType().\n"
   20404                 :     "\n"
   20405                 :     "Parameters:\n"
   20406                 :     "-----------\n"
   20407                 :     "\n"
   20408                 :     "hGeom:  handle on the geometry to get type from.\n"
   20409                 :     "\n"
   20410                 :     "the geometry type code. \n"
   20411                 :     ""},
   20412                 :    { (char *)"Geometry_GetGeometryName", _wrap_Geometry_GetGeometryName, METH_VARARGS, (char *)"\n"
   20413                 :     "Geometry_GetGeometryName(Geometry self) -> char\n"
   20414                 :     "\n"
   20415                 :     "const char*\n"
   20416                 :     "OGR_G_GetGeometryName(OGRGeometryH hGeom)\n"
   20417                 :     "\n"
   20418                 :     "Fetch WKT name for geometry type.\n"
   20419                 :     "\n"
   20420                 :     "There is no SFCOM analog to this function.\n"
   20421                 :     "\n"
   20422                 :     "This function is the same as the CPP method\n"
   20423                 :     "OGRGeometry::getGeometryName().\n"
   20424                 :     "\n"
   20425                 :     "Parameters:\n"
   20426                 :     "-----------\n"
   20427                 :     "\n"
   20428                 :     "hGeom:  handle on the geometry to get name from.\n"
   20429                 :     "\n"
   20430                 :     "name used for this geometry type in well known text format. \n"
   20431                 :     ""},
   20432                 :    { (char *)"Geometry_Length", _wrap_Geometry_Length, METH_VARARGS, (char *)"Geometry_Length(Geometry self) -> double"},
   20433                 :    { (char *)"Geometry_Area", _wrap_Geometry_Area, METH_VARARGS, (char *)"Geometry_Area(Geometry self) -> double"},
   20434                 :    { (char *)"Geometry_GetArea", _wrap_Geometry_GetArea, METH_VARARGS, (char *)"Geometry_GetArea(Geometry self) -> double"},
   20435                 :    { (char *)"Geometry_GetPointCount", _wrap_Geometry_GetPointCount, METH_VARARGS, (char *)"Geometry_GetPointCount(Geometry self) -> int"},
   20436                 :    { (char *)"Geometry_GetPoints", (PyCFunction) _wrap_Geometry_GetPoints, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetPoints(Geometry self, int nCoordDimension = 0)"},
   20437                 :    { (char *)"Geometry_GetX", (PyCFunction) _wrap_Geometry_GetX, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetX(Geometry self, int point = 0) -> double"},
   20438                 :    { (char *)"Geometry_GetY", (PyCFunction) _wrap_Geometry_GetY, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetY(Geometry self, int point = 0) -> double"},
   20439                 :    { (char *)"Geometry_GetZ", (PyCFunction) _wrap_Geometry_GetZ, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetZ(Geometry self, int point = 0) -> double"},
   20440                 :    { (char *)"Geometry_GetPoint", _wrap_Geometry_GetPoint, METH_VARARGS, (char *)"Geometry_GetPoint(Geometry self, int iPoint = 0)"},
   20441                 :    { (char *)"Geometry_GetPoint_2D", _wrap_Geometry_GetPoint_2D, METH_VARARGS, (char *)"Geometry_GetPoint_2D(Geometry self, int iPoint = 0)"},
   20442                 :    { (char *)"Geometry_GetGeometryCount", _wrap_Geometry_GetGeometryCount, METH_VARARGS, (char *)"Geometry_GetGeometryCount(Geometry self) -> int"},
   20443                 :    { (char *)"Geometry_SetPoint", (PyCFunction) _wrap_Geometry_SetPoint, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_SetPoint(Geometry self, int point, double x, double y, double z = 0)"},
   20444                 :    { (char *)"Geometry_SetPoint_2D", (PyCFunction) _wrap_Geometry_SetPoint_2D, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_SetPoint_2D(Geometry self, int point, double x, double y)"},
   20445                 :    { (char *)"Geometry_GetGeometryRef", _wrap_Geometry_GetGeometryRef, METH_VARARGS, (char *)"Geometry_GetGeometryRef(Geometry self, int geom) -> Geometry"},
   20446                 :    { (char *)"Geometry_Simplify", _wrap_Geometry_Simplify, METH_VARARGS, (char *)"\n"
   20447                 :     "Geometry_Simplify(Geometry self, double tolerance) -> Geometry\n"
   20448                 :     "\n"
   20449                 :     "OGRGeometryH\n"
   20450                 :     "OGR_G_Simplify(OGRGeometryH hThis, double dTolerance)\n"
   20451                 :     "\n"
   20452                 :     "Compute a simplified geometry.\n"
   20453                 :     "\n"
   20454                 :     "This function is the same as the C++ method OGRGeometry::Simplify().\n"
   20455                 :     "\n"
   20456                 :     "This function is built on the GEOS library, check it for the\n"
   20457                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20458                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20459                 :     "error.\n"
   20460                 :     "\n"
   20461                 :     "Parameters:\n"
   20462                 :     "-----------\n"
   20463                 :     "\n"
   20464                 :     "hThis:  the geometry.\n"
   20465                 :     "\n"
   20466                 :     "dTolerance:  the distance tolerance for the simplification.\n"
   20467                 :     "\n"
   20468                 :     "the simplified geometry or NULL if an error occurs.\n"
   20469                 :     "\n"
   20470                 :     "OGR 1.8.0 \n"
   20471                 :     ""},
   20472                 :    { (char *)"Geometry_SimplifyPreserveTopology", _wrap_Geometry_SimplifyPreserveTopology, METH_VARARGS, (char *)"\n"
   20473                 :     "Geometry_SimplifyPreserveTopology(Geometry self, double tolerance) -> Geometry\n"
   20474                 :     "\n"
   20475                 :     "OGRGeometryH\n"
   20476                 :     "OGR_G_SimplifyPreserveTopology(OGRGeometryH hThis, double dTolerance)\n"
   20477                 :     "\n"
   20478                 :     "Compute a simplified geometry.\n"
   20479                 :     "\n"
   20480                 :     "This function is the same as the C++ method\n"
   20481                 :     "OGRGeometry::SimplifyPreserveTopology().\n"
   20482                 :     "\n"
   20483                 :     "This function is built on the GEOS library, check it for the\n"
   20484                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20485                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20486                 :     "error.\n"
   20487                 :     "\n"
   20488                 :     "Parameters:\n"
   20489                 :     "-----------\n"
   20490                 :     "\n"
   20491                 :     "hThis:  the geometry.\n"
   20492                 :     "\n"
   20493                 :     "dTolerance:  the distance tolerance for the simplification.\n"
   20494                 :     "\n"
   20495                 :     "the simplified geometry or NULL if an error occurs.\n"
   20496                 :     "\n"
   20497                 :     "OGR 1.9.0 \n"
   20498                 :     ""},
   20499                 :    { (char *)"Geometry_Boundary", _wrap_Geometry_Boundary, METH_VARARGS, (char *)"\n"
   20500                 :     "Geometry_Boundary(Geometry self) -> Geometry\n"
   20501                 :     "\n"
   20502                 :     "OGRGeometryH\n"
   20503                 :     "OGR_G_Boundary(OGRGeometryH hTarget)\n"
   20504                 :     "\n"
   20505                 :     "Compute boundary.\n"
   20506                 :     "\n"
   20507                 :     "A new geometry object is created and returned containing the boundary\n"
   20508                 :     "of the geometry on which the method is invoked.\n"
   20509                 :     "\n"
   20510                 :     "This function is the same as the C++ method OGR_G_Boundary().\n"
   20511                 :     "\n"
   20512                 :     "This function is built on the GEOS library, check it for the\n"
   20513                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20514                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20515                 :     "error.\n"
   20516                 :     "\n"
   20517                 :     "Parameters:\n"
   20518                 :     "-----------\n"
   20519                 :     "\n"
   20520                 :     "hTarget:  The Geometry to calculate the boundary of.\n"
   20521                 :     "\n"
   20522                 :     "a handle to a newly allocated geometry now owned by the caller, or\n"
   20523                 :     "NULL on failure.\n"
   20524                 :     "\n"
   20525                 :     "OGR 1.8.0 \n"
   20526                 :     ""},
   20527                 :    { (char *)"Geometry_GetBoundary", _wrap_Geometry_GetBoundary, METH_VARARGS, (char *)"\n"
   20528                 :     "Geometry_GetBoundary(Geometry self) -> Geometry\n"
   20529                 :     "\n"
   20530                 :     "OGRGeometryH\n"
   20531                 :     "OGR_G_GetBoundary(OGRGeometryH hTarget)\n"
   20532                 :     "\n"
   20533                 :     "Compute boundary (deprecated).\n"
   20534                 :     "\n"
   20535                 :     "Deprecated See:   OGR_G_Boundary() \n"
   20536                 :     ""},
   20537                 :    { (char *)"Geometry_ConvexHull", _wrap_Geometry_ConvexHull, METH_VARARGS, (char *)"\n"
   20538                 :     "Geometry_ConvexHull(Geometry self) -> Geometry\n"
   20539                 :     "\n"
   20540                 :     "OGRGeometryH\n"
   20541                 :     "OGR_G_ConvexHull(OGRGeometryH hTarget)\n"
   20542                 :     "\n"
   20543                 :     "Compute convex hull.\n"
   20544                 :     "\n"
   20545                 :     "A new geometry object is created and returned containing the convex\n"
   20546                 :     "hull of the geometry on which the method is invoked.\n"
   20547                 :     "\n"
   20548                 :     "This function is the same as the C++ method OGRGeometry::ConvexHull().\n"
   20549                 :     "\n"
   20550                 :     "This function is built on the GEOS library, check it for the\n"
   20551                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20552                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20553                 :     "error.\n"
   20554                 :     "\n"
   20555                 :     "Parameters:\n"
   20556                 :     "-----------\n"
   20557                 :     "\n"
   20558                 :     "hTarget:  The Geometry to calculate the convex hull of.\n"
   20559                 :     "\n"
   20560                 :     "a handle to a newly allocated geometry now owned by the caller, or\n"
   20561                 :     "NULL on failure. \n"
   20562                 :     ""},
   20563                 :    { (char *)"Geometry_Buffer", (PyCFunction) _wrap_Geometry_Buffer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   20564                 :     "Geometry_Buffer(Geometry self, double distance, int quadsecs = 30) -> Geometry\n"
   20565                 :     "\n"
   20566                 :     "OGRGeometryH OGR_G_Buffer(OGRGeometryH\n"
   20567                 :     "hTarget, double dfDist, int nQuadSegs)\n"
   20568                 :     "\n"
   20569                 :     "Compute buffer of geometry.\n"
   20570                 :     "\n"
   20571                 :     "Builds a new geometry containing the buffer region around the geometry\n"
   20572                 :     "on which it is invoked. The buffer is a polygon containing the region\n"
   20573                 :     "within the buffer distance of the original geometry.\n"
   20574                 :     "\n"
   20575                 :     "Some buffer sections are properly described as curves, but are\n"
   20576                 :     "converted to approximate polygons. The nQuadSegs parameter can be used\n"
   20577                 :     "to control how many segements should be used to define a 90 degree\n"
   20578                 :     "curve - a quadrant of a circle. A value of 30 is a reasonable default.\n"
   20579                 :     "Large values result in large numbers of vertices in the resulting\n"
   20580                 :     "buffer geometry while small numbers reduce the accuracy of the result.\n"
   20581                 :     "\n"
   20582                 :     "This function is the same as the C++ method OGRGeometry::Buffer().\n"
   20583                 :     "\n"
   20584                 :     "This function is built on the GEOS library, check it for the\n"
   20585                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20586                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20587                 :     "error.\n"
   20588                 :     "\n"
   20589                 :     "Parameters:\n"
   20590                 :     "-----------\n"
   20591                 :     "\n"
   20592                 :     "hTarget:  the geometry.\n"
   20593                 :     "\n"
   20594                 :     "dfDist:  the buffer distance to be applied.\n"
   20595                 :     "\n"
   20596                 :     "nQuadSegs:  the number of segments used to approximate a 90 degree\n"
   20597                 :     "(quadrant) of curvature.\n"
   20598                 :     "\n"
   20599                 :     "the newly created geometry, or NULL if an error occurs. \n"
   20600                 :     ""},
   20601                 :    { (char *)"Geometry_Intersection", _wrap_Geometry_Intersection, METH_VARARGS, (char *)"\n"
   20602                 :     "Geometry_Intersection(Geometry self, Geometry other) -> Geometry\n"
   20603                 :     "\n"
   20604                 :     "OGRGeometryH\n"
   20605                 :     "OGR_G_Intersection(OGRGeometryH hThis, OGRGeometryH hOther)\n"
   20606                 :     "\n"
   20607                 :     "Compute intersection.\n"
   20608                 :     "\n"
   20609                 :     "Generates a new geometry which is the region of intersection of the\n"
   20610                 :     "two geometries operated on. The OGR_G_Intersects() function can be\n"
   20611                 :     "used to test if two geometries intersect.\n"
   20612                 :     "\n"
   20613                 :     "This function is the same as the C++ method\n"
   20614                 :     "OGRGeometry::Intersection().\n"
   20615                 :     "\n"
   20616                 :     "This function is built on the GEOS library, check it for the\n"
   20617                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20618                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20619                 :     "error.\n"
   20620                 :     "\n"
   20621                 :     "Parameters:\n"
   20622                 :     "-----------\n"
   20623                 :     "\n"
   20624                 :     "hThis:  the geometry.\n"
   20625                 :     "\n"
   20626                 :     "hOther:  the other geometry.\n"
   20627                 :     "\n"
   20628                 :     "a new geometry representing the intersection or NULL if there is no\n"
   20629                 :     "intersection or an error occurs. \n"
   20630                 :     ""},
   20631                 :    { (char *)"Geometry_Union", _wrap_Geometry_Union, METH_VARARGS, (char *)"\n"
   20632                 :     "Geometry_Union(Geometry self, Geometry other) -> Geometry\n"
   20633                 :     "\n"
   20634                 :     "OGRGeometryH OGR_G_Union(OGRGeometryH\n"
   20635                 :     "hThis, OGRGeometryH hOther)\n"
   20636                 :     "\n"
   20637                 :     "Compute union.\n"
   20638                 :     "\n"
   20639                 :     "Generates a new geometry which is the region of union of the two\n"
   20640                 :     "geometries operated on.\n"
   20641                 :     "\n"
   20642                 :     "This function is the same as the C++ method OGRGeometry::Union().\n"
   20643                 :     "\n"
   20644                 :     "This function is built on the GEOS library, check it for the\n"
   20645                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20646                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20647                 :     "error.\n"
   20648                 :     "\n"
   20649                 :     "Parameters:\n"
   20650                 :     "-----------\n"
   20651                 :     "\n"
   20652                 :     "hThis:  the geometry.\n"
   20653                 :     "\n"
   20654                 :     "hOther:  the other geometry.\n"
   20655                 :     "\n"
   20656                 :     "a new geometry representing the union or NULL if an error occurs. \n"
   20657                 :     ""},
   20658                 :    { (char *)"Geometry_UnionCascaded", _wrap_Geometry_UnionCascaded, METH_VARARGS, (char *)"\n"
   20659                 :     "Geometry_UnionCascaded(Geometry self) -> Geometry\n"
   20660                 :     "\n"
   20661                 :     "OGRGeometryH\n"
   20662                 :     "OGR_G_UnionCascaded(OGRGeometryH hThis)\n"
   20663                 :     "\n"
   20664                 :     "Compute union using cascading.\n"
   20665                 :     "\n"
   20666                 :     "This function is the same as the C++ method\n"
   20667                 :     "OGRGeometry::UnionCascaded().\n"
   20668                 :     "\n"
   20669                 :     "This function is built on the GEOS library, check it for the\n"
   20670                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20671                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20672                 :     "error.\n"
   20673                 :     "\n"
   20674                 :     "Parameters:\n"
   20675                 :     "-----------\n"
   20676                 :     "\n"
   20677                 :     "hThis:  the geometry.\n"
   20678                 :     "\n"
   20679                 :     "a new geometry representing the union or NULL if an error occurs. \n"
   20680                 :     ""},
   20681                 :    { (char *)"Geometry_Difference", _wrap_Geometry_Difference, METH_VARARGS, (char *)"\n"
   20682                 :     "Geometry_Difference(Geometry self, Geometry other) -> Geometry\n"
   20683                 :     "\n"
   20684                 :     "OGRGeometryH\n"
   20685                 :     "OGR_G_Difference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
   20686                 :     "\n"
   20687                 :     "Compute difference.\n"
   20688                 :     "\n"
   20689                 :     "Generates a new geometry which is the region of this geometry with the\n"
   20690                 :     "region of the other geometry removed.\n"
   20691                 :     "\n"
   20692                 :     "This function is the same as the C++ method OGRGeometry::Difference().\n"
   20693                 :     "\n"
   20694                 :     "This function is built on the GEOS library, check it for the\n"
   20695                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20696                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20697                 :     "error.\n"
   20698                 :     "\n"
   20699                 :     "Parameters:\n"
   20700                 :     "-----------\n"
   20701                 :     "\n"
   20702                 :     "hThis:  the geometry.\n"
   20703                 :     "\n"
   20704                 :     "hOther:  the other geometry.\n"
   20705                 :     "\n"
   20706                 :     "a new geometry representing the difference or NULL if the difference\n"
   20707                 :     "is empty or an error occurs. \n"
   20708                 :     ""},
   20709                 :    { (char *)"Geometry_SymDifference", _wrap_Geometry_SymDifference, METH_VARARGS, (char *)"\n"
   20710                 :     "Geometry_SymDifference(Geometry self, Geometry other) -> Geometry\n"
   20711                 :     "\n"
   20712                 :     "OGRGeometryH\n"
   20713                 :     "OGR_G_SymDifference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
   20714                 :     "\n"
   20715                 :     "Compute symmetric difference.\n"
   20716                 :     "\n"
   20717                 :     "Generates a new geometry which is the symmetric difference of this\n"
   20718                 :     "geometry and the other geometry.\n"
   20719                 :     "\n"
   20720                 :     "This function is the same as the C++ method\n"
   20721                 :     "OGRGeometry::SymmetricDifference().\n"
   20722                 :     "\n"
   20723                 :     "This function is built on the GEOS library, check it for the\n"
   20724                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20725                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20726                 :     "error.\n"
   20727                 :     "\n"
   20728                 :     "Parameters:\n"
   20729                 :     "-----------\n"
   20730                 :     "\n"
   20731                 :     "hThis:  the geometry.\n"
   20732                 :     "\n"
   20733                 :     "hOther:  the other geometry.\n"
   20734                 :     "\n"
   20735                 :     "a new geometry representing the symmetric difference or NULL if the\n"
   20736                 :     "difference is empty or an error occurs.\n"
   20737                 :     "\n"
   20738                 :     "OGR 1.8.0 \n"
   20739                 :     ""},
   20740                 :    { (char *)"Geometry_SymmetricDifference", _wrap_Geometry_SymmetricDifference, METH_VARARGS, (char *)"\n"
   20741                 :     "Geometry_SymmetricDifference(Geometry self, Geometry other) -> Geometry\n"
   20742                 :     "\n"
   20743                 :     "OGRGeometryH\n"
   20744                 :     "OGR_G_SymmetricDifference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
   20745                 :     "\n"
   20746                 :     "Compute symmetric difference (deprecated).\n"
   20747                 :     "\n"
   20748                 :     "Deprecated See:   OGR_G_SymmetricDifference() \n"
   20749                 :     ""},
   20750                 :    { (char *)"Geometry_Distance", _wrap_Geometry_Distance, METH_VARARGS, (char *)"\n"
   20751                 :     "Geometry_Distance(Geometry self, Geometry other) -> double\n"
   20752                 :     "\n"
   20753                 :     "double OGR_G_Distance(OGRGeometryH\n"
   20754                 :     "hFirst, OGRGeometryH hOther)\n"
   20755                 :     "\n"
   20756                 :     "Compute distance between two geometries.\n"
   20757                 :     "\n"
   20758                 :     "Returns the shortest distance between the two geometries.\n"
   20759                 :     "\n"
   20760                 :     "This function is the same as the C++ method OGRGeometry::Distance().\n"
   20761                 :     "\n"
   20762                 :     "This function is built on the GEOS library, check it for the\n"
   20763                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20764                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20765                 :     "error.\n"
   20766                 :     "\n"
   20767                 :     "Parameters:\n"
   20768                 :     "-----------\n"
   20769                 :     "\n"
   20770                 :     "hFirst:  the first geometry to compare against.\n"
   20771                 :     "\n"
   20772                 :     "hOther:  the other geometry to compare against.\n"
   20773                 :     "\n"
   20774                 :     "the distance between the geometries or -1 if an error occurs. \n"
   20775                 :     ""},
   20776                 :    { (char *)"Geometry_Empty", _wrap_Geometry_Empty, METH_VARARGS, (char *)"\n"
   20777                 :     "Geometry_Empty(Geometry self)\n"
   20778                 :     "\n"
   20779                 :     "void OGR_G_Empty(OGRGeometryH hGeom)\n"
   20780                 :     "\n"
   20781                 :     "Clear geometry information. This restores the geometry to it's initial\n"
   20782                 :     "state after construction, and before assignment of actual geometry.\n"
   20783                 :     "\n"
   20784                 :     "This function relates to the SFCOM IGeometry::Empty() method.\n"
   20785                 :     "\n"
   20786                 :     "This function is the same as the CPP method OGRGeometry::empty().\n"
   20787                 :     "\n"
   20788                 :     "Parameters:\n"
   20789                 :     "-----------\n"
   20790                 :     "\n"
   20791                 :     "hGeom:  handle on the geometry to empty. \n"
   20792                 :     ""},
   20793                 :    { (char *)"Geometry_IsEmpty", _wrap_Geometry_IsEmpty, METH_VARARGS, (char *)"\n"
   20794                 :     "Geometry_IsEmpty(Geometry self) -> bool\n"
   20795                 :     "\n"
   20796                 :     "int OGR_G_IsEmpty(OGRGeometryH hGeom)\n"
   20797                 :     "\n"
   20798                 :     "Test if the geometry is empty.\n"
   20799                 :     "\n"
   20800                 :     "This method is the same as the CPP method OGRGeometry::IsEmpty().\n"
   20801                 :     "\n"
   20802                 :     "Parameters:\n"
   20803                 :     "-----------\n"
   20804                 :     "\n"
   20805                 :     "hGeom:  The Geometry to test.\n"
   20806                 :     "\n"
   20807                 :     "TRUE if the geometry has no points, otherwise FALSE. \n"
   20808                 :     ""},
   20809                 :    { (char *)"Geometry_IsValid", _wrap_Geometry_IsValid, METH_VARARGS, (char *)"\n"
   20810                 :     "Geometry_IsValid(Geometry self) -> bool\n"
   20811                 :     "\n"
   20812                 :     "int OGR_G_IsValid(OGRGeometryH hGeom)\n"
   20813                 :     "\n"
   20814                 :     "Test if the geometry is valid.\n"
   20815                 :     "\n"
   20816                 :     "This function is the same as the C++ method OGRGeometry::IsValid().\n"
   20817                 :     "\n"
   20818                 :     "This function is built on the GEOS library, check it for the\n"
   20819                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20820                 :     "library, this function will always return FALSE.\n"
   20821                 :     "\n"
   20822                 :     "Parameters:\n"
   20823                 :     "-----------\n"
   20824                 :     "\n"
   20825                 :     "hGeom:  The Geometry to test.\n"
   20826                 :     "\n"
   20827                 :     "TRUE if the geometry has no points, otherwise FALSE. \n"
   20828                 :     ""},
   20829                 :    { (char *)"Geometry_IsSimple", _wrap_Geometry_IsSimple, METH_VARARGS, (char *)"\n"
   20830                 :     "Geometry_IsSimple(Geometry self) -> bool\n"
   20831                 :     "\n"
   20832                 :     "int OGR_G_IsSimple(OGRGeometryH\n"
   20833                 :     "hGeom)\n"
   20834                 :     "\n"
   20835                 :     "Returns TRUE if the geometry is simple.\n"
   20836                 :     "\n"
   20837                 :     "Returns TRUE if the geometry has no anomalous geometric points, such\n"
   20838                 :     "as self intersection or self tangency. The description of each\n"
   20839                 :     "instantiable geometric class will include the specific conditions that\n"
   20840                 :     "cause an instance of that class to be classified as not simple.\n"
   20841                 :     "\n"
   20842                 :     "This function is the same as the c++ method OGRGeometry::IsSimple()\n"
   20843                 :     "method.\n"
   20844                 :     "\n"
   20845                 :     "If OGR is built without the GEOS library, this function will always\n"
   20846                 :     "return FALSE.\n"
   20847                 :     "\n"
   20848                 :     "Parameters:\n"
   20849                 :     "-----------\n"
   20850                 :     "\n"
   20851                 :     "hGeom:  The Geometry to test.\n"
   20852                 :     "\n"
   20853                 :     "TRUE if object is simple, otherwise FALSE. \n"
   20854                 :     ""},
   20855                 :    { (char *)"Geometry_IsRing", _wrap_Geometry_IsRing, METH_VARARGS, (char *)"\n"
   20856                 :     "Geometry_IsRing(Geometry self) -> bool\n"
   20857                 :     "\n"
   20858                 :     "int OGR_G_IsRing(OGRGeometryH hGeom)\n"
   20859                 :     "\n"
   20860                 :     "Test if the geometry is a ring.\n"
   20861                 :     "\n"
   20862                 :     "This function is the same as the C++ method OGRGeometry::IsRing().\n"
   20863                 :     "\n"
   20864                 :     "This function is built on the GEOS library, check it for the\n"
   20865                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20866                 :     "library, this function will always return FALSE.\n"
   20867                 :     "\n"
   20868                 :     "Parameters:\n"
   20869                 :     "-----------\n"
   20870                 :     "\n"
   20871                 :     "hGeom:  The Geometry to test.\n"
   20872                 :     "\n"
   20873                 :     "TRUE if the geometry has no points, otherwise FALSE. \n"
   20874                 :     ""},
   20875                 :    { (char *)"Geometry_Intersects", _wrap_Geometry_Intersects, METH_VARARGS, (char *)"\n"
   20876                 :     "Geometry_Intersects(Geometry self, Geometry other) -> bool\n"
   20877                 :     "\n"
   20878                 :     "int OGR_G_Intersects(OGRGeometryH\n"
   20879                 :     "hGeom, OGRGeometryH hOtherGeom)\n"
   20880                 :     "\n"
   20881                 :     "Do these features intersect?\n"
   20882                 :     "\n"
   20883                 :     "Currently this is not implemented in a rigerous fashion, and generally\n"
   20884                 :     "just tests whether the envelopes of the two features intersect.\n"
   20885                 :     "Eventually this will be made rigerous.\n"
   20886                 :     "\n"
   20887                 :     "This function is the same as the CPP method OGRGeometry::Intersects.\n"
   20888                 :     "\n"
   20889                 :     "Parameters:\n"
   20890                 :     "-----------\n"
   20891                 :     "\n"
   20892                 :     "hGeom:  handle on the first geometry.\n"
   20893                 :     "\n"
   20894                 :     "hOtherGeom:  handle on the other geometry to test against.\n"
   20895                 :     "\n"
   20896                 :     "TRUE if the geometries intersect, otherwise FALSE. \n"
   20897                 :     ""},
   20898                 :    { (char *)"Geometry_Intersect", _wrap_Geometry_Intersect, METH_VARARGS, (char *)"\n"
   20899                 :     "Geometry_Intersect(Geometry self, Geometry other) -> bool\n"
   20900                 :     "\n"
   20901                 :     "int OGR_G_Intersect(OGRGeometryH\n"
   20902                 :     "hGeom, OGRGeometryH hOtherGeom) \n"
   20903                 :     ""},
   20904                 :    { (char *)"Geometry_Equals", _wrap_Geometry_Equals, METH_VARARGS, (char *)"\n"
   20905                 :     "Geometry_Equals(Geometry self, Geometry other) -> bool\n"
   20906                 :     "\n"
   20907                 :     "int OGR_G_Equals(OGRGeometryH hGeom,\n"
   20908                 :     "OGRGeometryH hOther)\n"
   20909                 :     "\n"
   20910                 :     "Returns TRUE if two geometries are equivalent.\n"
   20911                 :     "\n"
   20912                 :     "This function is the same as the CPP method OGRGeometry::Equals()\n"
   20913                 :     "method.\n"
   20914                 :     "\n"
   20915                 :     "Parameters:\n"
   20916                 :     "-----------\n"
   20917                 :     "\n"
   20918                 :     "hGeom:  handle on the first geometry.\n"
   20919                 :     "\n"
   20920                 :     "hOther:  handle on the other geometry to test against.\n"
   20921                 :     "\n"
   20922                 :     "TRUE if equivalent or FALSE otherwise. \n"
   20923                 :     ""},
   20924                 :    { (char *)"Geometry_Equal", _wrap_Geometry_Equal, METH_VARARGS, (char *)"\n"
   20925                 :     "Geometry_Equal(Geometry self, Geometry other) -> bool\n"
   20926                 :     "\n"
   20927                 :     "int OGR_G_Equal(OGRGeometryH hGeom,\n"
   20928                 :     "OGRGeometryH hOther) \n"
   20929                 :     ""},
   20930                 :    { (char *)"Geometry_Disjoint", _wrap_Geometry_Disjoint, METH_VARARGS, (char *)"\n"
   20931                 :     "Geometry_Disjoint(Geometry self, Geometry other) -> bool\n"
   20932                 :     "\n"
   20933                 :     "int OGR_G_Disjoint(OGRGeometryH\n"
   20934                 :     "hThis, OGRGeometryH hOther)\n"
   20935                 :     "\n"
   20936                 :     "Test for disjointness.\n"
   20937                 :     "\n"
   20938                 :     "Tests if this geometry and the other geometry are disjoint.\n"
   20939                 :     "\n"
   20940                 :     "This function is the same as the C++ method OGRGeometry::Disjoint().\n"
   20941                 :     "\n"
   20942                 :     "This function is built on the GEOS library, check it for the\n"
   20943                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20944                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20945                 :     "error.\n"
   20946                 :     "\n"
   20947                 :     "Parameters:\n"
   20948                 :     "-----------\n"
   20949                 :     "\n"
   20950                 :     "hThis:  the geometry to compare.\n"
   20951                 :     "\n"
   20952                 :     "hOther:  the other geometry to compare.\n"
   20953                 :     "\n"
   20954                 :     "TRUE if they are disjoint, otherwise FALSE. \n"
   20955                 :     ""},
   20956                 :    { (char *)"Geometry_Touches", _wrap_Geometry_Touches, METH_VARARGS, (char *)"\n"
   20957                 :     "Geometry_Touches(Geometry self, Geometry other) -> bool\n"
   20958                 :     "\n"
   20959                 :     "int OGR_G_Touches(OGRGeometryH hThis,\n"
   20960                 :     "OGRGeometryH hOther)\n"
   20961                 :     "\n"
   20962                 :     "Test for touching.\n"
   20963                 :     "\n"
   20964                 :     "Tests if this geometry and the other geometry are touching.\n"
   20965                 :     "\n"
   20966                 :     "This function is the same as the C++ method OGRGeometry::Touches().\n"
   20967                 :     "\n"
   20968                 :     "This function is built on the GEOS library, check it for the\n"
   20969                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20970                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20971                 :     "error.\n"
   20972                 :     "\n"
   20973                 :     "Parameters:\n"
   20974                 :     "-----------\n"
   20975                 :     "\n"
   20976                 :     "hThis:  the geometry to compare.\n"
   20977                 :     "\n"
   20978                 :     "hOther:  the other geometry to compare.\n"
   20979                 :     "\n"
   20980                 :     "TRUE if they are touching, otherwise FALSE. \n"
   20981                 :     ""},
   20982                 :    { (char *)"Geometry_Crosses", _wrap_Geometry_Crosses, METH_VARARGS, (char *)"\n"
   20983                 :     "Geometry_Crosses(Geometry self, Geometry other) -> bool\n"
   20984                 :     "\n"
   20985                 :     "int OGR_G_Crosses(OGRGeometryH hThis,\n"
   20986                 :     "OGRGeometryH hOther)\n"
   20987                 :     "\n"
   20988                 :     "Test for crossing.\n"
   20989                 :     "\n"
   20990                 :     "Tests if this geometry and the other geometry are crossing.\n"
   20991                 :     "\n"
   20992                 :     "This function is the same as the C++ method OGRGeometry::Crosses().\n"
   20993                 :     "\n"
   20994                 :     "This function is built on the GEOS library, check it for the\n"
   20995                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   20996                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   20997                 :     "error.\n"
   20998                 :     "\n"
   20999                 :     "Parameters:\n"
   21000                 :     "-----------\n"
   21001                 :     "\n"
   21002                 :     "hThis:  the geometry to compare.\n"
   21003                 :     "\n"
   21004                 :     "hOther:  the other geometry to compare.\n"
   21005                 :     "\n"
   21006                 :     "TRUE if they are crossing, otherwise FALSE. \n"
   21007                 :     ""},
   21008                 :    { (char *)"Geometry_Within", _wrap_Geometry_Within, METH_VARARGS, (char *)"\n"
   21009                 :     "Geometry_Within(Geometry self, Geometry other) -> bool\n"
   21010                 :     "\n"
   21011                 :     "int OGR_G_Within(OGRGeometryH hThis,\n"
   21012                 :     "OGRGeometryH hOther)\n"
   21013                 :     "\n"
   21014                 :     "Test for containment.\n"
   21015                 :     "\n"
   21016                 :     "Tests if this geometry is within the other geometry.\n"
   21017                 :     "\n"
   21018                 :     "This function is the same as the C++ method OGRGeometry::Within().\n"
   21019                 :     "\n"
   21020                 :     "This function is built on the GEOS library, check it for the\n"
   21021                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   21022                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   21023                 :     "error.\n"
   21024                 :     "\n"
   21025                 :     "Parameters:\n"
   21026                 :     "-----------\n"
   21027                 :     "\n"
   21028                 :     "hThis:  the geometry to compare.\n"
   21029                 :     "\n"
   21030                 :     "hOther:  the other geometry to compare.\n"
   21031                 :     "\n"
   21032                 :     "TRUE if hThis is within hOther, otherwise FALSE. \n"
   21033                 :     ""},
   21034                 :    { (char *)"Geometry_Contains", _wrap_Geometry_Contains, METH_VARARGS, (char *)"\n"
   21035                 :     "Geometry_Contains(Geometry self, Geometry other) -> bool\n"
   21036                 :     "\n"
   21037                 :     "int OGR_G_Contains(OGRGeometryH\n"
   21038                 :     "hThis, OGRGeometryH hOther)\n"
   21039                 :     "\n"
   21040                 :     "Test for containment.\n"
   21041                 :     "\n"
   21042                 :     "Tests if this geometry contains the other geometry.\n"
   21043                 :     "\n"
   21044                 :     "This function is the same as the C++ method OGRGeometry::Contains().\n"
   21045                 :     "\n"
   21046                 :     "This function is built on the GEOS library, check it for the\n"
   21047                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   21048                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   21049                 :     "error.\n"
   21050                 :     "\n"
   21051                 :     "Parameters:\n"
   21052                 :     "-----------\n"
   21053                 :     "\n"
   21054                 :     "hThis:  the geometry to compare.\n"
   21055                 :     "\n"
   21056                 :     "hOther:  the other geometry to compare.\n"
   21057                 :     "\n"
   21058                 :     "TRUE if hThis contains hOther geometry, otherwise FALSE. \n"
   21059                 :     ""},
   21060                 :    { (char *)"Geometry_Overlaps", _wrap_Geometry_Overlaps, METH_VARARGS, (char *)"\n"
   21061                 :     "Geometry_Overlaps(Geometry self, Geometry other) -> bool\n"
   21062                 :     "\n"
   21063                 :     "int OGR_G_Overlaps(OGRGeometryH\n"
   21064                 :     "hThis, OGRGeometryH hOther)\n"
   21065                 :     "\n"
   21066                 :     "Test for overlap.\n"
   21067                 :     "\n"
   21068                 :     "Tests if this geometry and the other geometry overlap, that is their\n"
   21069                 :     "intersection has a non-zero area.\n"
   21070                 :     "\n"
   21071                 :     "This function is the same as the C++ method OGRGeometry::Overlaps().\n"
   21072                 :     "\n"
   21073                 :     "This function is built on the GEOS library, check it for the\n"
   21074                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   21075                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   21076                 :     "error.\n"
   21077                 :     "\n"
   21078                 :     "Parameters:\n"
   21079                 :     "-----------\n"
   21080                 :     "\n"
   21081                 :     "hThis:  the geometry to compare.\n"
   21082                 :     "\n"
   21083                 :     "hOther:  the other geometry to compare.\n"
   21084                 :     "\n"
   21085                 :     "TRUE if they are overlapping, otherwise FALSE. \n"
   21086                 :     ""},
   21087                 :    { (char *)"Geometry_TransformTo", _wrap_Geometry_TransformTo, METH_VARARGS, (char *)"\n"
   21088                 :     "Geometry_TransformTo(Geometry self, SpatialReference reference) -> OGRErr\n"
   21089                 :     "\n"
   21090                 :     "OGRErr\n"
   21091                 :     "OGR_G_TransformTo(OGRGeometryH hGeom, OGRSpatialReferenceH hSRS)\n"
   21092                 :     "\n"
   21093                 :     "Transform geometry to new spatial reference system.\n"
   21094                 :     "\n"
   21095                 :     "This function will transform the coordinates of a geometry from their\n"
   21096                 :     "current spatial reference system to a new target spatial reference\n"
   21097                 :     "system. Normally this means reprojecting the vectors, but it could\n"
   21098                 :     "include datum shifts, and changes of units.\n"
   21099                 :     "\n"
   21100                 :     "This function will only work if the geometry already has an assigned\n"
   21101                 :     "spatial reference system, and if it is transformable to the target\n"
   21102                 :     "coordinate system.\n"
   21103                 :     "\n"
   21104                 :     "Because this function requires internal creation and initialization of\n"
   21105                 :     "an OGRCoordinateTransformation object it is significantly more\n"
   21106                 :     "expensive to use this function to transform many geometries than it is\n"
   21107                 :     "to create the OGRCoordinateTransformation in advance, and call\n"
   21108                 :     "transform() with that transformation. This function exists primarily\n"
   21109                 :     "for convenience when only transforming a single geometry.\n"
   21110                 :     "\n"
   21111                 :     "This function is the same as the CPP method OGRGeometry::transformTo.\n"
   21112                 :     "\n"
   21113                 :     "Parameters:\n"
   21114                 :     "-----------\n"
   21115                 :     "\n"
   21116                 :     "hGeom:  handle on the geometry to apply the transform to.\n"
   21117                 :     "\n"
   21118                 :     "hSRS:  handle on the spatial reference system to apply.\n"
   21119                 :     "\n"
   21120                 :     "OGRERR_NONE on success, or an error code. \n"
   21121                 :     ""},
   21122                 :    { (char *)"Geometry_Transform", _wrap_Geometry_Transform, METH_VARARGS, (char *)"\n"
   21123                 :     "Geometry_Transform(Geometry self, CoordinateTransformation trans) -> OGRErr\n"
   21124                 :     "\n"
   21125                 :     "OGRErr OGR_G_Transform(OGRGeometryH\n"
   21126                 :     "hGeom, OGRCoordinateTransformationH hTransform)\n"
   21127                 :     "\n"
   21128                 :     "Apply arbitrary coordinate transformation to geometry.\n"
   21129                 :     "\n"
   21130                 :     "This function will transform the coordinates of a geometry from their\n"
   21131                 :     "current spatial reference system to a new target spatial reference\n"
   21132                 :     "system. Normally this means reprojecting the vectors, but it could\n"
   21133                 :     "include datum shifts, and changes of units.\n"
   21134                 :     "\n"
   21135                 :     "Note that this function does not require that the geometry already\n"
   21136                 :     "have a spatial reference system. It will be assumed that they can be\n"
   21137                 :     "treated as having the source spatial reference system of the\n"
   21138                 :     "OGRCoordinateTransformation object, and the actual SRS of the geometry\n"
   21139                 :     "will be ignored. On successful completion the output\n"
   21140                 :     "OGRSpatialReference of the OGRCoordinateTransformation will be\n"
   21141                 :     "assigned to the geometry.\n"
   21142                 :     "\n"
   21143                 :     "This function is the same as the CPP method OGRGeometry::transform.\n"
   21144                 :     "\n"
   21145                 :     "Parameters:\n"
   21146                 :     "-----------\n"
   21147                 :     "\n"
   21148                 :     "hGeom:  handle on the geometry to apply the transform to.\n"
   21149                 :     "\n"
   21150                 :     "hTransform:  handle on the transformation to apply.\n"
   21151                 :     "\n"
   21152                 :     "OGRERR_NONE on success or an error code. \n"
   21153                 :     ""},
   21154                 :    { (char *)"Geometry_GetSpatialReference", _wrap_Geometry_GetSpatialReference, METH_VARARGS, (char *)"\n"
   21155                 :     "Geometry_GetSpatialReference(Geometry self) -> SpatialReference\n"
   21156                 :     "\n"
   21157                 :     "OGRSpatialReferenceH\n"
   21158                 :     "OGR_G_GetSpatialReference(OGRGeometryH hGeom)\n"
   21159                 :     "\n"
   21160                 :     "Returns spatial reference system for geometry.\n"
   21161                 :     "\n"
   21162                 :     "This function relates to the SFCOM IGeometry::get_SpatialReference()\n"
   21163                 :     "method.\n"
   21164                 :     "\n"
   21165                 :     "This function is the same as the CPP method\n"
   21166                 :     "OGRGeometry::getSpatialReference().\n"
   21167                 :     "\n"
   21168                 :     "Parameters:\n"
   21169                 :     "-----------\n"
   21170                 :     "\n"
   21171                 :     "hGeom:  handle on the geometry to get spatial reference from.\n"
   21172                 :     "\n"
   21173                 :     "a reference to the spatial reference geometry. \n"
   21174                 :     ""},
   21175                 :    { (char *)"Geometry_AssignSpatialReference", _wrap_Geometry_AssignSpatialReference, METH_VARARGS, (char *)"\n"
   21176                 :     "Geometry_AssignSpatialReference(Geometry self, SpatialReference reference)\n"
   21177                 :     "\n"
   21178                 :     "void\n"
   21179                 :     "OGR_G_AssignSpatialReference(OGRGeometryH hGeom, OGRSpatialReferenceH\n"
   21180                 :     "hSRS)\n"
   21181                 :     "\n"
   21182                 :     "Assign spatial reference to this object.\n"
   21183                 :     "\n"
   21184                 :     "Any existing spatial reference is replaced, but under no circumstances\n"
   21185                 :     "does this result in the object being reprojected. It is just changing\n"
   21186                 :     "the interpretation of the existing geometry. Note that assigning a\n"
   21187                 :     "spatial reference increments the reference count on the\n"
   21188                 :     "OGRSpatialReference, but does not copy it.\n"
   21189                 :     "\n"
   21190                 :     "This is similar to the SFCOM IGeometry::put_SpatialReference() method.\n"
   21191                 :     "\n"
   21192                 :     "This function is the same as the CPP method\n"
   21193                 :     "OGRGeometry::assignSpatialReference.\n"
   21194                 :     "\n"
   21195                 :     "Parameters:\n"
   21196                 :     "-----------\n"
   21197                 :     "\n"
   21198                 :     "hGeom:  handle on the geometry to apply the new spatial reference\n"
   21199                 :     "system.\n"
   21200                 :     "\n"
   21201                 :     "hSRS:  handle on the new spatial reference system to apply. \n"
   21202                 :     ""},
   21203                 :    { (char *)"Geometry_CloseRings", _wrap_Geometry_CloseRings, METH_VARARGS, (char *)"\n"
   21204                 :     "Geometry_CloseRings(Geometry self)\n"
   21205                 :     "\n"
   21206                 :     "void OGR_G_CloseRings(OGRGeometryH\n"
   21207                 :     "hGeom)\n"
   21208                 :     "\n"
   21209                 :     "Force rings to be closed.\n"
   21210                 :     "\n"
   21211                 :     "If this geometry, or any contained geometries has polygon rings that\n"
   21212                 :     "are not closed, they will be closed by adding the starting point at\n"
   21213                 :     "the end.\n"
   21214                 :     "\n"
   21215                 :     "Parameters:\n"
   21216                 :     "-----------\n"
   21217                 :     "\n"
   21218                 :     "hGeom:  handle to the geometry. \n"
   21219                 :     ""},
   21220                 :    { (char *)"Geometry_FlattenTo2D", _wrap_Geometry_FlattenTo2D, METH_VARARGS, (char *)"\n"
   21221                 :     "Geometry_FlattenTo2D(Geometry self)\n"
   21222                 :     "\n"
   21223                 :     "void\n"
   21224                 :     "OGR_G_FlattenTo2D(OGRGeometryH hGeom)\n"
   21225                 :     "\n"
   21226                 :     "Convert geometry to strictly 2D. In a sense this converts all Z\n"
   21227                 :     "coordinates to 0.0.\n"
   21228                 :     "\n"
   21229                 :     "This function is the same as the CPP method\n"
   21230                 :     "OGRGeometry::flattenTo2D().\n"
   21231                 :     "\n"
   21232                 :     "Parameters:\n"
   21233                 :     "-----------\n"
   21234                 :     "\n"
   21235                 :     "hGeom:  handle on the geometry to convert. \n"
   21236                 :     ""},
   21237                 :    { (char *)"Geometry_Segmentize", _wrap_Geometry_Segmentize, METH_VARARGS, (char *)"\n"
   21238                 :     "Geometry_Segmentize(Geometry self, double dfMaxLength)\n"
   21239                 :     "\n"
   21240                 :     "void OGR_G_Segmentize(OGRGeometryH\n"
   21241                 :     "hGeom, double dfMaxLength)\n"
   21242                 :     "\n"
   21243                 :     "Modify the geometry such it has no segment longer then the given\n"
   21244                 :     "distance.\n"
   21245                 :     "\n"
   21246                 :     "Interpolated points will have Z and M values (if needed) set to 0.\n"
   21247                 :     "Distance computation is performed in 2d only\n"
   21248                 :     "\n"
   21249                 :     "This function is the same as the CPP method OGRGeometry::segmentize().\n"
   21250                 :     "\n"
   21251                 :     "Parameters:\n"
   21252                 :     "-----------\n"
   21253                 :     "\n"
   21254                 :     "hGeom:  handle on the geometry to segmentize\n"
   21255                 :     "\n"
   21256                 :     "dfMaxLength:  the maximum distance between 2 points after\n"
   21257                 :     "segmentization \n"
   21258                 :     ""},
   21259                 :    { (char *)"Geometry_GetEnvelope", _wrap_Geometry_GetEnvelope, METH_VARARGS, (char *)"\n"
   21260                 :     "Geometry_GetEnvelope(Geometry self)\n"
   21261                 :     "\n"
   21262                 :     "void\n"
   21263                 :     "OGR_G_GetEnvelope(OGRGeometryH hGeom, OGREnvelope *psEnvelope)\n"
   21264                 :     "\n"
   21265                 :     "Computes and returns the bounding envelope for this geometry in the\n"
   21266                 :     "passed psEnvelope structure.\n"
   21267                 :     "\n"
   21268                 :     "This function is the same as the CPP method\n"
   21269                 :     "OGRGeometry::getEnvelope().\n"
   21270                 :     "\n"
   21271                 :     "Parameters:\n"
   21272                 :     "-----------\n"
   21273                 :     "\n"
   21274                 :     "hGeom:  handle of the geometry to get envelope from.\n"
   21275                 :     "\n"
   21276                 :     "psEnvelope:  the structure in which to place the results. \n"
   21277                 :     ""},
   21278                 :    { (char *)"Geometry_GetEnvelope3D", _wrap_Geometry_GetEnvelope3D, METH_VARARGS, (char *)"\n"
   21279                 :     "Geometry_GetEnvelope3D(Geometry self)\n"
   21280                 :     "\n"
   21281                 :     "void\n"
   21282                 :     "OGR_G_GetEnvelope3D(OGRGeometryH hGeom, OGREnvelope3D *psEnvelope)\n"
   21283                 :     "\n"
   21284                 :     "Computes and returns the bounding envelope (3D) for this geometry in\n"
   21285                 :     "the passed psEnvelope structure.\n"
   21286                 :     "\n"
   21287                 :     "This function is the same as the CPP method\n"
   21288                 :     "OGRGeometry::getEnvelope().\n"
   21289                 :     "\n"
   21290                 :     "Parameters:\n"
   21291                 :     "-----------\n"
   21292                 :     "\n"
   21293                 :     "hGeom:  handle of the geometry to get envelope from.\n"
   21294                 :     "\n"
   21295                 :     "psEnvelope:  the structure in which to place the results.\n"
   21296                 :     "\n"
   21297                 :     "OGR 1.9.0 \n"
   21298                 :     ""},
   21299                 :    { (char *)"Geometry_Centroid", _wrap_Geometry_Centroid, METH_VARARGS, (char *)"\n"
   21300                 :     "Geometry_Centroid(Geometry self) -> Geometry\n"
   21301                 :     "\n"
   21302                 :     "int OGR_G_Centroid(OGRGeometryH\n"
   21303                 :     "hGeom, OGRGeometryH hCentroidPoint)\n"
   21304                 :     "\n"
   21305                 :     "Compute the geometry centroid.\n"
   21306                 :     "\n"
   21307                 :     "The centroid location is applied to the passed in OGRPoint object. The\n"
   21308                 :     "centroid is not necessarily within the geometry.\n"
   21309                 :     "\n"
   21310                 :     "This method relates to the SFCOM ISurface::get_Centroid() method\n"
   21311                 :     "however the current implementation based on GEOS can operate on other\n"
   21312                 :     "geometry types such as multipoint, linestring, geometrycollection such\n"
   21313                 :     "as multipolygons. OGC SF SQL 1.1 defines the operation for surfaces\n"
   21314                 :     "(polygons). SQL/MM-Part 3 defines the operation for surfaces and\n"
   21315                 :     "multisurfaces (multipolygons).\n"
   21316                 :     "\n"
   21317                 :     "This function is the same as the C++ method OGRGeometry::Centroid().\n"
   21318                 :     "\n"
   21319                 :     "This function is built on the GEOS library, check it for the\n"
   21320                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   21321                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   21322                 :     "error.\n"
   21323                 :     "\n"
   21324                 :     "OGRERR_NONE on success or OGRERR_FAILURE on error. \n"
   21325                 :     ""},
   21326                 :    { (char *)"Geometry_PointOnSurface", _wrap_Geometry_PointOnSurface, METH_VARARGS, (char *)"Geometry_PointOnSurface(Geometry self) -> Geometry"},
   21327                 :    { (char *)"Geometry_WkbSize", _wrap_Geometry_WkbSize, METH_VARARGS, (char *)"\n"
   21328                 :     "Geometry_WkbSize(Geometry self) -> int\n"
   21329                 :     "\n"
   21330                 :     "int OGR_G_WkbSize(OGRGeometryH hGeom)\n"
   21331                 :     "\n"
   21332                 :     "Returns size of related binary representation.\n"
   21333                 :     "\n"
   21334                 :     "This function returns the exact number of bytes required to hold the\n"
   21335                 :     "well known binary representation of this geometry object. Its\n"
   21336                 :     "computation may be slightly expensive for complex geometries.\n"
   21337                 :     "\n"
   21338                 :     "This function relates to the SFCOM IWks::WkbSize() method.\n"
   21339                 :     "\n"
   21340                 :     "This function is the same as the CPP method OGRGeometry::WkbSize().\n"
   21341                 :     "\n"
   21342                 :     "Parameters:\n"
   21343                 :     "-----------\n"
   21344                 :     "\n"
   21345                 :     "hGeom:  handle on the geometry to get the binary size from.\n"
   21346                 :     "\n"
   21347                 :     "size of binary representation in bytes. \n"
   21348                 :     ""},
   21349                 :    { (char *)"Geometry_GetCoordinateDimension", _wrap_Geometry_GetCoordinateDimension, METH_VARARGS, (char *)"\n"
   21350                 :     "Geometry_GetCoordinateDimension(Geometry self) -> int\n"
   21351                 :     "\n"
   21352                 :     "int\n"
   21353                 :     "OGR_G_GetCoordinateDimension(OGRGeometryH hGeom)\n"
   21354                 :     "\n"
   21355                 :     "Get the dimension of the coordinates in this geometry.\n"
   21356                 :     "\n"
   21357                 :     "This function corresponds to the SFCOM IGeometry::GetDimension()\n"
   21358                 :     "method.\n"
   21359                 :     "\n"
   21360                 :     "This function is the same as the CPP method\n"
   21361                 :     "OGRGeometry::getCoordinateDimension().\n"
   21362                 :     "\n"
   21363                 :     "Parameters:\n"
   21364                 :     "-----------\n"
   21365                 :     "\n"
   21366                 :     "hGeom:  handle on the geometry to get the dimension of the coordinates\n"
   21367                 :     "from.\n"
   21368                 :     "\n"
   21369                 :     "in practice this will return 2 or 3. It can also return 0 in the case\n"
   21370                 :     "of an empty point. \n"
   21371                 :     ""},
   21372                 :    { (char *)"Geometry_SetCoordinateDimension", _wrap_Geometry_SetCoordinateDimension, METH_VARARGS, (char *)"\n"
   21373                 :     "Geometry_SetCoordinateDimension(Geometry self, int dimension)\n"
   21374                 :     "\n"
   21375                 :     "void\n"
   21376                 :     "OGR_G_SetCoordinateDimension(OGRGeometryH hGeom, int nNewDimension)\n"
   21377                 :     "\n"
   21378                 :     "Set the coordinate dimension.\n"
   21379                 :     "\n"
   21380                 :     "This method sets the explicit coordinate dimension. Setting the\n"
   21381                 :     "coordinate dimension of a geometry to 2 should zero out any existing Z\n"
   21382                 :     "values. Setting the dimension of a geometry collection will not\n"
   21383                 :     "necessarily affect the children geometries.\n"
   21384                 :     "\n"
   21385                 :     "Parameters:\n"
   21386                 :     "-----------\n"
   21387                 :     "\n"
   21388                 :     "hGeom:  handle on the geometry to set the dimension of the\n"
   21389                 :     "coordinates.\n"
   21390                 :     "\n"
   21391                 :     "nNewDimension:  New coordinate dimension value, either 2 or 3. \n"
   21392                 :     ""},
   21393                 :    { (char *)"Geometry_GetDimension", _wrap_Geometry_GetDimension, METH_VARARGS, (char *)"\n"
   21394                 :     "Geometry_GetDimension(Geometry self) -> int\n"
   21395                 :     "\n"
   21396                 :     "int\n"
   21397                 :     "OGR_G_GetDimension(OGRGeometryH hGeom)\n"
   21398                 :     "\n"
   21399                 :     "Get the dimension of this geometry.\n"
   21400                 :     "\n"
   21401                 :     "This function corresponds to the SFCOM IGeometry::GetDimension()\n"
   21402                 :     "method. It indicates the dimension of the geometry, but does not\n"
   21403                 :     "indicate the dimension of the underlying space (as indicated by\n"
   21404                 :     "OGR_G_GetCoordinateDimension() function).\n"
   21405                 :     "\n"
   21406                 :     "This function is the same as the CPP method\n"
   21407                 :     "OGRGeometry::getDimension().\n"
   21408                 :     "\n"
   21409                 :     "Parameters:\n"
   21410                 :     "-----------\n"
   21411                 :     "\n"
   21412                 :     "hGeom:  handle on the geometry to get the dimension from.\n"
   21413                 :     "\n"
   21414                 :     "0 for points, 1 for lines and 2 for surfaces. \n"
   21415                 :     ""},
   21416                 :    { (char *)"Geometry_swigregister", Geometry_swigregister, METH_VARARGS, NULL},
   21417                 :    { (char *)"GetDriverCount", _wrap_GetDriverCount, METH_VARARGS, (char *)"GetDriverCount() -> int"},
   21418                 :    { (char *)"GetOpenDSCount", _wrap_GetOpenDSCount, METH_VARARGS, (char *)"GetOpenDSCount() -> int"},
   21419                 :    { (char *)"SetGenerate_DB2_V72_BYTE_ORDER", _wrap_SetGenerate_DB2_V72_BYTE_ORDER, METH_VARARGS, (char *)"SetGenerate_DB2_V72_BYTE_ORDER(int bGenerate_DB2_V72_BYTE_ORDER) -> OGRErr"},
   21420                 :    { (char *)"RegisterAll", _wrap_RegisterAll, METH_VARARGS, (char *)"RegisterAll()"},
   21421                 :    { (char *)"GeometryTypeToName", _wrap_GeometryTypeToName, METH_VARARGS, (char *)"GeometryTypeToName(OGRwkbGeometryType eType) -> char"},
   21422                 :    { (char *)"GetFieldTypeName", _wrap_GetFieldTypeName, METH_VARARGS, (char *)"GetFieldTypeName(OGRFieldType type) -> char"},
   21423                 :    { (char *)"GetOpenDS", _wrap_GetOpenDS, METH_VARARGS, (char *)"GetOpenDS(int ds_number) -> DataSource"},
   21424                 :    { (char *)"Open", (PyCFunction) _wrap_Open, METH_VARARGS | METH_KEYWORDS, (char *)"Open(char utf8_path, int update = 0) -> DataSource"},
   21425                 :    { (char *)"OpenShared", (PyCFunction) _wrap_OpenShared, METH_VARARGS | METH_KEYWORDS, (char *)"OpenShared(char utf8_path, int update = 0) -> DataSource"},
   21426                 :    { (char *)"GetDriverByName", _wrap_GetDriverByName, METH_VARARGS, (char *)"GetDriverByName(char name) -> Driver"},
   21427                 :    { (char *)"GetDriver", _wrap_GetDriver, METH_VARARGS, (char *)"GetDriver(int driver_number) -> Driver"},
   21428                 :    { (char *)"GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, (char *)"GeneralCmdLineProcessor(char papszArgv, int nOptions = 0) -> char"},
   21429                 :    { (char *)"TermProgress_nocb", (PyCFunction) _wrap_TermProgress_nocb, METH_VARARGS | METH_KEYWORDS, (char *)"TermProgress_nocb(double dfProgress, char pszMessage = None, void pData = None) -> int"},
   21430                 :    { NULL, NULL, 0, NULL }
   21431                 : };
   21432                 : 
   21433                 : 
   21434                 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
   21435                 : 
   21436                 : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
   21437                 : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
   21438                 : static swig_type_info _swigt__p_OGRDataSourceShadow = {"_p_OGRDataSourceShadow", "OGRDataSourceShadow *", 0, 0, (void*)0, 0};
   21439                 : static swig_type_info _swigt__p_OGRDriverShadow = {"_p_OGRDriverShadow", "OGRDriverShadow *", 0, 0, (void*)0, 0};
   21440                 : static swig_type_info _swigt__p_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, (void*)0, 0};
   21441                 : static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
   21442                 : static swig_type_info _swigt__p_OGRFieldDefnShadow = {"_p_OGRFieldDefnShadow", "OGRFieldDefnShadow *", 0, 0, (void*)0, 0};
   21443                 : static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
   21444                 : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
   21445                 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
   21446                 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
   21447                 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
   21448                 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
   21449                 : 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};
   21450                 : static swig_type_info _swigt__p_int = {"_p_int", "OGRFieldType *|int *|OGRwkbGeometryType *|OGRJustification *|OGRwkbByteOrder *|OGRErr *", 0, 0, (void*)0, 0};
   21451                 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
   21452                 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
   21453                 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
   21454                 : 
   21455                 : static swig_type_info *swig_type_initial[] = {
   21456                 :   &_swigt__p_GDALProgressFunc,
   21457                 :   &_swigt__p_GIntBig,
   21458                 :   &_swigt__p_OGRDataSourceShadow,
   21459                 :   &_swigt__p_OGRDriverShadow,
   21460                 :   &_swigt__p_OGRFeatureDefnShadow,
   21461                 :   &_swigt__p_OGRFeatureShadow,
   21462                 :   &_swigt__p_OGRFieldDefnShadow,
   21463                 :   &_swigt__p_OGRGeometryShadow,
   21464                 :   &_swigt__p_OGRLayerShadow,
   21465                 :   &_swigt__p_OSRCoordinateTransformationShadow,
   21466                 :   &_swigt__p_OSRSpatialReferenceShadow,
   21467                 :   &_swigt__p_char,
   21468                 :   &_swigt__p_double,
   21469                 :   &_swigt__p_f_double_p_q_const__char_p_void__int,
   21470                 :   &_swigt__p_int,
   21471                 :   &_swigt__p_p_char,
   21472                 :   &_swigt__p_p_double,
   21473                 :   &_swigt__p_p_int,
   21474                 : };
   21475                 : 
   21476                 : static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
   21477                 : static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
   21478                 : static swig_cast_info _swigc__p_OGRDataSourceShadow[] = {  {&_swigt__p_OGRDataSourceShadow, 0, 0, 0},{0, 0, 0, 0}};
   21479                 : static swig_cast_info _swigc__p_OGRDriverShadow[] = {  {&_swigt__p_OGRDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
   21480                 : static swig_cast_info _swigc__p_OGRFeatureDefnShadow[] = {  {&_swigt__p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
   21481                 : static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
   21482                 : static swig_cast_info _swigc__p_OGRFieldDefnShadow[] = {  {&_swigt__p_OGRFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
   21483                 : static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
   21484                 : static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   21485                 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = {  {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
   21486                 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   21487                 : static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
   21488                 : static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
   21489                 : 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}};
   21490                 : static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
   21491                 : static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
   21492                 : static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
   21493                 : static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
   21494                 : 
   21495                 : static swig_cast_info *swig_cast_initial[] = {
   21496                 :   _swigc__p_GDALProgressFunc,
   21497                 :   _swigc__p_GIntBig,
   21498                 :   _swigc__p_OGRDataSourceShadow,
   21499                 :   _swigc__p_OGRDriverShadow,
   21500                 :   _swigc__p_OGRFeatureDefnShadow,
   21501                 :   _swigc__p_OGRFeatureShadow,
   21502                 :   _swigc__p_OGRFieldDefnShadow,
   21503                 :   _swigc__p_OGRGeometryShadow,
   21504                 :   _swigc__p_OGRLayerShadow,
   21505                 :   _swigc__p_OSRCoordinateTransformationShadow,
   21506                 :   _swigc__p_OSRSpatialReferenceShadow,
   21507                 :   _swigc__p_char,
   21508                 :   _swigc__p_double,
   21509                 :   _swigc__p_f_double_p_q_const__char_p_void__int,
   21510                 :   _swigc__p_int,
   21511                 :   _swigc__p_p_char,
   21512                 :   _swigc__p_p_double,
   21513                 :   _swigc__p_p_int,
   21514                 : };
   21515                 : 
   21516                 : 
   21517                 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
   21518                 : 
   21519                 : static swig_const_info swig_const_table[] = {
   21520                 : { 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 },
   21521                 : {0, 0, 0, 0.0, 0, 0}};
   21522                 : 
   21523                 : #ifdef __cplusplus
   21524                 : }
   21525                 : #endif
   21526                 : /* -----------------------------------------------------------------------------
   21527                 :  * Type initialization:
   21528                 :  * This problem is tough by the requirement that no dynamic 
   21529                 :  * memory is used. Also, since swig_type_info structures store pointers to 
   21530                 :  * swig_cast_info structures and swig_cast_info structures store pointers back
   21531                 :  * to swig_type_info structures, we need some lookup code at initialization. 
   21532                 :  * The idea is that swig generates all the structures that are needed. 
   21533                 :  * The runtime then collects these partially filled structures. 
   21534                 :  * The SWIG_InitializeModule function takes these initial arrays out of 
   21535                 :  * swig_module, and does all the lookup, filling in the swig_module.types
   21536                 :  * array with the correct data and linking the correct swig_cast_info
   21537                 :  * structures together.
   21538                 :  *
   21539                 :  * The generated swig_type_info structures are assigned staticly to an initial 
   21540                 :  * array. We just loop through that array, and handle each type individually.
   21541                 :  * First we lookup if this type has been already loaded, and if so, use the
   21542                 :  * loaded structure instead of the generated one. Then we have to fill in the
   21543                 :  * cast linked list. The cast data is initially stored in something like a
   21544                 :  * two-dimensional array. Each row corresponds to a type (there are the same
   21545                 :  * number of rows as there are in the swig_type_initial array). Each entry in
   21546                 :  * a column is one of the swig_cast_info structures for that type.
   21547                 :  * The cast_initial array is actually an array of arrays, because each row has
   21548                 :  * a variable number of columns. So to actually build the cast linked list,
   21549                 :  * we find the array of casts associated with the type, and loop through it 
   21550                 :  * adding the casts to the list. The one last trick we need to do is making
   21551                 :  * sure the type pointer in the swig_cast_info struct is correct.
   21552                 :  *
   21553                 :  * First off, we lookup the cast->type name to see if it is already loaded. 
   21554                 :  * There are three cases to handle:
   21555                 :  *  1) If the cast->type has already been loaded AND the type we are adding
   21556                 :  *     casting info to has not been loaded (it is in this module), THEN we
   21557                 :  *     replace the cast->type pointer with the type pointer that has already
   21558                 :  *     been loaded.
   21559                 :  *  2) If BOTH types (the one we are adding casting info to, and the 
   21560                 :  *     cast->type) are loaded, THEN the cast info has already been loaded by
   21561                 :  *     the previous module so we just ignore it.
   21562                 :  *  3) Finally, if cast->type has not already been loaded, then we add that
   21563                 :  *     swig_cast_info to the linked list (because the cast->type) pointer will
   21564                 :  *     be correct.
   21565                 :  * ----------------------------------------------------------------------------- */
   21566                 : 
   21567                 : #ifdef __cplusplus
   21568                 : extern "C" {
   21569                 : #if 0
   21570                 : } /* c-mode */
   21571                 : #endif
   21572                 : #endif
   21573                 : 
   21574                 : #if 0
   21575                 : #define SWIGRUNTIME_DEBUG
   21576                 : #endif
   21577                 : 
   21578                 : 
   21579                 : SWIGRUNTIME void
   21580               2 : SWIG_InitializeModule(void *clientdata) {
   21581                 :   size_t i;
   21582                 :   swig_module_info *module_head, *iter;
   21583                 :   int found, init;
   21584                 :   
   21585               2 :   clientdata = clientdata;
   21586                 :   
   21587                 :   /* check to see if the circular list has been setup, if not, set it up */
   21588               2 :   if (swig_module.next==0) {
   21589                 :     /* Initialize the swig_module */
   21590               2 :     swig_module.type_initial = swig_type_initial;
   21591               2 :     swig_module.cast_initial = swig_cast_initial;
   21592               2 :     swig_module.next = &swig_module;
   21593               2 :     init = 1;
   21594                 :   } else {
   21595               0 :     init = 0;
   21596                 :   }
   21597                 :   
   21598                 :   /* Try and load any already created modules */
   21599               2 :   module_head = SWIG_GetModule(clientdata);
   21600               2 :   if (!module_head) {
   21601                 :     /* This is the first module loaded for this interpreter */
   21602                 :     /* so set the swig module into the interpreter */
   21603                 :     SWIG_SetModule(clientdata, &swig_module);
   21604               0 :     module_head = &swig_module;
   21605                 :   } else {
   21606                 :     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
   21607               2 :     found=0;
   21608               2 :     iter=module_head;
   21609               4 :     do {
   21610               4 :       if (iter==&swig_module) {
   21611               0 :         found=1;
   21612               0 :         break;
   21613                 :       }
   21614               4 :       iter=iter->next;
   21615                 :     } while (iter!= module_head);
   21616                 :     
   21617                 :     /* if the is found in the list, then all is done and we may leave */
   21618               2 :     if (found) return;
   21619                 :     /* otherwise we must add out module into the list */
   21620               2 :     swig_module.next = module_head->next;
   21621               2 :     module_head->next = &swig_module;
   21622                 :   }
   21623                 :   
   21624                 :   /* When multiple interpeters are used, a module could have already been initialized in
   21625                 :        a different interpreter, but not yet have a pointer in this interpreter.
   21626                 :        In this case, we do not want to continue adding types... everything should be
   21627                 :        set up already */
   21628               2 :   if (init == 0) return;
   21629                 :   
   21630                 :   /* Now work on filling in swig_module.types */
   21631                 : #ifdef SWIGRUNTIME_DEBUG
   21632                 :   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
   21633                 : #endif
   21634              38 :   for (i = 0; i < swig_module.size; ++i) {
   21635              36 :     swig_type_info *type = 0;
   21636                 :     swig_type_info *ret;
   21637                 :     swig_cast_info *cast;
   21638                 :     
   21639                 : #ifdef SWIGRUNTIME_DEBUG
   21640                 :     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
   21641                 : #endif
   21642                 :     
   21643                 :     /* if there is another module already loaded */
   21644              36 :     if (swig_module.next != &swig_module) {
   21645              36 :       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
   21646                 :     }
   21647              36 :     if (type) {
   21648                 :       /* Overwrite clientdata field */
   21649                 : #ifdef SWIGRUNTIME_DEBUG
   21650                 :       printf("SWIG_InitializeModule: found type %s\n", type->name);
   21651                 : #endif
   21652              21 :       if (swig_module.type_initial[i]->clientdata) {
   21653               0 :         type->clientdata = swig_module.type_initial[i]->clientdata;
   21654                 : #ifdef SWIGRUNTIME_DEBUG
   21655                 :         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
   21656                 : #endif
   21657                 :       }
   21658                 :     } else {
   21659              15 :       type = swig_module.type_initial[i];
   21660                 :     }
   21661                 :     
   21662                 :     /* Insert casting types */
   21663              36 :     cast = swig_module.cast_initial[i];
   21664             108 :     while (cast->type) {
   21665                 :       /* Don't need to add information already in the list */
   21666              36 :       ret = 0;
   21667                 : #ifdef SWIGRUNTIME_DEBUG
   21668                 :       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
   21669                 : #endif
   21670              36 :       if (swig_module.next != &swig_module) {
   21671              36 :         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
   21672                 : #ifdef SWIGRUNTIME_DEBUG
   21673                 :         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
   21674                 : #endif
   21675                 :       }
   21676              36 :       if (ret) {
   21677              21 :         if (type == swig_module.type_initial[i]) {
   21678                 : #ifdef SWIGRUNTIME_DEBUG
   21679                 :           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
   21680                 : #endif
   21681               0 :           cast->type = ret;
   21682               0 :           ret = 0;
   21683                 :         } else {
   21684                 :           /* Check for casting already in the list */
   21685              21 :           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
   21686                 : #ifdef SWIGRUNTIME_DEBUG
   21687                 :           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
   21688                 : #endif
   21689              21 :           if (!ocast) ret = 0;
   21690                 :         }
   21691                 :       }
   21692                 :       
   21693              36 :       if (!ret) {
   21694                 : #ifdef SWIGRUNTIME_DEBUG
   21695                 :         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
   21696                 : #endif
   21697              15 :         if (type->cast) {
   21698               0 :           type->cast->prev = cast;
   21699               0 :           cast->next = type->cast;
   21700                 :         }
   21701              15 :         type->cast = cast;
   21702                 :       }
   21703              36 :       cast++;
   21704                 :     }
   21705                 :     /* Set entry in modules->types array equal to the type */
   21706              36 :     swig_module.types[i] = type;
   21707                 :   }
   21708               2 :   swig_module.types[i] = 0;
   21709                 :   
   21710                 : #ifdef SWIGRUNTIME_DEBUG
   21711                 :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   21712                 :   for (i = 0; i < swig_module.size; ++i) {
   21713                 :     int j = 0;
   21714                 :     swig_cast_info *cast = swig_module.cast_initial[i];
   21715                 :     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
   21716                 :     while (cast->type) {
   21717                 :       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
   21718                 :       cast++;
   21719                 :       ++j;
   21720                 :     }
   21721                 :     printf("---- Total casts: %d\n",j);
   21722                 :   }
   21723                 :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   21724                 : #endif
   21725                 : }
   21726                 : 
   21727                 : /* This function will propagate the clientdata field of type to
   21728                 : * any new swig_type_info structures that have been added into the list
   21729                 : * of equivalent types.  It is like calling
   21730                 : * SWIG_TypeClientData(type, clientdata) a second time.
   21731                 : */
   21732                 : SWIGRUNTIME void
   21733                 : SWIG_PropagateClientData(void) {
   21734                 :   size_t i;
   21735                 :   swig_cast_info *equiv;
   21736                 :   static int init_run = 0;
   21737                 :   
   21738                 :   if (init_run) return;
   21739                 :   init_run = 1;
   21740                 :   
   21741                 :   for (i = 0; i < swig_module.size; i++) {
   21742                 :     if (swig_module.types[i]->clientdata) {
   21743                 :       equiv = swig_module.types[i]->cast;
   21744                 :       while (equiv) {
   21745                 :         if (!equiv->converter) {
   21746                 :           if (equiv->type && !equiv->type->clientdata)
   21747                 :           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
   21748                 :         }
   21749                 :         equiv = equiv->next;
   21750                 :       }
   21751                 :     }
   21752                 :   }
   21753                 : }
   21754                 : 
   21755                 : #ifdef __cplusplus
   21756                 : #if 0
   21757                 : {
   21758                 :   /* c-mode */
   21759                 : #endif
   21760                 : }
   21761                 : #endif
   21762                 : 
   21763                 : 
   21764                 : 
   21765                 : #ifdef __cplusplus
   21766                 : extern "C" {
   21767                 : #endif
   21768                 :   
   21769                 :   /* Python-specific SWIG API */
   21770                 : #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
   21771                 : #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
   21772                 : #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
   21773                 :   
   21774                 :   /* -----------------------------------------------------------------------------
   21775                 :    * global variable support code.
   21776                 :    * ----------------------------------------------------------------------------- */
   21777                 :   
   21778                 :   typedef struct swig_globalvar {
   21779                 :     char       *name;                  /* Name of global variable */
   21780                 :     PyObject *(*get_attr)(void);       /* Return the current value */
   21781                 :     int       (*set_attr)(PyObject *); /* Set the value */
   21782                 :     struct swig_globalvar *next;
   21783                 :   } swig_globalvar;
   21784                 :   
   21785                 :   typedef struct swig_varlinkobject {
   21786                 :     PyObject_HEAD
   21787                 :     swig_globalvar *vars;
   21788                 :   } swig_varlinkobject;
   21789                 :   
   21790                 :   SWIGINTERN PyObject *
   21791                 :   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
   21792                 : #if PY_VERSION_HEX >= 0x03000000
   21793                 :     return PyUnicode_InternFromString("<Swig global variables>");
   21794                 : #else
   21795                 :     return PyString_FromString("<Swig global variables>");
   21796                 : #endif
   21797                 :   }
   21798                 :   
   21799                 :   SWIGINTERN PyObject *
   21800                 :   swig_varlink_str(swig_varlinkobject *v) {
   21801                 : #if PY_VERSION_HEX >= 0x03000000
   21802                 :     PyObject *str = PyUnicode_InternFromString("(");
   21803                 :     PyObject *tail;
   21804                 :     PyObject *joined;
   21805                 :     swig_globalvar *var;
   21806                 :     for (var = v->vars; var; var=var->next) {
   21807                 :       tail = PyUnicode_FromString(var->name);
   21808                 :       joined = PyUnicode_Concat(str, tail);
   21809                 :       Py_DecRef(str);
   21810                 :       Py_DecRef(tail);
   21811                 :       str = joined;
   21812                 :       if (var->next) {
   21813                 :         tail = PyUnicode_InternFromString(", ");
   21814                 :         joined = PyUnicode_Concat(str, tail);
   21815                 :         Py_DecRef(str);
   21816                 :         Py_DecRef(tail);
   21817                 :         str = joined;
   21818                 :       }
   21819                 :     }
   21820                 :     tail = PyUnicode_InternFromString(")");
   21821                 :     joined = PyUnicode_Concat(str, tail);
   21822                 :     Py_DecRef(str);
   21823                 :     Py_DecRef(tail);
   21824                 :     str = joined;
   21825                 : #else
   21826                 :     PyObject *str = PyString_FromString("(");
   21827                 :     swig_globalvar *var;
   21828                 :     for (var = v->vars; var; var=var->next) {
   21829                 :       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
   21830                 :       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
   21831                 :     }
   21832                 :     PyString_ConcatAndDel(&str,PyString_FromString(")"));
   21833                 : #endif
   21834                 :     return str;
   21835                 :   }
   21836                 :   
   21837                 :   SWIGINTERN int
   21838                 :   swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
   21839                 :     char *tmp;
   21840                 :     PyObject *str = swig_varlink_str(v);
   21841                 :     fprintf(fp,"Swig global variables ");
   21842                 :     fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
   21843                 :     SWIG_Python_str_DelForPy3(tmp);
   21844                 :     Py_DECREF(str);
   21845                 :     return 0;
   21846                 :   }
   21847                 :   
   21848                 :   SWIGINTERN void
   21849                 :   swig_varlink_dealloc(swig_varlinkobject *v) {
   21850                 :     swig_globalvar *var = v->vars;
   21851                 :     while (var) {
   21852                 :       swig_globalvar *n = var->next;
   21853                 :       free(var->name);
   21854                 :       free(var);
   21855                 :       var = n;
   21856                 :     }
   21857                 :   }
   21858                 :   
   21859                 :   SWIGINTERN PyObject *
   21860                 :   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
   21861                 :     PyObject *res = NULL;
   21862                 :     swig_globalvar *var = v->vars;
   21863                 :     while (var) {
   21864                 :       if (strcmp(var->name,n) == 0) {
   21865                 :         res = (*var->get_attr)();
   21866                 :         break;
   21867                 :       }
   21868                 :       var = var->next;
   21869                 :     }
   21870                 :     if (res == NULL && !PyErr_Occurred()) {
   21871                 :       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
   21872                 :     }
   21873                 :     return res;
   21874                 :   }
   21875                 :   
   21876                 :   SWIGINTERN int
   21877                 :   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
   21878                 :     int res = 1;
   21879                 :     swig_globalvar *var = v->vars;
   21880                 :     while (var) {
   21881                 :       if (strcmp(var->name,n) == 0) {
   21882                 :         res = (*var->set_attr)(p);
   21883                 :         break;
   21884                 :       }
   21885                 :       var = var->next;
   21886                 :     }
   21887                 :     if (res == 1 && !PyErr_Occurred()) {
   21888                 :       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
   21889                 :     }
   21890                 :     return res;
   21891                 :   }
   21892                 :   
   21893                 :   SWIGINTERN PyTypeObject*
   21894                 :   swig_varlink_type(void) {
   21895                 :     static char varlink__doc__[] = "Swig var link object";
   21896                 :     static PyTypeObject varlink_type;
   21897                 :     static int type_init = 0;  
   21898                 :     if (!type_init) {
   21899                 :       const PyTypeObject tmp
   21900                 :       = {
   21901                 :         /* PyObject header changed in Python 3 */
   21902                 : #if PY_VERSION_HEX >= 0x03000000
   21903                 :         PyVarObject_HEAD_INIT(&PyType_Type, 0)
   21904                 : #else
   21905                 :         PyObject_HEAD_INIT(NULL)
   21906                 :         0,                                  /* Number of items in variable part (ob_size) */
   21907                 : #endif
   21908                 :         (char *)"swigvarlink",              /* Type name (tp_name) */
   21909                 :         sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
   21910                 :         0,                                  /* Itemsize (tp_itemsize) */
   21911                 :         (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
   21912                 :         (printfunc) swig_varlink_print,     /* Print (tp_print) */
   21913                 :         (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
   21914                 :         (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
   21915                 :         0,                                  /* tp_compare */
   21916                 :         (reprfunc) swig_varlink_repr,       /* tp_repr */
   21917                 :         0,                                  /* tp_as_number */
   21918                 :         0,                                  /* tp_as_sequence */
   21919                 :         0,                                  /* tp_as_mapping */
   21920                 :         0,                                  /* tp_hash */
   21921                 :         0,                                  /* tp_call */
   21922                 :         (reprfunc) swig_varlink_str,        /* tp_str */
   21923                 :         0,                                  /* tp_getattro */
   21924                 :         0,                                  /* tp_setattro */
   21925                 :         0,                                  /* tp_as_buffer */
   21926                 :         0,                                  /* tp_flags */
   21927                 :         varlink__doc__,                     /* tp_doc */
   21928                 :         0,                                  /* tp_traverse */
   21929                 :         0,                                  /* tp_clear */
   21930                 :         0,                                  /* tp_richcompare */
   21931                 :         0,                                  /* tp_weaklistoffset */
   21932                 : #if PY_VERSION_HEX >= 0x02020000
   21933                 :         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
   21934                 : #endif
   21935                 : #if PY_VERSION_HEX >= 0x02030000
   21936                 :         0,                                  /* tp_del */
   21937                 : #endif
   21938                 : #ifdef COUNT_ALLOCS
   21939                 :         0,0,0,0                             /* tp_alloc -> tp_next */
   21940                 : #endif
   21941                 :       };
   21942                 :       varlink_type = tmp;
   21943                 :       /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
   21944                 : #if PY_VERSION_HEX < 0x03000000
   21945                 :       varlink_type.ob_type = &PyType_Type;
   21946                 : #endif
   21947                 :       type_init = 1;
   21948                 :     }
   21949                 :     return &varlink_type;
   21950                 :   }
   21951                 :   
   21952                 :   /* Create a variable linking object for use later */
   21953                 :   SWIGINTERN PyObject *
   21954                 :   SWIG_Python_newvarlink(void) {
   21955                 :     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
   21956                 :     if (result) {
   21957                 :       result->vars = 0;
   21958                 :     }
   21959                 :     return ((PyObject*) result);
   21960                 :   }
   21961                 :   
   21962                 :   SWIGINTERN void 
   21963                 :   SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
   21964                 :     swig_varlinkobject *v = (swig_varlinkobject *) p;
   21965                 :     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
   21966                 :     if (gv) {
   21967                 :       size_t size = strlen(name)+1;
   21968                 :       gv->name = (char *)malloc(size);
   21969                 :       if (gv->name) {
   21970                 :         strncpy(gv->name,name,size);
   21971                 :         gv->get_attr = get_attr;
   21972                 :         gv->set_attr = set_attr;
   21973                 :         gv->next = v->vars;
   21974                 :       }
   21975                 :     }
   21976                 :     v->vars = gv;
   21977                 :   }
   21978                 :   
   21979                 :   SWIGINTERN PyObject *
   21980                 :   SWIG_globals(void) {
   21981                 :     static PyObject *_SWIG_globals = 0; 
   21982                 :     if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
   21983                 :     return _SWIG_globals;
   21984                 :   }
   21985                 :   
   21986                 :   /* -----------------------------------------------------------------------------
   21987                 :    * constants/methods manipulation
   21988                 :    * ----------------------------------------------------------------------------- */
   21989                 :   
   21990                 :   /* Install Constants */
   21991                 :   SWIGINTERN void
   21992               2 :   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
   21993               2 :     PyObject *obj = 0;
   21994                 :     size_t i;
   21995               4 :     for (i = 0; constants[i].type; ++i) {
   21996               2 :       switch(constants[i].type) {
   21997                 :       case SWIG_PY_POINTER:
   21998               2 :         obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
   21999               2 :         break;
   22000                 :       case SWIG_PY_BINARY:
   22001               0 :         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
   22002               0 :         break;
   22003                 :       default:
   22004               0 :         obj = 0;
   22005                 :         break;
   22006                 :       }
   22007               2 :       if (obj) {
   22008               2 :         PyDict_SetItemString(d, constants[i].name, obj);
   22009               2 :         Py_DECREF(obj);
   22010                 :       }
   22011                 :     }
   22012               2 :   }
   22013                 :   
   22014                 :   /* -----------------------------------------------------------------------------*/
   22015                 :   /* Fix SwigMethods to carry the callback ptrs when needed */
   22016                 :   /* -----------------------------------------------------------------------------*/
   22017                 :   
   22018                 :   SWIGINTERN void
   22019               2 :   SWIG_Python_FixMethods(PyMethodDef *methods,
   22020                 :     swig_const_info *const_table,
   22021                 :     swig_type_info **types,
   22022                 :     swig_type_info **types_initial) {
   22023                 :     size_t i;
   22024             468 :     for (i = 0; methods[i].ml_name; ++i) {
   22025             466 :       const char *c = methods[i].ml_doc;
   22026             916 :       if (c && (c = strstr(c, "swig_ptr: "))) {
   22027                 :         int j;
   22028               0 :         swig_const_info *ci = 0;
   22029               0 :         const char *name = c + 10;
   22030               0 :         for (j = 0; const_table[j].type; ++j) {
   22031               0 :           if (strncmp(const_table[j].name, name, 
   22032               0 :               strlen(const_table[j].name)) == 0) {
   22033               0 :             ci = &(const_table[j]);
   22034               0 :             break;
   22035                 :           }
   22036                 :         }
   22037               0 :         if (ci) {
   22038               0 :           size_t shift = (ci->ptype) - types;
   22039               0 :           swig_type_info *ty = types_initial[shift];
   22040               0 :           size_t ldoc = (c - methods[i].ml_doc);
   22041               0 :           size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
   22042               0 :           char *ndoc = (char*)malloc(ldoc + lptr + 10);
   22043               0 :           if (ndoc) {
   22044               0 :             char *buff = ndoc;
   22045               0 :             void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
   22046               0 :             if (ptr) {
   22047               0 :               strncpy(buff, methods[i].ml_doc, ldoc);
   22048               0 :               buff += ldoc;
   22049                 :               strncpy(buff, "swig_ptr: ", 10);
   22050               0 :               buff += 10;
   22051               0 :               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
   22052               0 :               methods[i].ml_doc = ndoc;
   22053                 :             }
   22054                 :           }
   22055                 :         }
   22056                 :       }
   22057                 :     }
   22058               2 :   } 
   22059                 :   
   22060                 : #ifdef __cplusplus
   22061                 : }
   22062                 : #endif
   22063                 : 
   22064                 : /* -----------------------------------------------------------------------------*
   22065                 :  *  Partial Init method
   22066                 :  * -----------------------------------------------------------------------------*/
   22067                 : 
   22068                 : #ifdef __cplusplus
   22069                 : extern "C"
   22070                 : #endif
   22071                 : 
   22072                 : SWIGEXPORT 
   22073                 : #if PY_VERSION_HEX >= 0x03000000
   22074                 : PyObject*
   22075                 : #else
   22076                 : void
   22077                 : #endif
   22078               2 : SWIG_init(void) {
   22079                 :   PyObject *m, *d;  
   22080                 : #if PY_VERSION_HEX >= 0x03000000
   22081                 :   static struct PyModuleDef SWIG_module = {
   22082                 :     PyModuleDef_HEAD_INIT,
   22083                 :     (char *) SWIG_name,
   22084                 :     NULL,
   22085                 :     -1,
   22086                 :     SwigMethods,
   22087                 :     NULL,
   22088                 :     NULL,
   22089                 :     NULL,
   22090                 :     NULL
   22091                 :   };
   22092                 : #endif
   22093                 :   
   22094                 :   /* Fix SwigMethods to carry the callback ptrs when needed */
   22095               2 :   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   22096                 :   
   22097                 : #if PY_VERSION_HEX >= 0x03000000
   22098                 :   m = PyModule_Create(&SWIG_module);
   22099                 : #else
   22100               2 :   m = Py_InitModule((char *) SWIG_name, SwigMethods);
   22101                 : #endif
   22102               2 :   d = PyModule_GetDict(m);
   22103                 :   
   22104               2 :   SWIG_InitializeModule(0);
   22105               2 :   SWIG_InstallConstants(d,swig_const_table);
   22106                 :   
   22107                 :   
   22108               2 :   SWIG_Python_SetConstant(d, "wkb25DBit",SWIG_From_int(static_cast< int >(0x80000000)));
   22109               2 :   SWIG_Python_SetConstant(d, "wkb25Bit",SWIG_From_int(static_cast< int >(0x80000000)));
   22110               2 :   SWIG_Python_SetConstant(d, "wkbUnknown",SWIG_From_int(static_cast< int >(0)));
   22111               2 :   SWIG_Python_SetConstant(d, "wkbPoint",SWIG_From_int(static_cast< int >(1)));
   22112               2 :   SWIG_Python_SetConstant(d, "wkbLineString",SWIG_From_int(static_cast< int >(2)));
   22113               2 :   SWIG_Python_SetConstant(d, "wkbPolygon",SWIG_From_int(static_cast< int >(3)));
   22114               2 :   SWIG_Python_SetConstant(d, "wkbMultiPoint",SWIG_From_int(static_cast< int >(4)));
   22115               2 :   SWIG_Python_SetConstant(d, "wkbMultiLineString",SWIG_From_int(static_cast< int >(5)));
   22116               2 :   SWIG_Python_SetConstant(d, "wkbMultiPolygon",SWIG_From_int(static_cast< int >(6)));
   22117               2 :   SWIG_Python_SetConstant(d, "wkbGeometryCollection",SWIG_From_int(static_cast< int >(7)));
   22118               2 :   SWIG_Python_SetConstant(d, "wkbNone",SWIG_From_int(static_cast< int >(100)));
   22119               2 :   SWIG_Python_SetConstant(d, "wkbLinearRing",SWIG_From_int(static_cast< int >(101)));
   22120               2 :   SWIG_Python_SetConstant(d, "wkbPoint25D",SWIG_From_int(static_cast< int >(wkbPoint+wkb25DBit)));
   22121               2 :   SWIG_Python_SetConstant(d, "wkbLineString25D",SWIG_From_int(static_cast< int >(wkbLineString+wkb25DBit)));
   22122               2 :   SWIG_Python_SetConstant(d, "wkbPolygon25D",SWIG_From_int(static_cast< int >(wkbPolygon+wkb25DBit)));
   22123               2 :   SWIG_Python_SetConstant(d, "wkbMultiPoint25D",SWIG_From_int(static_cast< int >(wkbMultiPoint+wkb25DBit)));
   22124               2 :   SWIG_Python_SetConstant(d, "wkbMultiLineString25D",SWIG_From_int(static_cast< int >(wkbMultiLineString+wkb25DBit)));
   22125               2 :   SWIG_Python_SetConstant(d, "wkbMultiPolygon25D",SWIG_From_int(static_cast< int >(wkbMultiPolygon+wkb25DBit)));
   22126               2 :   SWIG_Python_SetConstant(d, "wkbGeometryCollection25D",SWIG_From_int(static_cast< int >(wkbGeometryCollection+wkb25DBit)));
   22127               2 :   SWIG_Python_SetConstant(d, "OFTInteger",SWIG_From_int(static_cast< int >(0)));
   22128               2 :   SWIG_Python_SetConstant(d, "OFTIntegerList",SWIG_From_int(static_cast< int >(1)));
   22129               2 :   SWIG_Python_SetConstant(d, "OFTReal",SWIG_From_int(static_cast< int >(2)));
   22130               2 :   SWIG_Python_SetConstant(d, "OFTRealList",SWIG_From_int(static_cast< int >(3)));
   22131               2 :   SWIG_Python_SetConstant(d, "OFTString",SWIG_From_int(static_cast< int >(4)));
   22132               2 :   SWIG_Python_SetConstant(d, "OFTStringList",SWIG_From_int(static_cast< int >(5)));
   22133               2 :   SWIG_Python_SetConstant(d, "OFTWideString",SWIG_From_int(static_cast< int >(6)));
   22134               2 :   SWIG_Python_SetConstant(d, "OFTWideStringList",SWIG_From_int(static_cast< int >(7)));
   22135               2 :   SWIG_Python_SetConstant(d, "OFTBinary",SWIG_From_int(static_cast< int >(8)));
   22136               2 :   SWIG_Python_SetConstant(d, "OFTDate",SWIG_From_int(static_cast< int >(9)));
   22137               2 :   SWIG_Python_SetConstant(d, "OFTTime",SWIG_From_int(static_cast< int >(10)));
   22138               2 :   SWIG_Python_SetConstant(d, "OFTDateTime",SWIG_From_int(static_cast< int >(11)));
   22139               2 :   SWIG_Python_SetConstant(d, "OJUndefined",SWIG_From_int(static_cast< int >(0)));
   22140               2 :   SWIG_Python_SetConstant(d, "OJLeft",SWIG_From_int(static_cast< int >(1)));
   22141               2 :   SWIG_Python_SetConstant(d, "OJRight",SWIG_From_int(static_cast< int >(2)));
   22142               2 :   SWIG_Python_SetConstant(d, "wkbXDR",SWIG_From_int(static_cast< int >(0)));
   22143               2 :   SWIG_Python_SetConstant(d, "wkbNDR",SWIG_From_int(static_cast< int >(1)));
   22144               2 :   SWIG_Python_SetConstant(d, "NullFID",SWIG_From_int(static_cast< int >(-1)));
   22145               2 :   SWIG_Python_SetConstant(d, "ALTER_NAME_FLAG",SWIG_From_int(static_cast< int >(1)));
   22146               2 :   SWIG_Python_SetConstant(d, "ALTER_TYPE_FLAG",SWIG_From_int(static_cast< int >(2)));
   22147               2 :   SWIG_Python_SetConstant(d, "ALTER_WIDTH_PRECISION_FLAG",SWIG_From_int(static_cast< int >(4)));
   22148               2 :   SWIG_Python_SetConstant(d, "ALTER_ALL_FLAG",SWIG_From_int(static_cast< int >(1+2+4)));
   22149               2 :   SWIG_Python_SetConstant(d, "OLCRandomRead",SWIG_FromCharPtr("RandomRead"));
   22150               2 :   SWIG_Python_SetConstant(d, "OLCSequentialWrite",SWIG_FromCharPtr("SequentialWrite"));
   22151               2 :   SWIG_Python_SetConstant(d, "OLCRandomWrite",SWIG_FromCharPtr("RandomWrite"));
   22152               2 :   SWIG_Python_SetConstant(d, "OLCFastSpatialFilter",SWIG_FromCharPtr("FastSpatialFilter"));
   22153               2 :   SWIG_Python_SetConstant(d, "OLCFastFeatureCount",SWIG_FromCharPtr("FastFeatureCount"));
   22154               2 :   SWIG_Python_SetConstant(d, "OLCFastGetExtent",SWIG_FromCharPtr("FastGetExtent"));
   22155               2 :   SWIG_Python_SetConstant(d, "OLCCreateField",SWIG_FromCharPtr("CreateField"));
   22156               2 :   SWIG_Python_SetConstant(d, "OLCDeleteField",SWIG_FromCharPtr("DeleteField"));
   22157               2 :   SWIG_Python_SetConstant(d, "OLCReorderFields",SWIG_FromCharPtr("ReorderFields"));
   22158               2 :   SWIG_Python_SetConstant(d, "OLCAlterFieldDefn",SWIG_FromCharPtr("AlterFieldDefn"));
   22159               2 :   SWIG_Python_SetConstant(d, "OLCTransactions",SWIG_FromCharPtr("Transactions"));
   22160               2 :   SWIG_Python_SetConstant(d, "OLCDeleteFeature",SWIG_FromCharPtr("DeleteFeature"));
   22161               2 :   SWIG_Python_SetConstant(d, "OLCFastSetNextByIndex",SWIG_FromCharPtr("FastSetNextByIndex"));
   22162               2 :   SWIG_Python_SetConstant(d, "OLCStringsAsUTF8",SWIG_FromCharPtr("StringsAsUTF8"));
   22163               2 :   SWIG_Python_SetConstant(d, "OLCIgnoreFields",SWIG_FromCharPtr("IgnoreFields"));
   22164               2 :   SWIG_Python_SetConstant(d, "ODsCCreateLayer",SWIG_FromCharPtr("CreateLayer"));
   22165               2 :   SWIG_Python_SetConstant(d, "ODsCDeleteLayer",SWIG_FromCharPtr("DeleteLayer"));
   22166               2 :   SWIG_Python_SetConstant(d, "ODrCCreateDataSource",SWIG_FromCharPtr("CreateDataSource"));
   22167               2 :   SWIG_Python_SetConstant(d, "ODrCDeleteDataSource",SWIG_FromCharPtr("DeleteDataSource"));
   22168                 :   
   22169                 :   
   22170               2 :   if ( OGRGetDriverCount() == 0 ) {
   22171               2 :     OGRRegisterAll();
   22172                 :   }
   22173                 :   
   22174                 :   
   22175                 :   
   22176                 : #if PY_VERSION_HEX >= 0x03000000
   22177                 :   return m;
   22178                 : #else
   22179                 :   return;
   22180                 : #endif
   22181               4 : }
   22182                 : 

Generated by: LCOV version 1.7