LCOV - code coverage report
Current view: directory - swig/python/extensions - ogr_wrap.cpp (source / functions) Found Hit Coverage
Test: gdal_filtered.info Lines: 8403 5389 64.1 %
Date: 2011-12-18 Functions: 330 261 79.1 %

       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              10 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
     427              10 :   if (ty) {
     428              10 :     swig_cast_info *iter = ty->cast;
     429              20 :     while (iter) {
     430              10 :       if (strcmp(iter->type->name, c) == 0) {
     431              10 :         if (iter == ty->cast)
     432              10 :           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               7 : SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
     533               7 :   swig_cast_info *cast = ti->cast;
     534                 :   /* if (ti->clientdata == clientdata) return; */
     535               7 :   ti->clientdata = clientdata;
     536                 :   
     537              21 :   while (cast) {
     538               7 :     if (!cast->converter) {
     539               7 :       swig_type_info *tc = cast->type;
     540               7 :       if (!tc->clientdata) {
     541               0 :   SWIG_TypeClientData(tc, clientdata);
     542                 :       }
     543                 :     }    
     544               7 :     cast = cast->next;
     545                 :   }
     546               7 : }
     547                 : SWIGRUNTIME void
     548                 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
     549               7 :   SWIG_TypeClientData(ti, clientdata);
     550               7 :   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              33 : SWIG_MangledTypeQueryModule(swig_module_info *start, 
     563                 :                             swig_module_info *end, 
     564                 :                 const char *name) {
     565              33 :   swig_module_info *iter = start;
     566              48 :   do {
     567              69 :     if (iter->size) {
     568              69 :       register size_t l = 0;
     569              69 :       register size_t r = iter->size - 1;
     570             151 :       do {
     571                 :   /* since l+r >= 0, we can (>> 1) instead (/ 2) */
     572             204 :   register size_t i = (l + r) >> 1; 
     573             204 :   const char *iname = iter->types[i]->name;
     574             204 :   if (iname) {
     575             204 :     register int compare = strcmp(name, iname);
     576             204 :     if (compare == 0) {     
     577              21 :       return iter->types[i];
     578             183 :     } else if (compare < 0) {
     579             121 :       if (i) {
     580              89 :         r = i - 1;
     581                 :       } else {
     582                 :         break;
     583                 :       }
     584              62 :     } else if (compare > 0) {
     585              62 :       l = i + 1;
     586                 :     }
     587                 :   } else {
     588                 :     break; /* should never happen */
     589                 :   }
     590                 :       } while (l <= r);
     591                 :     }
     592              48 :     iter = iter->next;
     593                 :   } while (iter != end);
     594              12 :   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               1 : 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               1 :   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
     612               1 :   if (ret) {
     613               1 :     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               1 :   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           18681 : SWIG_Python_ErrorType(int code) {
     907           18681 :   PyObject* type = 0;
     908           18681 :   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           18680 :     type = PyExc_TypeError;
     923           18680 :     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           18681 :   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           18681 :   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              60 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
    1172              60 :   PyDict_SetItemString(d, (char*) name, obj);
    1173              60 :   Py_DECREF(obj);                            
    1174              60 : }
    1175                 : 
    1176                 : /* Append a value to the result obj */
    1177                 : 
    1178                 : SWIGINTERN PyObject*
    1179            1220 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
    1180                 : #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
    1181            1220 :   if (!result) {
    1182            1116 :     result = obj;
    1183             104 :   } else if (result == Py_None) {
    1184              98 :     Py_DECREF(result);
    1185              98 :     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            1220 :   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           66272 :   PyObject *none = Py_None;
    1330           66272 :   Py_INCREF(none);
    1331           66272 :   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               7 : SwigPyClientData_New(PyObject* obj)
    1362                 : {
    1363               7 :   if (!obj) {
    1364               0 :     return 0;
    1365                 :   } else {
    1366               7 :     SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    1367                 :     /* the klass element */
    1368               7 :     data->klass = obj;
    1369               7 :     Py_INCREF(data->klass);
    1370                 :     /* the newraw method and newargs arguments used to create a new raw instance */
    1371               7 :     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               7 :       data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
    1380                 : #endif
    1381               7 :       if (data->newraw) {
    1382               7 :   Py_INCREF(data->newraw);
    1383               7 :   data->newargs = PyTuple_New(1);
    1384               7 :   PyTuple_SetItem(data->newargs, 0, obj);
    1385                 :       } else {
    1386               0 :   data->newargs = obj;
    1387                 :       }
    1388               7 :       Py_INCREF(data->newargs);
    1389                 :     }
    1390                 :     /* the destroy method, aka as the C++ delete method */
    1391               7 :     data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
    1392               7 :     if (PyErr_Occurred()) {
    1393               2 :       PyErr_Clear();
    1394               2 :       data->destroy = 0;
    1395                 :     }
    1396               7 :     if (data->destroy) {
    1397                 :       int flags;
    1398               5 :       Py_INCREF(data->destroy);
    1399               5 :       flags = PyCFunction_GET_FLAGS(data->destroy);
    1400                 : #ifdef METH_O
    1401               5 :       data->delargs = !(flags & (METH_O));
    1402                 : #else
    1403                 :       data->delargs = 0;
    1404                 : #endif
    1405                 :     } else {
    1406               2 :       data->delargs = 0;
    1407                 :     }
    1408               7 :     data->implicitconv = 0;
    1409               7 :     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          852836 : SwigPyObject_type(void) {
    1556          852836 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
    1557          852836 :   return type;
    1558                 : }
    1559                 : 
    1560                 : SWIGRUNTIMEINLINE int
    1561          618986 : SwigPyObject_Check(PyObject *op) {
    1562                 :   return (Py_TYPE(op) == SwigPyObject_type())
    1563          618986 :     || (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          116925 : SwigPyObject_dealloc(PyObject *v)
    1571                 : {
    1572          116925 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1573          116925 :   PyObject *next = sobj->next;
    1574          116925 :   if (sobj->own == SWIG_POINTER_OWN) {
    1575           40421 :     swig_type_info *ty = sobj->ty;
    1576           40421 :     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    1577           40421 :     PyObject *destroy = data ? data->destroy : 0;
    1578           40421 :     if (destroy) {
    1579                 :       /* destroy is always a VARARGS method */
    1580                 :       PyObject *res;
    1581           40421 :       if (data->delargs) {
    1582                 :   /* we need to create a temporary object to carry the destroy operation */
    1583           40421 :   PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
    1584           40421 :   res = SWIG_Python_CallFunctor(destroy, tmp);
    1585           40421 :   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           40421 :       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          116925 :   Py_XDECREF(next);
    1601          116925 :   PyObject_DEL(v);
    1602          116925 : }
    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            2051 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1645            2051 :   sobj->own = 0;
    1646            2051 :   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            2051 : SwigPyObject_own(PyObject *v, PyObject *args)
    1663                 : {
    1664            2051 :   PyObject *val = 0;
    1665                 : #if (PY_VERSION_HEX < 0x02020000)
    1666                 :   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
    1667                 : #else
    1668            2051 :   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
    1669                 : #endif
    1670                 :     {
    1671               0 :       return NULL;
    1672                 :     } 
    1673                 :   else
    1674                 :     {
    1675            2051 :       SwigPyObject *sobj = (SwigPyObject *)v;
    1676            2051 :       PyObject *obj = PyBool_FromLong(sobj->own);
    1677            2051 :       if (val) {
    1678                 : #ifdef METH_NOARGS
    1679            2051 :   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            2051 :       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               1 : _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               1 :   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               1 :       };
    1851               1 :     swigpyobject_type = tmp;
    1852                 :     /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
    1853                 : #if PY_VERSION_HEX < 0x03000000
    1854               1 :     swigpyobject_type.ob_type = &PyType_Type;
    1855                 : #endif
    1856               1 :     type_init = 1;
    1857                 :   }
    1858               1 :   return &swigpyobject_type;
    1859                 : }
    1860                 : 
    1861                 : SWIGRUNTIME PyObject *
    1862          116925 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    1863                 : {
    1864          116925 :   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    1865          116925 :   if (sobj) {
    1866          116925 :     sobj->ptr  = ptr;
    1867          116925 :     sobj->ty   = ty;
    1868          116925 :     sobj->own  = own;
    1869          116925 :     sobj->next = 0;
    1870                 :   }
    1871          116925 :   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               1 :     return SWIG_Python_str_FromChar("this");
    2076                 : }
    2077                 : 
    2078                 : SWIGRUNTIME PyObject *
    2079          333208 : SWIG_This(void)
    2080                 : {
    2081          333209 :   static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
    2082          333208 :   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          338963 : SWIG_Python_GetSwigThis(PyObject *pyobj) 
    2094                 : {
    2095          338963 :   if (SwigPyObject_Check(pyobj)) {
    2096           40260 :     return (SwigPyObject *) pyobj;
    2097                 :   } else {
    2098          298703 :     PyObject *obj = 0;
    2099                 : #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
    2100          298703 :     if (PyInstance_Check(pyobj)) {
    2101               0 :       obj = _PyInstance_Lookup(pyobj, SWIG_This());      
    2102                 :     } else {
    2103          298703 :       PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    2104          298703 :       if (dictptr != NULL) {
    2105          298703 :   PyObject *dict = *dictptr;
    2106          298703 :   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          298703 :     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          298703 :     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          339085 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
    2160          339085 :   if (!obj) return SWIG_ERROR;
    2161          339085 :   if (obj == Py_None) {
    2162             122 :     if (ptr) *ptr = 0;
    2163             122 :     return SWIG_OK;
    2164                 :   } else {
    2165          338963 :     SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    2166          338963 :     if (own)
    2167               0 :       *own = 0;
    2168          338963 :     while (sobj) {
    2169          320283 :       void *vptr = sobj->ptr;
    2170          320283 :       if (ty) {
    2171          320283 :   swig_type_info *to = sobj->ty;
    2172          320283 :   if (to == ty) {
    2173                 :     /* no type cast needed */
    2174          320283 :     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          338963 :     if (sobj) {
    2199          320283 :       if (own)
    2200               0 :         *own = *own | sobj->own;
    2201          320283 :       if (flags & SWIG_POINTER_DISOWN) {
    2202           48356 :   sobj->own = 0;
    2203                 :       }
    2204          320283 :       return SWIG_OK;
    2205                 :     } else {
    2206           18680 :       int res = SWIG_ERROR;
    2207           18680 :       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           18680 :       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           53185 : SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
    2306                 : {
    2307                 : #if (PY_VERSION_HEX >= 0x02020000)
    2308           53185 :   PyObject *inst = 0;
    2309           53185 :   PyObject *newraw = data->newraw;
    2310           53185 :   if (newraw) {
    2311           53185 :     inst = PyObject_Call(newraw, data->newargs, NULL);
    2312           53185 :     if (inst) {
    2313                 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
    2314           53185 :       PyObject **dictptr = _PyObject_GetDictPtr(inst);
    2315           53185 :       if (dictptr != NULL) {
    2316           53185 :   PyObject *dict = *dictptr;
    2317           53185 :   if (dict == NULL) {
    2318           53185 :     dict = PyDict_New();
    2319           53185 :     *dictptr = dict;
    2320           53185 :     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           53185 :   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           78358 : SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
    2415           78358 :   if (!ptr) {
    2416            1854 :     return SWIG_Py_Void();
    2417                 :   } else {
    2418           76504 :     int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2419           76504 :     PyObject *robj = SwigPyObject_New(ptr, type, own);
    2420           76504 :     SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    2421           76504 :     if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    2422           53185 :       PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    2423           53185 :       if (inst) {
    2424           53185 :   Py_DECREF(robj);
    2425           53185 :   robj = inst;
    2426                 :       }
    2427                 :     }
    2428           76504 :     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               1 :   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               1 :             (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
    2460                 : #endif
    2461               1 :     if (PyErr_Occurred()) {
    2462               0 :       PyErr_Clear();
    2463               0 :       type_pointer = (void *)0;
    2464                 :     }
    2465                 : #endif
    2466                 :   }
    2467               1 :   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_GIntBig swig_types[0]
    2726                 : #define SWIGTYPE_p_OGRDataSourceShadow swig_types[1]
    2727                 : #define SWIGTYPE_p_OGRDriverShadow swig_types[2]
    2728                 : #define SWIGTYPE_p_OGRFeatureDefnShadow swig_types[3]
    2729                 : #define SWIGTYPE_p_OGRFeatureShadow swig_types[4]
    2730                 : #define SWIGTYPE_p_OGRFieldDefnShadow swig_types[5]
    2731                 : #define SWIGTYPE_p_OGRGeometryShadow swig_types[6]
    2732                 : #define SWIGTYPE_p_OGRLayerShadow swig_types[7]
    2733                 : #define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[8]
    2734                 : #define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[9]
    2735                 : #define SWIGTYPE_p_char swig_types[10]
    2736                 : #define SWIGTYPE_p_double swig_types[11]
    2737                 : #define SWIGTYPE_p_int swig_types[12]
    2738                 : #define SWIGTYPE_p_p_char swig_types[13]
    2739                 : #define SWIGTYPE_p_p_double swig_types[14]
    2740                 : #define SWIGTYPE_p_p_int swig_types[15]
    2741                 : static swig_type_info *swig_types[17];
    2742                 : static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0};
    2743                 : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
    2744                 : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
    2745                 : 
    2746                 : /* -------- TYPES TABLE (END) -------- */
    2747                 : 
    2748                 : #if (PY_VERSION_HEX <= 0x02000000)
    2749                 : # if !defined(SWIG_PYTHON_CLASSIC)
    2750                 : #  error "This python version requires swig to be run with the '-classic' option"
    2751                 : # endif
    2752                 : #endif
    2753                 : 
    2754                 : /*-----------------------------------------------
    2755                 :               @(target):= _ogr.so
    2756                 :   ------------------------------------------------*/
    2757                 : #if PY_VERSION_HEX >= 0x03000000
    2758                 : #  define SWIG_init    PyInit__ogr
    2759                 : 
    2760                 : #else
    2761                 : #  define SWIG_init    init_ogr
    2762                 : 
    2763                 : #endif
    2764                 : #define SWIG_name    "_ogr"
    2765                 : 
    2766                 : #define SWIGVERSION 0x010340 
    2767                 : #define SWIG_VERSION SWIGVERSION
    2768                 : 
    2769                 : 
    2770                 : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
    2771                 : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 
    2772                 : 
    2773                 : 
    2774                 : #include <stdexcept>
    2775                 : 
    2776                 : 
    2777                 : namespace swig {
    2778                 :   class SwigPtr_PyObject {
    2779                 :   protected:
    2780                 :     PyObject *_obj;
    2781                 : 
    2782                 :   public:
    2783                 :     SwigPtr_PyObject() :_obj(0)
    2784                 :     {
    2785                 :     }
    2786                 : 
    2787                 :     SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
    2788                 :     {
    2789                 :       Py_XINCREF(_obj);      
    2790                 :     }
    2791                 :     
    2792                 :     SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    2793                 :     {
    2794                 :       if (initial_ref) {
    2795                 :         Py_XINCREF(_obj);
    2796                 :       }
    2797                 :     }
    2798                 :     
    2799                 :     SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    2800                 :     {
    2801                 :       Py_XINCREF(item._obj);
    2802                 :       Py_XDECREF(_obj);
    2803                 :       _obj = item._obj;
    2804                 :       return *this;      
    2805                 :     }
    2806                 :     
    2807                 :     ~SwigPtr_PyObject() 
    2808                 :     {
    2809                 :       Py_XDECREF(_obj);
    2810                 :     }
    2811                 :     
    2812                 :     operator PyObject *() const
    2813                 :     {
    2814                 :       return _obj;
    2815                 :     }
    2816                 : 
    2817                 :     PyObject *operator->() const
    2818                 :     {
    2819                 :       return _obj;
    2820                 :     }
    2821                 :   };
    2822                 : }
    2823                 : 
    2824                 : 
    2825                 : namespace swig {
    2826                 :   struct SwigVar_PyObject : SwigPtr_PyObject {
    2827                 :     SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
    2828                 :     
    2829                 :     SwigVar_PyObject & operator = (PyObject* obj)
    2830                 :     {
    2831                 :       Py_XDECREF(_obj);
    2832                 :       _obj = obj;
    2833                 :       return *this;      
    2834                 :     }
    2835                 :   };
    2836                 : }
    2837                 : 
    2838                 : 
    2839                 : typedef char retStringAndCPLFree;
    2840                 : 
    2841                 : 
    2842                 : #include <iostream>
    2843                 : using namespace std;
    2844                 : 
    2845                 : #include "ogr_api.h"
    2846                 : #include "ogr_p.h"
    2847                 : #include "ogr_core.h"
    2848                 : #include "cpl_port.h"
    2849                 : #include "cpl_string.h"
    2850                 : #include "ogr_srs_api.h"
    2851                 : 
    2852                 : #ifdef DEBUG 
    2853                 : typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
    2854                 : typedef struct OGRDriverHS OGRDriverShadow;
    2855                 : typedef struct OGRDataSourceHS OGRDataSourceShadow;
    2856                 : typedef struct OGRLayerHS OGRLayerShadow;
    2857                 : typedef struct OGRFeatureHS OGRFeatureShadow;
    2858                 : typedef struct OGRFeatureDefnHS OGRFeatureDefnShadow;
    2859                 : typedef struct OGRGeometryHS OGRGeometryShadow;
    2860                 : typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
    2861                 : typedef struct OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
    2862                 : typedef struct OGRFieldDefnHS OGRFieldDefnShadow;
    2863                 : #else
    2864                 : typedef void OSRSpatialReferenceShadow;
    2865                 : typedef void OGRDriverShadow;
    2866                 : typedef void OGRDataSourceShadow;
    2867                 : typedef void OGRLayerShadow;
    2868                 : typedef void OGRFeatureShadow;
    2869                 : typedef void OGRFeatureDefnShadow;
    2870                 : typedef void OGRGeometryShadow;
    2871                 : typedef void OSRCoordinateTransformationShadow;
    2872                 : typedef void OGRFieldDefnShadow;
    2873                 : #endif
    2874                 : 
    2875                 : 
    2876                 :   #define SWIG_From_long   PyInt_FromLong 
    2877                 : 
    2878                 : 
    2879                 : SWIGINTERNINLINE PyObject *
    2880                 : SWIG_From_int  (int value)
    2881                 : {    
    2882           23338 :   return SWIG_From_long  (value);
    2883                 : }
    2884                 : 
    2885                 : 
    2886                 : SWIGINTERN swig_type_info*
    2887                 : SWIG_pchar_descriptor(void)
    2888                 : {
    2889                 :   static int init = 0;
    2890                 :   static swig_type_info* info = 0;
    2891              58 :   if (!init) {
    2892               1 :     info = SWIG_TypeQuery("_p_char");
    2893               1 :     init = 1;
    2894                 :   }
    2895              58 :   return info;
    2896                 : }
    2897                 : 
    2898                 : 
    2899                 : SWIGINTERNINLINE PyObject *
    2900                 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
    2901                 : {
    2902            8817 :   if (carray) {
    2903            8751 :     if (size > INT_MAX) {
    2904               0 :       swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    2905                 :       return pchar_descriptor ? 
    2906               0 :   SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    2907                 :     } else {
    2908                 : #if PY_VERSION_HEX >= 0x03000000
    2909                 :       return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
    2910                 : #else
    2911            8751 :       return PyString_FromStringAndSize(carray, static_cast< int >(size));
    2912                 : #endif
    2913                 :     }
    2914                 :   } else {
    2915              66 :     return SWIG_Py_Void();
    2916                 :   }
    2917                 : }
    2918                 : 
    2919                 : 
    2920                 : SWIGINTERNINLINE PyObject * 
    2921            8817 : SWIG_FromCharPtr(const char *cptr)
    2922                 : { 
    2923           17634 :   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
    2924                 : }
    2925                 : 
    2926                 : 
    2927                 : int bUseExceptions=0;
    2928                 : CPLErrorHandler pfnPreviousHandler = CPLDefaultErrorHandler;
    2929                 : 
    2930                 : void CPL_STDCALL 
    2931               0 : PythonBindingErrorHandler(CPLErr eclass, int code, const char *msg ) 
    2932                 : {
    2933                 :   /* 
    2934                 :   ** Generally we want to supress error reporting if we have exceptions
    2935                 :   ** enabled as the error message will be in the exception thrown in 
    2936                 :   ** Python.  
    2937                 :   */
    2938                 : 
    2939                 :   /* If the error class is CE_Fatal, we want to have a message issued
    2940                 :      because the CPL support code does an abort() before any exception
    2941                 :      can be generated */
    2942               0 :   if (eclass == CE_Fatal ) {
    2943               0 :     pfnPreviousHandler(eclass, code, msg );
    2944                 :   }
    2945                 : 
    2946                 :   /*
    2947                 :   ** We do not want to interfere with warnings or debug messages since
    2948                 :   ** they won't be translated into exceptions.
    2949                 :   */
    2950               0 :   if (eclass == CE_Warning || eclass == CE_Debug ) {
    2951               0 :     pfnPreviousHandler(eclass, code, msg );
    2952                 :   }
    2953               0 : }
    2954                 : 
    2955                 : 
    2956                 : 
    2957               0 : int GetUseExceptions() {
    2958               0 :   return bUseExceptions;
    2959                 : }
    2960                 : 
    2961               0 : void UseExceptions() {
    2962               0 :   bUseExceptions = 1;
    2963                 :   pfnPreviousHandler = 
    2964               0 :     CPLSetErrorHandler( (CPLErrorHandler) PythonBindingErrorHandler );
    2965               0 : }
    2966                 : 
    2967               0 : void DontUseExceptions() {
    2968               0 :   bUseExceptions = 0;
    2969               0 :   CPLSetErrorHandler( pfnPreviousHandler );
    2970               0 : }
    2971                 : 
    2972                 : 
    2973                 : 
    2974                 : /* Return a PyObject* from a NULL terminated C String */
    2975            1435 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
    2976                 : {
    2977            1435 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    2978           94672 :   while(*pszIter != 0)
    2979                 :   {
    2980           91802 :     if (*pszIter > 127)
    2981                 :     {
    2982               0 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "ignore");
    2983               0 :         if (pyObj != NULL)
    2984               0 :             return pyObj;
    2985                 : #if PY_VERSION_HEX >= 0x03000000
    2986                 :         return PyBytes_FromString(pszStr);
    2987                 : #else
    2988               0 :         return PyString_FromString(pszStr);
    2989                 : #endif
    2990                 :     }
    2991           91802 :     pszIter ++;
    2992                 :   }
    2993                 : #if PY_VERSION_HEX >= 0x03000000
    2994                 :   return PyUnicode_FromString(pszStr); 
    2995                 : #else
    2996            1435 :   return PyString_FromString(pszStr);
    2997                 : #endif
    2998                 : }
    2999                 : 
    3000                 : /* Return a NULL terminated c String from a PyObject */
    3001                 : /* Result must be freed with GDALPythonFreeCStr */
    3002            4131 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
    3003                 : {
    3004            4131 :   *pbToFree = 0;
    3005            4131 :   if (PyUnicode_Check(pyObject))
    3006                 :   {
    3007                 :       char *pszStr;
    3008                 :       char *pszNewStr;
    3009                 :       Py_ssize_t nLen;
    3010               3 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
    3011                 : #if PY_VERSION_HEX >= 0x03000000
    3012                 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    3013                 : #else
    3014               3 :       PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    3015                 : #endif
    3016               3 :       pszNewStr = (char *) malloc(nLen+1);
    3017               3 :       memcpy(pszNewStr, pszStr, nLen+1);
    3018               3 :       Py_XDECREF(pyUTF8Str);
    3019               3 :       *pbToFree = 1;
    3020               3 :       return pszNewStr;
    3021                 :   }
    3022                 :   else 
    3023                 :   {
    3024                 : #if PY_VERSION_HEX >= 0x03000000
    3025                 :       return PyBytes_AsString(pyObject);
    3026                 : #else
    3027            4128 :       return PyString_AsString(pyObject);
    3028                 : #endif
    3029                 :   }
    3030                 : }
    3031                 : 
    3032            4131 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
    3033                 : {
    3034            4131 :    if (bToFree)
    3035               3 :        free(ptr);
    3036            4131 : }
    3037                 : 
    3038                 : 
    3039                 : 
    3040                 : SWIGINTERN int
    3041           17813 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
    3042                 : {
    3043                 : #if PY_VERSION_HEX>=0x03000000
    3044                 :   if (PyUnicode_Check(obj))
    3045                 : #else  
    3046           17813 :   if (PyString_Check(obj))
    3047                 : #endif
    3048                 :   {
    3049                 :     char *cstr; Py_ssize_t len;
    3050                 : #if PY_VERSION_HEX>=0x03000000
    3051                 :     if (!alloc && cptr) {
    3052                 :         /* We can't allow converting without allocation, since the internal
    3053                 :            representation of string in Python 3 is UCS-2/UCS-4 but we require
    3054                 :            a UTF-8 representation.
    3055                 :            TODO(bhy) More detailed explanation */
    3056                 :         return SWIG_RuntimeError;
    3057                 :     }
    3058                 :     obj = PyUnicode_AsUTF8String(obj);
    3059                 :     PyBytes_AsStringAndSize(obj, &cstr, &len);
    3060                 :     if(alloc) *alloc = SWIG_NEWOBJ;
    3061                 : #else
    3062           17755 :     PyString_AsStringAndSize(obj, &cstr, &len);
    3063                 : #endif
    3064           17755 :     if (cptr) {
    3065           13305 :       if (alloc) {
    3066                 :   /* 
    3067                 :      In python the user should not be able to modify the inner
    3068                 :      string representation. To warranty that, if you define
    3069                 :      SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
    3070                 :      buffer is always returned.
    3071                 : 
    3072                 :      The default behavior is just to return the pointer value,
    3073                 :      so, be careful.
    3074                 :   */ 
    3075                 : #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
    3076                 :   if (*alloc != SWIG_OLDOBJ) 
    3077                 : #else
    3078           13305 :   if (*alloc == SWIG_NEWOBJ) 
    3079                 : #endif
    3080                 :     {
    3081               0 :       *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
    3082               0 :       *alloc = SWIG_NEWOBJ;
    3083                 :     }
    3084                 :   else {
    3085           13305 :     *cptr = cstr;
    3086           13305 :     *alloc = SWIG_OLDOBJ;
    3087                 :   }
    3088                 :       } else {
    3089                 :         #if PY_VERSION_HEX>=0x03000000
    3090                 :         assert(0); /* Should never reach here in Python 3 */
    3091                 :         #endif
    3092               0 :   *cptr = SWIG_Python_str_AsChar(obj);
    3093                 :       }
    3094                 :     }
    3095           17755 :     if (psize) *psize = len + 1;
    3096                 : #if PY_VERSION_HEX>=0x03000000
    3097                 :     Py_XDECREF(obj);
    3098                 : #endif
    3099           17755 :     return SWIG_OK;
    3100                 :   } else {
    3101              58 :     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3102              58 :     if (pchar_descriptor) {
    3103              58 :       void* vptr = 0;
    3104              58 :       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
    3105              58 :   if (cptr) *cptr = (char *) vptr;
    3106              58 :   if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
    3107              58 :   if (alloc) *alloc = SWIG_OLDOBJ;
    3108              58 :   return SWIG_OK;
    3109                 :       }
    3110                 :     }
    3111                 :   }
    3112               0 :   return SWIG_TypeError;
    3113                 : }
    3114                 : 
    3115                 : 
    3116                 : 
    3117                 : 
    3118                 : SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CreateDataSource(OGRDriverShadow *self,char const *utf8_path,char **options=0){
    3119             173 :     OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CreateDataSource( self, utf8_path, options);
    3120             173 :     return ds;
    3121                 :   }
    3122                 : SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CopyDataSource(OGRDriverShadow *self,OGRDataSourceShadow *copy_ds,char const *utf8_path,char **options=0){
    3123               0 :     OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CopyDataSource(self, copy_ds, utf8_path, options);
    3124               0 :     return ds;
    3125                 :   }
    3126                 : 
    3127                 : #include <limits.h>
    3128                 : #if !defined(SWIG_NO_LLONG_MAX)
    3129                 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
    3130                 : #   define LLONG_MAX __LONG_LONG_MAX__
    3131                 : #   define LLONG_MIN (-LLONG_MAX - 1LL)
    3132                 : #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
    3133                 : # endif
    3134                 : #endif
    3135                 : 
    3136                 : 
    3137                 : SWIGINTERN int
    3138            4146 : SWIG_AsVal_double (PyObject *obj, double *val)
    3139                 : {
    3140            4146 :   int res = SWIG_TypeError;
    3141            4146 :   if (PyFloat_Check(obj)) {
    3142             937 :     if (val) *val = PyFloat_AsDouble(obj);
    3143             937 :     return SWIG_OK;
    3144            3209 :   } else if (PyInt_Check(obj)) {
    3145             156 :     if (val) *val = PyInt_AsLong(obj);
    3146             156 :     return SWIG_OK;
    3147            3053 :   } else if (PyLong_Check(obj)) {
    3148               0 :     double v = PyLong_AsDouble(obj);
    3149               0 :     if (!PyErr_Occurred()) {
    3150               0 :       if (val) *val = v;
    3151               0 :       return SWIG_OK;
    3152                 :     } else {
    3153               0 :       PyErr_Clear();
    3154                 :     }
    3155                 :   }
    3156                 : #ifdef SWIG_PYTHON_CAST_MODE
    3157                 :   {
    3158                 :     int dispatch = 0;
    3159                 :     double d = PyFloat_AsDouble(obj);
    3160                 :     if (!PyErr_Occurred()) {
    3161                 :       if (val) *val = d;
    3162                 :       return SWIG_AddCast(SWIG_OK);
    3163                 :     } else {
    3164                 :       PyErr_Clear();
    3165                 :     }
    3166                 :     if (!dispatch) {
    3167                 :       long v = PyLong_AsLong(obj);
    3168                 :       if (!PyErr_Occurred()) {
    3169                 :   if (val) *val = v;
    3170                 :   return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
    3171                 :       } else {
    3172                 :   PyErr_Clear();
    3173                 :       }
    3174                 :     }
    3175                 :   }
    3176                 : #endif
    3177            3053 :   return res;
    3178                 : }
    3179                 : 
    3180                 : 
    3181                 : #include <float.h>
    3182                 : 
    3183                 : 
    3184                 : #include <math.h>
    3185                 : 
    3186                 : 
    3187                 : SWIGINTERNINLINE int
    3188                 : SWIG_CanCastAsInteger(double *d, double min, double max) {
    3189                 :   double x = *d;
    3190                 :   if ((min <= x && x <= max)) {
    3191                 :    double fx = floor(x);
    3192                 :    double cx = ceil(x);
    3193                 :    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
    3194                 :    if ((errno == EDOM) || (errno == ERANGE)) {
    3195                 :      errno = 0;
    3196                 :    } else {
    3197                 :      double summ, reps, diff;
    3198                 :      if (rd < x) {
    3199                 :        diff = x - rd;
    3200                 :      } else if (rd > x) {
    3201                 :        diff = rd - x;
    3202                 :      } else {
    3203                 :        return 1;
    3204                 :      }
    3205                 :      summ = rd + x;
    3206                 :      reps = diff/summ;
    3207                 :      if (reps < 8*DBL_EPSILON) {
    3208                 :        *d = rd;
    3209                 :        return 1;
    3210                 :      }
    3211                 :    }
    3212                 :   }
    3213                 :   return 0;
    3214                 : }
    3215                 : 
    3216                 : 
    3217                 : SWIGINTERN int
    3218          133838 : SWIG_AsVal_long (PyObject *obj, long* val)
    3219                 : {
    3220          133838 :   if (PyInt_Check(obj)) {
    3221          129165 :     if (val) *val = PyInt_AsLong(obj);
    3222          129165 :     return SWIG_OK;
    3223            4673 :   } else if (PyLong_Check(obj)) {
    3224               0 :     long v = PyLong_AsLong(obj);
    3225               0 :     if (!PyErr_Occurred()) {
    3226               0 :       if (val) *val = v;
    3227               0 :       return SWIG_OK;
    3228                 :     } else {
    3229               0 :       PyErr_Clear();
    3230                 :     }
    3231                 :   }
    3232                 : #ifdef SWIG_PYTHON_CAST_MODE
    3233                 :   {
    3234                 :     int dispatch = 0;
    3235                 :     long v = PyInt_AsLong(obj);
    3236                 :     if (!PyErr_Occurred()) {
    3237                 :       if (val) *val = v;
    3238                 :       return SWIG_AddCast(SWIG_OK);
    3239                 :     } else {
    3240                 :       PyErr_Clear();
    3241                 :     }
    3242                 :     if (!dispatch) {
    3243                 :       double d;
    3244                 :       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
    3245                 :       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
    3246                 :   if (val) *val = (long)(d);
    3247                 :   return res;
    3248                 :       }
    3249                 :     }
    3250                 :   }
    3251                 : #endif
    3252            4673 :   return SWIG_TypeError;
    3253                 : }
    3254                 : 
    3255                 : 
    3256                 : SWIGINTERN int
    3257          133726 : SWIG_AsVal_int (PyObject * obj, int *val)
    3258                 : {
    3259                 :   long v;
    3260          133726 :   int res = SWIG_AsVal_long (obj, &v);
    3261          133726 :   if (SWIG_IsOK(res)) {
    3262          129053 :     if ((v < INT_MIN || v > INT_MAX)) {
    3263               0 :       return SWIG_OverflowError;
    3264                 :     } else {
    3265          129053 :       if (val) *val = static_cast< int >(v);
    3266                 :     }
    3267                 :   }  
    3268          133726 :   return res;
    3269                 : }
    3270                 : 
    3271                 : SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_Open(OGRDriverShadow *self,char const *utf8_path,int update=0){
    3272              56 :     OGRDataSourceShadow* ds = (OGRDataSourceShadow*) OGR_Dr_Open(self, utf8_path, update);
    3273              56 :     if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    3274                 :     {
    3275                 :         CPLDebug( "SWIG",
    3276                 :           "OGR_Dr_Open() succeeded, but an error is posted, so we destroy"
    3277               0 :           " the datasource and fail at swig level." );
    3278               0 :         OGRReleaseDataSource(ds);
    3279               0 :         ds = NULL;
    3280                 :     }
    3281              56 :     return ds;
    3282                 :   }
    3283                 : SWIGINTERN int OGRDriverShadow_DeleteDataSource(OGRDriverShadow *self,char const *utf8_path){
    3284                 : 
    3285             137 :     return OGR_Dr_DeleteDataSource( self, utf8_path );
    3286                 :   }
    3287                 : SWIGINTERN bool OGRDriverShadow_TestCapability(OGRDriverShadow *self,char const *cap){
    3288              36 :     return (OGR_Dr_TestCapability(self, cap) > 0);
    3289                 :   }
    3290                 : 
    3291                 : SWIGINTERNINLINE PyObject*
    3292            4727 :   SWIG_From_bool  (bool value)
    3293                 : {
    3294            4727 :   return PyBool_FromLong(value ? 1 : 0);
    3295                 : }
    3296                 : 
    3297                 : SWIGINTERN char const *OGRDriverShadow_GetName(OGRDriverShadow *self){
    3298              93 :     return OGR_Dr_GetName( self );
    3299                 :   }
    3300                 : SWIGINTERN void OGRDriverShadow_Register(OGRDriverShadow *self){
    3301               4 :     OGRRegisterDriver( self );
    3302                 :   }
    3303                 : SWIGINTERN void OGRDriverShadow_Deregister(OGRDriverShadow *self){
    3304               4 :     OGRDeregisterDriver( self );
    3305                 :   }
    3306                 : SWIGINTERN void delete_OGRDataSourceShadow(OGRDataSourceShadow *self){
    3307             925 :     OGRReleaseDataSource(self);
    3308                 :   }
    3309                 : SWIGINTERN int OGRDataSourceShadow_GetRefCount(OGRDataSourceShadow *self){
    3310               4 :     return OGR_DS_GetRefCount(self);
    3311                 :   }
    3312                 : SWIGINTERN int OGRDataSourceShadow_GetSummaryRefCount(OGRDataSourceShadow *self){
    3313               0 :     return OGR_DS_GetSummaryRefCount(self);
    3314                 :   }
    3315                 : SWIGINTERN int OGRDataSourceShadow_GetLayerCount(OGRDataSourceShadow *self){
    3316             195 :     return OGR_DS_GetLayerCount(self);
    3317                 :   }
    3318                 : SWIGINTERN OGRDriverShadow *OGRDataSourceShadow_GetDriver(OGRDataSourceShadow *self){
    3319              22 :     return (OGRDriverShadow *) OGR_DS_GetDriver( self );
    3320                 :   }
    3321                 : SWIGINTERN char const *OGRDataSourceShadow_GetName(OGRDataSourceShadow *self){
    3322              11 :     return OGR_DS_GetName(self);
    3323                 :   }
    3324                 : SWIGINTERN OGRErr OGRDataSourceShadow_DeleteLayer(OGRDataSourceShadow *self,int index){
    3325              11 :     return OGR_DS_DeleteLayer(self, index);
    3326                 :   }
    3327                 : 
    3328                 : 
    3329                 : #include "ogr_core.h"
    3330                 : static char const *
    3331             179 : OGRErrMessages( int rc ) {
    3332             179 :   switch( rc ) {
    3333                 :   case OGRERR_NONE:
    3334               0 :     return "OGR Error: None";
    3335                 :   case OGRERR_NOT_ENOUGH_DATA:
    3336               0 :     return "OGR Error: Not enough data to deserialize";
    3337                 :   case OGRERR_NOT_ENOUGH_MEMORY:
    3338               0 :     return "OGR Error: Not enough memory";
    3339                 :   case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
    3340              11 :     return "OGR Error: Unsupported geometry type";
    3341                 :   case OGRERR_UNSUPPORTED_OPERATION:
    3342               0 :     return "OGR Error: Unsupported operation";
    3343                 :   case OGRERR_CORRUPT_DATA:
    3344             166 :     return "OGR Error: Corrupt data";
    3345                 :   case OGRERR_FAILURE:
    3346               2 :     return "OGR Error: General Error";
    3347                 :   case OGRERR_UNSUPPORTED_SRS:
    3348               0 :     return "OGR Error: Unsupported SRS";
    3349                 :   case OGRERR_INVALID_HANDLE:
    3350               0 :     return "OGR Error: Invalid handle";
    3351                 :   default:
    3352               0 :     return "OGR Error: Unknown";
    3353                 :   }
    3354                 : }
    3355                 : 
    3356                 : SWIGINTERN OGRErr OGRDataSourceShadow_SyncToDisk(OGRDataSourceShadow *self){
    3357               0 :     return OGR_DS_SyncToDisk(self);
    3358                 :   }
    3359                 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_CreateLayer(OGRDataSourceShadow *self,char const *name,OSRSpatialReferenceShadow *srs=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
    3360                 :     OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_CreateLayer( self,
    3361                 :                   name,
    3362                 :                   srs,
    3363                 :                   geom_type,
    3364            1412 :                   options);
    3365            1412 :     return layer;
    3366                 :   }
    3367                 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_CopyLayer(OGRDataSourceShadow *self,OGRLayerShadow *src_layer,char const *new_name,char **options=0){
    3368                 :     OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_CopyLayer( self,
    3369                 :                                                       src_layer,
    3370                 :                                                       new_name,
    3371               2 :                                                       options);
    3372               2 :     return layer;
    3373                 :   }
    3374                 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByIndex(OGRDataSourceShadow *self,int index=0){
    3375                 : 
    3376            2101 :     OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayer(self, index);
    3377            2101 :     return layer;
    3378                 :   }
    3379                 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByName(OGRDataSourceShadow *self,char const *layer_name){
    3380            1603 :     OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayerByName(self, layer_name);
    3381            1603 :     return layer;
    3382                 :   }
    3383                 : SWIGINTERN bool OGRDataSourceShadow_TestCapability(OGRDataSourceShadow *self,char const *cap){
    3384              47 :     return (OGR_DS_TestCapability(self, cap) > 0);
    3385                 :   }
    3386                 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_ExecuteSQL(OGRDataSourceShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
    3387                 :     OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_ExecuteSQL((OGRDataSourceShadow*)self,
    3388                 :                                                       statement,
    3389                 :                                                       spatialFilter,
    3390            1165 :                                                       dialect);
    3391            1165 :     return layer;
    3392                 :   }
    3393                 : SWIGINTERN void OGRDataSourceShadow_ReleaseResultSet(OGRDataSourceShadow *self,OGRLayerShadow *layer){
    3394             197 :     OGR_DS_ReleaseResultSet(self, layer);
    3395                 :   }
    3396                 : SWIGINTERN int OGRLayerShadow_GetRefCount(OGRLayerShadow *self){
    3397               0 :     return OGR_L_GetRefCount(self);
    3398                 :   }
    3399                 : SWIGINTERN void OGRLayerShadow_SetSpatialFilter(OGRLayerShadow *self,OGRGeometryShadow *filter){
    3400              47 :     OGR_L_SetSpatialFilter (self, filter);
    3401                 :   }
    3402                 : SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
    3403              39 :     OGR_L_SetSpatialFilterRect(self, minx, miny, maxx, maxy);                          
    3404                 :   }
    3405                 : SWIGINTERN OGRGeometryShadow *OGRLayerShadow_GetSpatialFilter(OGRLayerShadow *self){
    3406               0 :     return (OGRGeometryShadow *) OGR_L_GetSpatialFilter(self);
    3407                 :   }
    3408                 : SWIGINTERN OGRErr OGRLayerShadow_SetAttributeFilter(OGRLayerShadow *self,char *filter_string){
    3409             203 :     return OGR_L_SetAttributeFilter((OGRLayerShadow*)self, filter_string);
    3410                 :   }
    3411                 : SWIGINTERN void OGRLayerShadow_ResetReading(OGRLayerShadow *self){
    3412            1428 :     OGR_L_ResetReading(self);
    3413                 :   }
    3414                 : SWIGINTERN char const *OGRLayerShadow_GetName(OGRLayerShadow *self){
    3415            1620 :     return OGR_L_GetName(self);
    3416                 :   }
    3417                 : SWIGINTERN OGRwkbGeometryType OGRLayerShadow_GetGeomType(OGRLayerShadow *self){
    3418              52 :     return (OGRwkbGeometryType) OGR_L_GetGeomType(self);
    3419                 :   }
    3420                 : SWIGINTERN char const *OGRLayerShadow_GetGeometryColumn(OGRLayerShadow *self){
    3421              20 :     return OGR_L_GetGeometryColumn(self);
    3422                 :   }
    3423                 : SWIGINTERN char const *OGRLayerShadow_GetFIDColumn(OGRLayerShadow *self){
    3424              15 :     return OGR_L_GetFIDColumn(self);
    3425                 :   }
    3426                 : SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetFeature(OGRLayerShadow *self,long fid){
    3427              83 :     return (OGRFeatureShadow*) OGR_L_GetFeature(self, fid);
    3428                 :   }
    3429                 : SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetNextFeature(OGRLayerShadow *self){
    3430            6662 :     return (OGRFeatureShadow*) OGR_L_GetNextFeature(self);
    3431                 :   }
    3432                 : SWIGINTERN OGRErr OGRLayerShadow_SetNextByIndex(OGRLayerShadow *self,long new_index){
    3433              10 :     return OGR_L_SetNextByIndex(self, new_index);
    3434                 :   }
    3435                 : SWIGINTERN OGRErr OGRLayerShadow_SetFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    3436            2043 :     return OGR_L_SetFeature(self, feature);
    3437                 :   }
    3438                 : SWIGINTERN OGRErr OGRLayerShadow_CreateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    3439           18825 :     return OGR_L_CreateFeature(self, feature);
    3440                 :   }
    3441                 : SWIGINTERN OGRErr OGRLayerShadow_DeleteFeature(OGRLayerShadow *self,long fid){
    3442              19 :     return OGR_L_DeleteFeature(self, fid);
    3443                 :   }
    3444                 : SWIGINTERN OGRErr OGRLayerShadow_SyncToDisk(OGRLayerShadow *self){
    3445               2 :     return OGR_L_SyncToDisk(self);
    3446                 :   }
    3447                 : SWIGINTERN OGRFeatureDefnShadow *OGRLayerShadow_GetLayerDefn(OGRLayerShadow *self){
    3448           17530 :     return (OGRFeatureDefnShadow*) OGR_L_GetLayerDefn(self);
    3449                 :   }
    3450                 : SWIGINTERN int OGRLayerShadow_GetFeatureCount(OGRLayerShadow *self,int force=1){
    3451             456 :     return OGR_L_GetFeatureCount(self, force);
    3452                 :   }
    3453                 : SWIGINTERN void OGRLayerShadow_GetExtent(OGRLayerShadow *self,double argout[4],int *isvalid=NULL,int force=1,int can_return_null=0){
    3454              61 :     OGRErr eErr = OGR_L_GetExtent(self, (OGREnvelope*)argout, force);
    3455              61 :     if (can_return_null)
    3456               9 :         *isvalid = (eErr == OGRERR_NONE);
    3457                 :     else
    3458              52 :         *isvalid = TRUE;
    3459                 :     return;
    3460                 :   }
    3461                 : SWIGINTERN bool OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
    3462              90 :     return (OGR_L_TestCapability(self, cap) > 0);
    3463                 :   }
    3464                 : SWIGINTERN OGRErr OGRLayerShadow_CreateField(OGRLayerShadow *self,OGRFieldDefnShadow *field_def,int approx_ok=1){
    3465            4477 :     return OGR_L_CreateField(self, field_def, approx_ok);
    3466                 :   }
    3467                 : SWIGINTERN OGRErr OGRLayerShadow_DeleteField(OGRLayerShadow *self,int iField){
    3468              28 :     return OGR_L_DeleteField(self, iField);
    3469                 :   }
    3470                 : SWIGINTERN OGRErr OGRLayerShadow_ReorderField(OGRLayerShadow *self,int iOldFieldPos,int iNewFieldPos){
    3471              24 :     return OGR_L_ReorderField(self, iOldFieldPos, iNewFieldPos);
    3472                 :   }
    3473                 : SWIGINTERN OGRErr OGRLayerShadow_ReorderFields(OGRLayerShadow *self,int nList,int *pList){
    3474              15 :     if (nList != OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)))
    3475                 :     {
    3476                 :       CPLError(CE_Failure, CPLE_IllegalArg,
    3477                 :                "List should have %d elements",
    3478               0 :                OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)));
    3479               0 :       return OGRERR_FAILURE;
    3480                 :     }
    3481              15 :     return OGR_L_ReorderFields(self, pList);
    3482                 :   }
    3483                 : SWIGINTERN OGRErr OGRLayerShadow_AlterFieldDefn(OGRLayerShadow *self,int iField,OGRFieldDefnShadow *field_def,int nFlags){
    3484              32 :     return OGR_L_AlterFieldDefn(self, iField, field_def, nFlags);
    3485                 :   }
    3486                 : SWIGINTERN OGRErr OGRLayerShadow_StartTransaction(OGRLayerShadow *self){
    3487              61 :     return OGR_L_StartTransaction(self);
    3488                 :   }
    3489                 : SWIGINTERN OGRErr OGRLayerShadow_CommitTransaction(OGRLayerShadow *self){
    3490              60 :     return OGR_L_CommitTransaction(self);
    3491                 :   }
    3492                 : SWIGINTERN OGRErr OGRLayerShadow_RollbackTransaction(OGRLayerShadow *self){
    3493               1 :     return OGR_L_RollbackTransaction(self);
    3494                 :   }
    3495                 : SWIGINTERN OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){
    3496             177 :     OGRSpatialReferenceH ref =  OGR_L_GetSpatialRef(self);
    3497             177 :     if( ref )
    3498             159 :         OSRReference(ref);
    3499             177 :     return (OSRSpatialReferenceShadow*) ref;
    3500                 :   }
    3501                 : SWIGINTERN GIntBig OGRLayerShadow_GetFeaturesRead(OGRLayerShadow *self){
    3502               0 :     return OGR_L_GetFeaturesRead(self);
    3503                 :   }
    3504                 : SWIGINTERN OGRErr OGRLayerShadow_SetIgnoredFields(OGRLayerShadow *self,char const **options){
    3505               3 :     return OGR_L_SetIgnoredFields( self, options );
    3506                 :   }
    3507                 : SWIGINTERN void delete_OGRFeatureShadow(OGRFeatureShadow *self){
    3508           24970 :     OGR_F_Destroy(self);
    3509                 :   }
    3510                 : SWIGINTERN OGRFeatureShadow *new_OGRFeatureShadow(OGRFeatureDefnShadow *feature_def){
    3511           18680 :       return (OGRFeatureShadow*) OGR_F_Create( feature_def );
    3512                 :   }
    3513                 : SWIGINTERN OGRFeatureDefnShadow *OGRFeatureShadow_GetDefnRef(OGRFeatureShadow *self){
    3514              76 :     return (OGRFeatureDefnShadow*) OGR_F_GetDefnRef(self);
    3515                 :   }
    3516                 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeometry(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    3517           15496 :     return OGR_F_SetGeometry(self, geom);
    3518                 :   }
    3519                 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeometryDirectly(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    3520             218 :     return OGR_F_SetGeometryDirectly(self, geom);
    3521                 :   }
    3522                 : SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeometryRef(OGRFeatureShadow *self){
    3523            2466 :     return (OGRGeometryShadow*) OGR_F_GetGeometryRef(self);
    3524                 :   }
    3525                 : SWIGINTERN OGRFeatureShadow *OGRFeatureShadow_Clone(OGRFeatureShadow *self){
    3526              36 :     return (OGRFeatureShadow*) OGR_F_Clone(self);
    3527                 :   }
    3528                 : SWIGINTERN bool OGRFeatureShadow_Equal(OGRFeatureShadow *self,OGRFeatureShadow *feature){
    3529              42 :     return (OGR_F_Equal(self, feature) > 0);
    3530                 :   }
    3531                 : SWIGINTERN int OGRFeatureShadow_GetFieldCount(OGRFeatureShadow *self){
    3532            4246 :     return OGR_F_GetFieldCount(self);
    3533                 :   }
    3534                 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
    3535              11 :     return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, id);
    3536                 :   }
    3537                 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *name){
    3538               0 :       int i = OGR_F_GetFieldIndex(self, name);
    3539               0 :       if (i == -1)
    3540               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3541                 :       else
    3542               0 :     return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, i);
    3543               0 :       return NULL;
    3544                 :   }
    3545                 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_0(OGRFeatureShadow *self,int id){
    3546            3097 :     return (const char *) OGR_F_GetFieldAsString(self, id);
    3547                 :   }
    3548                 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_1(OGRFeatureShadow *self,char const *name){
    3549             313 :       int i = OGR_F_GetFieldIndex(self, name);
    3550             313 :       if (i == -1)
    3551               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3552                 :       else
    3553             313 :     return (const char *) OGR_F_GetFieldAsString(self, i);
    3554               0 :       return NULL;
    3555                 :   }
    3556                 : SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_0(OGRFeatureShadow *self,int id){
    3557            2535 :     return OGR_F_GetFieldAsInteger(self, id);
    3558                 :   }
    3559                 : SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_1(OGRFeatureShadow *self,char const *name){
    3560              15 :       int i = OGR_F_GetFieldIndex(self, name);
    3561              15 :       if (i == -1)
    3562               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3563                 :       else
    3564              15 :     return OGR_F_GetFieldAsInteger(self, i);
    3565               0 :       return 0;
    3566                 :   }
    3567                 : SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_0(OGRFeatureShadow *self,int id){
    3568             554 :     return OGR_F_GetFieldAsDouble(self, id);
    3569                 :   }
    3570                 : 
    3571                 :   #define SWIG_From_double   PyFloat_FromDouble 
    3572                 : 
    3573                 : SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_1(OGRFeatureShadow *self,char const *name){
    3574               9 :       int i = OGR_F_GetFieldIndex(self, name);
    3575               9 :       if (i == -1)
    3576               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3577                 :       else
    3578               9 :     return OGR_F_GetFieldAsDouble(self, i);
    3579               0 :       return 0;
    3580                 :   }
    3581                 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime(OGRFeatureShadow *self,int id,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,int *pnSecond,int *pnTZFlag){
    3582                 :       OGR_F_GetFieldAsDateTime(self, id, pnYear, pnMonth, pnDay,
    3583                 :              pnHour, pnMinute, pnSecond,
    3584               1 :              pnTZFlag);
    3585                 :   }
    3586                 : SWIGINTERN void OGRFeatureShadow_GetFieldAsIntegerList(OGRFeatureShadow *self,int id,int *nLen,int const **pList){
    3587               3 :       *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
    3588                 :   }
    3589                 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDoubleList(OGRFeatureShadow *self,int id,int *nLen,double const **pList){
    3590              16 :       *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
    3591                 :   }
    3592                 : SWIGINTERN char **OGRFeatureShadow_GetFieldAsStringList(OGRFeatureShadow *self,int id){
    3593               3 :       return OGR_F_GetFieldAsStringList(self, id);
    3594                 :   }
    3595                 : SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_0(OGRFeatureShadow *self,int id){
    3596            4426 :     return (OGR_F_IsFieldSet(self, id) > 0);
    3597                 :   }
    3598                 : SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_1(OGRFeatureShadow *self,char const *name){
    3599               8 :       int i = OGR_F_GetFieldIndex(self, name);
    3600               8 :       if (i == -1)
    3601               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3602                 :       else
    3603               8 :     return (OGR_F_IsFieldSet(self, i) > 0);
    3604               0 :       return false;
    3605                 :   }
    3606                 : SWIGINTERN int OGRFeatureShadow_GetFieldIndex(OGRFeatureShadow *self,char const *name){
    3607            2143 :       return OGR_F_GetFieldIndex(self, name);
    3608                 :   }
    3609                 : SWIGINTERN int OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
    3610             216 :     return OGR_F_GetFID(self);
    3611                 :   }
    3612                 : SWIGINTERN OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,int fid){
    3613              39 :     return OGR_F_SetFID(self, fid);
    3614                 :   }
    3615                 : SWIGINTERN void OGRFeatureShadow_DumpReadable(OGRFeatureShadow *self){
    3616               0 :     OGR_F_DumpReadable(self, NULL);
    3617                 :   }
    3618                 : SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_0(OGRFeatureShadow *self,int id){
    3619               0 :     OGR_F_UnsetField(self, id);
    3620                 :   }
    3621                 : SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_1(OGRFeatureShadow *self,char const *name){
    3622               0 :       int i = OGR_F_GetFieldIndex(self, name);
    3623               0 :       if (i == -1)
    3624               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3625                 :       else
    3626               0 :     OGR_F_UnsetField(self, i);
    3627                 :   }
    3628                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_0(OGRFeatureShadow *self,int id,char const *value){
    3629            2751 :     OGR_F_SetFieldString(self, id, value);
    3630                 :   }
    3631                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_1(OGRFeatureShadow *self,char const *name,char const *value){
    3632             302 :       int i = OGR_F_GetFieldIndex(self, name);
    3633             302 :       if (i == -1)
    3634               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3635                 :       else
    3636             302 :     OGR_F_SetFieldString(self, i, value);
    3637                 :   }
    3638                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_2(OGRFeatureShadow *self,int id,int value){
    3639            8130 :     OGR_F_SetFieldInteger(self, id, value);
    3640                 :   }
    3641                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_3(OGRFeatureShadow *self,char const *name,int value){
    3642              69 :       int i = OGR_F_GetFieldIndex(self, name);
    3643              69 :       if (i == -1)
    3644               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3645                 :       else
    3646              69 :     OGR_F_SetFieldInteger(self, i, value);
    3647                 :   }
    3648                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_4(OGRFeatureShadow *self,int id,double value){
    3649               9 :     OGR_F_SetFieldDouble(self, id, value);
    3650                 :   }
    3651                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_5(OGRFeatureShadow *self,char const *name,double value){
    3652              38 :       int i = OGR_F_GetFieldIndex(self, name);
    3653              38 :       if (i == -1)
    3654               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3655                 :       else
    3656              38 :     OGR_F_SetFieldDouble(self, i, value);
    3657                 :   }
    3658                 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_6(OGRFeatureShadow *self,int id,int year,int month,int day,int hour,int minute,int second,int tzflag){
    3659                 :     OGR_F_SetFieldDateTime(self, id, year, month, day,
    3660                 :                              hour, minute, second, 
    3661              24 :                              tzflag);
    3662                 :   }
    3663                 : 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){
    3664               1 :       int i = OGR_F_GetFieldIndex(self, name);
    3665               1 :       if (i == -1)
    3666               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3667                 :       else
    3668                 :     OGR_F_SetFieldDateTime(self, i, year, month, day,
    3669                 :          hour, minute, second, 
    3670               1 :          tzflag);
    3671                 :   }
    3672                 : SWIGINTERN void OGRFeatureShadow_SetFieldIntegerList(OGRFeatureShadow *self,int id,int nList,int *pList){
    3673               6 :       OGR_F_SetFieldIntegerList(self, id, nList, pList);
    3674                 :   }
    3675                 : SWIGINTERN void OGRFeatureShadow_SetFieldDoubleList(OGRFeatureShadow *self,int id,int nList,double *pList){
    3676              29 :       OGR_F_SetFieldDoubleList(self, id, nList, pList);
    3677                 :   }
    3678                 : SWIGINTERN void OGRFeatureShadow_SetFieldStringList(OGRFeatureShadow *self,int id,char **pList){
    3679              14 :       OGR_F_SetFieldStringList(self, id, pList);
    3680                 :   }
    3681                 : SWIGINTERN OGRErr OGRFeatureShadow_SetFrom(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving=1){
    3682             227 :     return OGR_F_SetFrom(self, other, forgiving);
    3683                 :   }
    3684                 : SWIGINTERN OGRErr OGRFeatureShadow_SetFromWithMap(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving,int nList,int *pList){
    3685             361 :     if (nList != OGR_F_GetFieldCount(other))
    3686                 :     {
    3687                 :         CPLError(CE_Failure, CPLE_AppDefined,
    3688               0 :                  "The size of map doesn't match with the field count of the source feature");
    3689               0 :         return OGRERR_FAILURE;
    3690                 :     }
    3691             361 :     return OGR_F_SetFromWithMap(self, other, forgiving, pList);
    3692                 :   }
    3693                 : SWIGINTERN char const *OGRFeatureShadow_GetStyleString(OGRFeatureShadow *self){
    3694              78 :     return (const char*) OGR_F_GetStyleString(self);
    3695                 :   }
    3696                 : SWIGINTERN void OGRFeatureShadow_SetStyleString(OGRFeatureShadow *self,char const *the_string){
    3697               3 :     OGR_F_SetStyleString(self, the_string);
    3698                 :   }
    3699                 : SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_0(OGRFeatureShadow *self,int id){
    3700            3709 :     return (OGRFieldType) OGR_Fld_GetType( OGR_F_GetFieldDefnRef( self, id));
    3701                 :   }
    3702                 : SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_1(OGRFeatureShadow *self,char const *name){
    3703               0 :       int i = OGR_F_GetFieldIndex(self, name);
    3704               0 :       if (i == -1) {
    3705               0 :     CPLError(CE_Failure, 1, "No such field: '%s'", name);
    3706               0 :     return (OGRFieldType)0;
    3707                 :       } else
    3708                 :     return (OGRFieldType) OGR_Fld_GetType( 
    3709                 :         OGR_F_GetFieldDefnRef( self,  i )
    3710               0 :         );
    3711                 :   }
    3712                 : SWIGINTERN void delete_OGRFeatureDefnShadow(OGRFeatureDefnShadow *self){
    3713                 :     /*OGR_FD_Destroy(self);*/
    3714              24 :     OGR_FD_Release( OGRFeatureDefnH(self) );
    3715                 :   }
    3716                 : SWIGINTERN OGRFeatureDefnShadow *new_OGRFeatureDefnShadow(char const *name_null_ok=NULL){
    3717              24 :     OGRFeatureDefnH h = OGR_FD_Create(name_null_ok);
    3718              24 :     OGR_FD_Reference(h);
    3719              24 :     return (OGRFeatureDefnShadow* )h;
    3720                 :   }
    3721                 : SWIGINTERN char const *OGRFeatureDefnShadow_GetName(OGRFeatureDefnShadow *self){
    3722             112 :     return OGR_FD_GetName(self);
    3723                 :   }
    3724                 : SWIGINTERN int OGRFeatureDefnShadow_GetFieldCount(OGRFeatureDefnShadow *self){
    3725             363 :     return OGR_FD_GetFieldCount(self);
    3726                 :   }
    3727                 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureDefnShadow_GetFieldDefn(OGRFeatureDefnShadow *self,int i){
    3728            1164 :     return (OGRFieldDefnShadow*) OGR_FD_GetFieldDefn(self, i);
    3729                 :   }
    3730                 : SWIGINTERN int OGRFeatureDefnShadow_GetFieldIndex(OGRFeatureDefnShadow *self,char const *name){
    3731             776 :       return OGR_FD_GetFieldIndex(self, name);
    3732                 :   }
    3733                 : SWIGINTERN void OGRFeatureDefnShadow_AddFieldDefn(OGRFeatureDefnShadow *self,OGRFieldDefnShadow *defn){
    3734             210 :     OGR_FD_AddFieldDefn(self, defn);
    3735                 :   }
    3736                 : SWIGINTERN OGRwkbGeometryType OGRFeatureDefnShadow_GetGeomType(OGRFeatureDefnShadow *self){
    3737             133 :     return (OGRwkbGeometryType) OGR_FD_GetGeomType(self);
    3738                 :   }
    3739                 : SWIGINTERN void OGRFeatureDefnShadow_SetGeomType(OGRFeatureDefnShadow *self,OGRwkbGeometryType geom_type){
    3740               0 :     OGR_FD_SetGeomType(self, geom_type);
    3741                 :   }
    3742                 : SWIGINTERN int OGRFeatureDefnShadow_GetReferenceCount(OGRFeatureDefnShadow *self){
    3743               0 :     return OGR_FD_GetReferenceCount(self);
    3744                 :   }
    3745                 : SWIGINTERN int OGRFeatureDefnShadow_IsGeometryIgnored(OGRFeatureDefnShadow *self){
    3746               4 :     return OGR_FD_IsGeometryIgnored(self);
    3747                 :   }
    3748                 : SWIGINTERN void OGRFeatureDefnShadow_SetGeometryIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    3749               2 :     return OGR_FD_SetGeometryIgnored(self,bIgnored);
    3750                 :   }
    3751                 : SWIGINTERN int OGRFeatureDefnShadow_IsStyleIgnored(OGRFeatureDefnShadow *self){
    3752               2 :     return OGR_FD_IsStyleIgnored(self);
    3753                 :   }
    3754                 : SWIGINTERN void OGRFeatureDefnShadow_SetStyleIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    3755               0 :     return OGR_FD_SetStyleIgnored(self,bIgnored);
    3756                 :   }
    3757                 : 
    3758                 :     static int ValidateOGRFieldType(OGRFieldType field_type)
    3759                 :     {
    3760            4565 :         switch(field_type)
    3761                 :         {
    3762                 :             case OFTInteger:
    3763                 :             case OFTIntegerList:
    3764                 :             case OFTReal:
    3765                 :             case OFTRealList:
    3766                 :             case OFTString:
    3767                 :             case OFTStringList:
    3768                 :             case OFTBinary:
    3769                 :             case OFTDate:
    3770                 :             case OFTTime:
    3771                 :             case OFTDateTime:
    3772            4565 :                 return TRUE;
    3773                 :             default:
    3774               0 :                 CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field type value");
    3775               0 :                 return FALSE;
    3776                 :         }
    3777                 :     }
    3778                 : 
    3779                 : SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
    3780            4565 :     OGR_Fld_Destroy(self);
    3781                 :   }
    3782                 : SWIGINTERN OGRFieldDefnShadow *new_OGRFieldDefnShadow(char const *name_null_ok="unnamed",OGRFieldType field_type=OFTString){
    3783            4565 :     if (ValidateOGRFieldType(field_type))
    3784            4565 :         return (OGRFieldDefnShadow*) OGR_Fld_Create(name_null_ok, field_type);
    3785                 :     else
    3786               0 :         return NULL;
    3787                 :   }
    3788                 : SWIGINTERN char const *OGRFieldDefnShadow_GetName(OGRFieldDefnShadow *self){
    3789             247 :     return (const char *) OGR_Fld_GetNameRef(self);
    3790                 :   }
    3791                 : SWIGINTERN char const *OGRFieldDefnShadow_GetNameRef(OGRFieldDefnShadow *self){
    3792             510 :     return (const char *) OGR_Fld_GetNameRef(self);
    3793                 :   }
    3794                 : SWIGINTERN void OGRFieldDefnShadow_SetName(OGRFieldDefnShadow *self,char const *name){
    3795               1 :     OGR_Fld_SetName(self, name);
    3796                 :   }
    3797                 : SWIGINTERN OGRFieldType OGRFieldDefnShadow_GetType(OGRFieldDefnShadow *self){
    3798             492 :     return OGR_Fld_GetType(self);
    3799                 :   }
    3800                 : SWIGINTERN void OGRFieldDefnShadow_SetType(OGRFieldDefnShadow *self,OGRFieldType type){
    3801               0 :     if (ValidateOGRFieldType(type))
    3802               0 :         OGR_Fld_SetType(self, type);
    3803                 :   }
    3804                 : SWIGINTERN OGRJustification OGRFieldDefnShadow_GetJustify(OGRFieldDefnShadow *self){
    3805               0 :     return OGR_Fld_GetJustify(self);
    3806                 :   }
    3807                 : SWIGINTERN void OGRFieldDefnShadow_SetJustify(OGRFieldDefnShadow *self,OGRJustification justify){
    3808               0 :     OGR_Fld_SetJustify(self, justify);
    3809                 :   }
    3810                 : SWIGINTERN int OGRFieldDefnShadow_GetWidth(OGRFieldDefnShadow *self){
    3811             499 :     return OGR_Fld_GetWidth(self);
    3812                 :   }
    3813                 : SWIGINTERN void OGRFieldDefnShadow_SetWidth(OGRFieldDefnShadow *self,int width){
    3814             182 :     OGR_Fld_SetWidth(self, width);
    3815                 :   }
    3816                 : SWIGINTERN int OGRFieldDefnShadow_GetPrecision(OGRFieldDefnShadow *self){
    3817             195 :     return OGR_Fld_GetPrecision(self);
    3818                 :   }
    3819                 : SWIGINTERN void OGRFieldDefnShadow_SetPrecision(OGRFieldDefnShadow *self,int precision){
    3820             120 :     OGR_Fld_SetPrecision(self, precision);
    3821                 :   }
    3822                 : SWIGINTERN char const *OGRFieldDefnShadow_GetTypeName(OGRFieldDefnShadow *self){
    3823               0 :       return OGR_GetFieldTypeName(OGR_Fld_GetType(self));
    3824                 :   }
    3825                 : SWIGINTERN char const *OGRFieldDefnShadow_GetFieldTypeName(OGRFieldDefnShadow *self,OGRFieldType type){
    3826              32 :     return OGR_GetFieldTypeName(type);
    3827                 :   }
    3828                 : SWIGINTERN int OGRFieldDefnShadow_IsIgnored(OGRFieldDefnShadow *self){
    3829               4 :     return OGR_Fld_IsIgnored( self );
    3830                 :   }
    3831                 : SWIGINTERN void OGRFieldDefnShadow_SetIgnored(OGRFieldDefnShadow *self,int bIgnored){
    3832               0 :     return OGR_Fld_SetIgnored( self, bIgnored );
    3833                 :   }
    3834                 : 
    3835              72 :   OGRGeometryShadow* CreateGeometryFromWkb( int len, char *bin_string, 
    3836                 :                                             OSRSpatialReferenceShadow *reference=NULL ) {
    3837              72 :     OGRGeometryH geom = NULL;
    3838                 :     OGRErr err = OGR_G_CreateFromWkb( (unsigned char *) bin_string,
    3839                 :                                       reference,
    3840                 :                                       &geom,
    3841              72 :                                       len );
    3842              72 :     if (err != 0 ) {
    3843               2 :        CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
    3844               2 :        return NULL;
    3845                 :     }
    3846              70 :     return (OGRGeometryShadow*) geom;
    3847                 :   }
    3848                 :  
    3849                 : 
    3850                 : 
    3851           16511 :   OGRGeometryShadow* CreateGeometryFromWkt( char **val, 
    3852                 :                                       OSRSpatialReferenceShadow *reference=NULL ) {
    3853           16511 :     OGRGeometryH geom = NULL;
    3854                 :     OGRErr err = OGR_G_CreateFromWkt(val,
    3855                 :                                       reference,
    3856           16511 :                                       &geom);
    3857           16511 :     if (err != 0 ) {
    3858             175 :        CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
    3859             175 :        return NULL;
    3860                 :     }
    3861           16336 :     return (OGRGeometryShadow*) geom;
    3862                 :   }
    3863                 :  
    3864                 : 
    3865                 : 
    3866             153 :   OGRGeometryShadow *CreateGeometryFromGML( const char * input_string ) {
    3867             153 :     OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateFromGML(input_string);
    3868             153 :     return geom;
    3869                 :   }
    3870                 :  
    3871                 : 
    3872                 : 
    3873               0 :   OGRGeometryShadow *CreateGeometryFromJson( const char * input_string ) {
    3874               0 :     OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateGeometryFromJson(input_string);
    3875               0 :     return geom;
    3876                 :   }
    3877                 :  
    3878                 : 
    3879                 : 
    3880               5 :   OGRGeometryShadow* BuildPolygonFromEdges( OGRGeometryShadow*  hLineCollection,  
    3881                 :                                             int bBestEffort = 0, 
    3882                 :                                             int bAutoClose = 0, 
    3883                 :                                             double dfTolerance=0) {
    3884                 :   
    3885               5 :   OGRGeometryH hPolygon = NULL;
    3886                 :   
    3887                 :   OGRErr eErr;
    3888                 : 
    3889                 :   hPolygon = OGRBuildPolygonFromEdges( hLineCollection, bBestEffort, 
    3890               5 :                                        bAutoClose, dfTolerance, &eErr );
    3891                 : 
    3892               5 :   if (eErr != OGRERR_NONE ) {
    3893               2 :     CPLError(CE_Failure, eErr, "%s", OGRErrMessages(eErr));
    3894               2 :     return NULL;
    3895                 :   }
    3896                 : 
    3897               3 :   return (OGRGeometryShadow* )hPolygon;
    3898                 :   }
    3899                 : 
    3900                 : 
    3901               1 :   OGRGeometryShadow* ApproximateArcAngles( 
    3902                 :         double dfCenterX, double dfCenterY, double dfZ,
    3903                 :     double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation, 
    3904                 :         double dfStartAngle, double dfEndAngle,
    3905                 :         double dfMaxAngleStepSizeDegrees ) {
    3906                 :   
    3907                 :   return (OGRGeometryShadow* )OGR_G_ApproximateArcAngles( 
    3908                 :              dfCenterX, dfCenterY, dfZ, 
    3909                 :              dfPrimaryRadius, dfSecondaryAxis, dfRotation,
    3910               1 :              dfStartAngle, dfEndAngle, dfMaxAngleStepSizeDegrees );
    3911                 :   }
    3912                 : 
    3913                 : 
    3914              36 : OGRGeometryShadow* ForceToPolygon( OGRGeometryShadow *geom_in ) {
    3915              36 :  if (geom_in == NULL)
    3916               1 :      return NULL;
    3917              35 :  return (OGRGeometryShadow* )OGR_G_ForceToPolygon( OGR_G_Clone(geom_in) );
    3918                 : }
    3919                 : 
    3920                 : 
    3921              31 : OGRGeometryShadow* ForceToMultiPolygon( OGRGeometryShadow *geom_in ) {
    3922              31 :  if (geom_in == NULL)
    3923               1 :      return NULL;
    3924              30 :  return (OGRGeometryShadow* )OGR_G_ForceToMultiPolygon( OGR_G_Clone(geom_in) );
    3925                 : }
    3926                 : 
    3927                 : 
    3928              27 : OGRGeometryShadow* ForceToMultiPoint( OGRGeometryShadow *geom_in ) {
    3929              27 :  if (geom_in == NULL)
    3930               1 :      return NULL;
    3931              26 :  return (OGRGeometryShadow* )OGR_G_ForceToMultiPoint( OGR_G_Clone(geom_in) );
    3932                 : }
    3933                 : 
    3934                 : 
    3935              29 : OGRGeometryShadow* ForceToMultiLineString( OGRGeometryShadow *geom_in ) {
    3936              29 :  if (geom_in == NULL)
    3937               1 :      return NULL;
    3938              28 :  return (OGRGeometryShadow* )OGR_G_ForceToMultiLineString( OGR_G_Clone(geom_in) );
    3939                 : }
    3940                 : 
    3941                 : SWIGINTERN void delete_OGRGeometryShadow(OGRGeometryShadow *self){
    3942           17461 :     OGR_G_DestroyGeometry( self );
    3943                 :   }
    3944                 : SWIGINTERN OGRGeometryShadow *new_OGRGeometryShadow(OGRwkbGeometryType type=wkbUnknown,char *wkt=0,int wkb=0,char *wkb_buf=0,char *gml=0){
    3945              51 :     if (type != wkbUnknown ) {
    3946              36 :       return (OGRGeometryShadow*) OGR_G_CreateGeometry( type );
    3947                 :     }
    3948              15 :     else if ( wkt != 0 ) {
    3949              14 :       return CreateGeometryFromWkt( &wkt );
    3950                 :     }
    3951               1 :     else if ( wkb != 0 ) {
    3952               0 :       return CreateGeometryFromWkb( wkb, wkb_buf );
    3953                 :     }
    3954               1 :     else if ( gml != 0 ) {
    3955               0 :       return CreateGeometryFromGML( gml );
    3956                 :     }
    3957                 :     // throw?
    3958                 :     else {
    3959               1 :         CPLError(CE_Failure, 1, "Empty geometries cannot be constructed");
    3960               1 :         return NULL;}
    3961                 : 
    3962                 :   }
    3963                 : 
    3964                 : #define t_output_helper SWIG_Python_AppendOutput
    3965                 : 
    3966                 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkt(OGRGeometryShadow *self,char **argout){
    3967            1116 :     return OGR_G_ExportToWkt(self, argout);
    3968                 :   }
    3969                 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkb(OGRGeometryShadow *self,int *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbXDR){
    3970              57 :     *nLen = OGR_G_WkbSize( self );
    3971              57 :     *pBuf = (char *) malloc( *nLen * sizeof(unsigned char) );
    3972              57 :     return OGR_G_ExportToWkb(self, byte_order, (unsigned char*) *pBuf );
    3973                 :   }
    3974                 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToGML(OGRGeometryShadow *self,char **options=0){
    3975              41 :     return (retStringAndCPLFree*) OGR_G_ExportToGMLEx(self, options);
    3976                 :   }
    3977                 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToKML(OGRGeometryShadow *self,char const *altitude_mode=NULL){
    3978               0 :     return (retStringAndCPLFree *) OGR_G_ExportToKML(self, altitude_mode);
    3979                 :   }
    3980                 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToJson(OGRGeometryShadow *self,char **options=0){
    3981               2 :     return (retStringAndCPLFree *) OGR_G_ExportToJsonEx(self, options);
    3982                 :   }
    3983                 : SWIGINTERN void OGRGeometryShadow_AddPoint(OGRGeometryShadow *self,double x,double y,double z=0){
    3984              10 :     OGR_G_AddPoint( self, x, y, z );
    3985                 :   }
    3986                 : SWIGINTERN void OGRGeometryShadow_AddPoint_2D(OGRGeometryShadow *self,double x,double y){
    3987              30 :     OGR_G_AddPoint_2D( self, x, y );
    3988                 :   }
    3989                 : SWIGINTERN OGRErr OGRGeometryShadow_AddGeometryDirectly(OGRGeometryShadow *self,OGRGeometryShadow *other_disown){
    3990               1 :     return OGR_G_AddGeometryDirectly( self, other_disown );
    3991                 :   }
    3992                 : SWIGINTERN OGRErr OGRGeometryShadow_AddGeometry(OGRGeometryShadow *self,OGRGeometryShadow *other){
    3993              47 :     return OGR_G_AddGeometry( self, other );
    3994                 :   }
    3995                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Clone(OGRGeometryShadow *self){
    3996             959 :     return (OGRGeometryShadow*) OGR_G_Clone(self);
    3997                 :   }
    3998                 : SWIGINTERN OGRwkbGeometryType OGRGeometryShadow_GetGeometryType(OGRGeometryShadow *self){
    3999             182 :     return (OGRwkbGeometryType) OGR_G_GetGeometryType(self);
    4000                 :   }
    4001                 : SWIGINTERN char const *OGRGeometryShadow_GetGeometryName(OGRGeometryShadow *self){
    4002            2352 :     return (const char *) OGR_G_GetGeometryName(self);
    4003                 :   }
    4004                 : SWIGINTERN double OGRGeometryShadow_Length(OGRGeometryShadow *self){
    4005               6 :     return OGR_G_Length(self);
    4006                 :   }
    4007                 : SWIGINTERN double OGRGeometryShadow_Area(OGRGeometryShadow *self){
    4008               3 :     return OGR_G_Area(self);
    4009                 :   }
    4010                 : SWIGINTERN double OGRGeometryShadow_GetArea(OGRGeometryShadow *self){
    4011               4 :     return OGR_G_Area(self);
    4012                 :   }
    4013                 : SWIGINTERN int OGRGeometryShadow_GetPointCount(OGRGeometryShadow *self){
    4014            3032 :     return OGR_G_GetPointCount(self);
    4015                 :   }
    4016               8 : SWIGINTERN void OGRGeometryShadow_GetPoints(OGRGeometryShadow *self,int *pnCount,double **ppadfXY,double **ppadfZ,int nCoordDimension=0){
    4017               8 :     int nPoints = OGR_G_GetPointCount(self);
    4018               8 :     *pnCount = nPoints;
    4019               8 :     if (nPoints == 0)
    4020                 :     {
    4021               0 :         *ppadfXY = NULL;
    4022               0 :         *ppadfZ = NULL;
    4023                 :     }
    4024               8 :     *ppadfXY = (double*)VSIMalloc(2 * sizeof(double) * nPoints);
    4025               8 :     if (*ppadfXY == NULL)
    4026                 :     {
    4027               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate resulting array");
    4028               0 :         *pnCount = 0;
    4029               0 :         return;
    4030                 :     }
    4031               8 :     if (nCoordDimension <= 0)
    4032               4 :         nCoordDimension = OGR_G_GetCoordinateDimension(self);
    4033               8 :     *ppadfZ = (nCoordDimension == 3) ? (double*)VSIMalloc(sizeof(double) * nPoints) : NULL;
    4034                 :     OGR_G_GetPoints(self,
    4035                 :                     *ppadfXY, 2 * sizeof(double),
    4036                 :                     (*ppadfXY) + 1, 2 * sizeof(double),
    4037               8 :                     *ppadfZ, sizeof(double));
    4038                 :   }
    4039                 : SWIGINTERN double OGRGeometryShadow_GetX(OGRGeometryShadow *self,int point=0){
    4040           15108 :     return OGR_G_GetX(self, point);
    4041                 :   }
    4042                 : SWIGINTERN double OGRGeometryShadow_GetY(OGRGeometryShadow *self,int point=0){
    4043           15108 :     return OGR_G_GetY(self, point);
    4044                 :   }
    4045                 : SWIGINTERN double OGRGeometryShadow_GetZ(OGRGeometryShadow *self,int point=0){
    4046           14862 :     return OGR_G_GetZ(self, point);
    4047                 :   }
    4048                 : 
    4049                 : static PyObject *
    4050              97 : CreateTupleFromDoubleArray( double *first, unsigned int size ) {
    4051              97 :   PyObject *out = PyTuple_New( size );
    4052             493 :   for( unsigned int i=0; i<size; i++ ) {
    4053             396 :     PyObject *val = PyFloat_FromDouble( *first );
    4054             396 :     ++first;
    4055             396 :     PyTuple_SetItem( out, i, val );
    4056                 :   }
    4057              97 :   return out;
    4058                 : }
    4059                 : 
    4060                 : SWIGINTERN void OGRGeometryShadow_GetPoint(OGRGeometryShadow *self,int iPoint=0,double argout[3]=NULL){
    4061                 : 
    4062               2 :     OGR_G_GetPoint( self, iPoint, argout+0, argout+1, argout+2 );
    4063                 :   }
    4064                 : SWIGINTERN void OGRGeometryShadow_GetPoint_2D(OGRGeometryShadow *self,int iPoint=0,double argout[2]=NULL){
    4065                 : 
    4066               2 :     OGR_G_GetPoint( self, iPoint, argout+0, argout+1, NULL );
    4067                 :   }
    4068                 : SWIGINTERN int OGRGeometryShadow_GetGeometryCount(OGRGeometryShadow *self){
    4069            3857 :     return OGR_G_GetGeometryCount(self);
    4070                 :   }
    4071                 : SWIGINTERN void OGRGeometryShadow_SetPoint(OGRGeometryShadow *self,int point,double x,double y,double z=0){
    4072             250 :     OGR_G_SetPoint(self, point, x, y, z);
    4073                 :   }
    4074                 : SWIGINTERN void OGRGeometryShadow_SetPoint_2D(OGRGeometryShadow *self,int point,double x,double y){
    4075               1 :     OGR_G_SetPoint_2D(self, point, x, y);
    4076                 :   }
    4077                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetGeometryRef(OGRGeometryShadow *self,int geom){
    4078            1342 :     return (OGRGeometryShadow*) OGR_G_GetGeometryRef(self, geom);
    4079                 :   }
    4080                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Simplify(OGRGeometryShadow *self,double tolerance){
    4081               1 :     return (OGRGeometryShadow*) OGR_G_Simplify(self, tolerance);
    4082                 :   }
    4083                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SimplifyPreserveTopology(OGRGeometryShadow *self,double tolerance){
    4084               1 :     return (OGRGeometryShadow*) OGR_G_SimplifyPreserveTopology(self, tolerance);
    4085                 :   }
    4086                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Boundary(OGRGeometryShadow *self){
    4087               1 :     return (OGRGeometryShadow*) OGR_G_Boundary(self);
    4088                 :   }
    4089                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetBoundary(OGRGeometryShadow *self){
    4090               5 :     return (OGRGeometryShadow*) OGR_G_Boundary(self);
    4091                 :   }
    4092                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConvexHull(OGRGeometryShadow *self){
    4093               1 :     return (OGRGeometryShadow*) OGR_G_ConvexHull(self);
    4094                 :   }
    4095                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer(OGRGeometryShadow *self,double distance,int quadsecs=30){
    4096               1 :     return (OGRGeometryShadow*) OGR_G_Buffer( self, distance, quadsecs );
    4097                 :   }
    4098                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Intersection(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4099              45 :     return (OGRGeometryShadow*) OGR_G_Intersection( self, other );
    4100                 :   }
    4101                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Union(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4102               3 :     return (OGRGeometryShadow*) OGR_G_Union( self, other );
    4103                 :   }
    4104                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_UnionCascaded(OGRGeometryShadow *self){
    4105               1 :     return (OGRGeometryShadow*) OGR_G_UnionCascaded( self );
    4106                 :   }
    4107                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Difference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4108               1 :     return (OGRGeometryShadow*) OGR_G_Difference( self, other );
    4109                 :   }
    4110                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4111               1 :     return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
    4112                 :   }
    4113                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymmetricDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4114               1 :     return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
    4115                 :   }
    4116                 : SWIGINTERN double OGRGeometryShadow_Distance(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4117               1 :     return OGR_G_Distance(self, other);
    4118                 :   }
    4119                 : SWIGINTERN void OGRGeometryShadow_Empty(OGRGeometryShadow *self){
    4120               2 :     OGR_G_Empty(self);
    4121                 :   }
    4122                 : SWIGINTERN bool OGRGeometryShadow_IsEmpty(OGRGeometryShadow *self){
    4123              58 :     return (OGR_G_IsEmpty(self) > 0);
    4124                 :   }
    4125                 : SWIGINTERN bool OGRGeometryShadow_IsValid(OGRGeometryShadow *self){
    4126               2 :     return (OGR_G_IsValid(self) > 0);
    4127                 :   }
    4128                 : SWIGINTERN bool OGRGeometryShadow_IsSimple(OGRGeometryShadow *self){
    4129               2 :     return (OGR_G_IsSimple(self) > 0);
    4130                 :   }
    4131                 : SWIGINTERN bool OGRGeometryShadow_IsRing(OGRGeometryShadow *self){
    4132               1 :     return (OGR_G_IsRing(self) > 0);
    4133                 :   }
    4134                 : SWIGINTERN bool OGRGeometryShadow_Intersects(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4135               0 :     return (OGR_G_Intersects(self, other) > 0);
    4136                 :   }
    4137                 : SWIGINTERN bool OGRGeometryShadow_Intersect(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4138               2 :     return (OGR_G_Intersects(self, other) > 0);
    4139                 :   }
    4140                 : SWIGINTERN bool OGRGeometryShadow_Equals(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4141               0 :     return (OGR_G_Equals(self, other) > 0);
    4142                 :   }
    4143                 : SWIGINTERN bool OGRGeometryShadow_Equal(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4144               1 :     return (OGR_G_Equals(self, other) > 0);
    4145                 :   }
    4146                 : SWIGINTERN bool OGRGeometryShadow_Disjoint(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4147               2 :     return (OGR_G_Disjoint(self, other) > 0);
    4148                 :   }
    4149                 : SWIGINTERN bool OGRGeometryShadow_Touches(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4150               2 :     return (OGR_G_Touches(self, other) > 0);
    4151                 :   }
    4152                 : SWIGINTERN bool OGRGeometryShadow_Crosses(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4153               2 :     return (OGR_G_Crosses(self, other) > 0);
    4154                 :   }
    4155                 : SWIGINTERN bool OGRGeometryShadow_Within(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4156               2 :     return (OGR_G_Within(self, other) > 0);
    4157                 :   }
    4158                 : SWIGINTERN bool OGRGeometryShadow_Contains(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4159               2 :     return (OGR_G_Contains(self, other) > 0);
    4160                 :   }
    4161                 : SWIGINTERN bool OGRGeometryShadow_Overlaps(OGRGeometryShadow *self,OGRGeometryShadow *other){
    4162               2 :     return (OGR_G_Overlaps(self, other) > 0);
    4163                 :   }
    4164                 : SWIGINTERN OGRErr OGRGeometryShadow_TransformTo(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    4165               1 :     return OGR_G_TransformTo(self, reference);
    4166                 :   }
    4167                 : SWIGINTERN OGRErr OGRGeometryShadow_Transform(OGRGeometryShadow *self,OSRCoordinateTransformationShadow *trans){
    4168              12 :     return OGR_G_Transform(self, trans);
    4169                 :   }
    4170                 : SWIGINTERN OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){
    4171               2 :     OGRSpatialReferenceH ref =  OGR_G_GetSpatialReference(self);
    4172               2 :     if( ref )
    4173               2 :         OSRReference(ref);
    4174               2 :     return (OSRSpatialReferenceShadow*) ref;
    4175                 :   }
    4176                 : SWIGINTERN void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    4177             312 :     OGR_G_AssignSpatialReference(self, reference);
    4178                 :   }
    4179                 : SWIGINTERN void OGRGeometryShadow_CloseRings(OGRGeometryShadow *self){
    4180               4 :     OGR_G_CloseRings(self);
    4181                 :   }
    4182                 : SWIGINTERN void OGRGeometryShadow_FlattenTo2D(OGRGeometryShadow *self){
    4183               1 :     OGR_G_FlattenTo2D(self);
    4184                 :   }
    4185                 : SWIGINTERN void OGRGeometryShadow_Segmentize(OGRGeometryShadow *self,double dfMaxLength){
    4186               1 :     OGR_G_Segmentize(self, dfMaxLength);
    4187                 :   }
    4188                 : SWIGINTERN void OGRGeometryShadow_GetEnvelope(OGRGeometryShadow *self,double argout[4]){
    4189              25 :     OGR_G_GetEnvelope(self, (OGREnvelope*)argout);
    4190                 :   }
    4191                 : SWIGINTERN void OGRGeometryShadow_GetEnvelope3D(OGRGeometryShadow *self,double argout[6]){
    4192               7 :     OGR_G_GetEnvelope3D(self, (OGREnvelope3D*)argout);
    4193                 :   }
    4194                 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
    4195               4 :     OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint );
    4196               4 :     OGR_G_Centroid( self, pt );
    4197               4 :     return pt;
    4198                 :   }
    4199                 : SWIGINTERN int OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
    4200               0 :     return OGR_G_WkbSize(self);
    4201                 :   }
    4202                 : SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
    4203              37 :     return OGR_G_GetCoordinateDimension(self);
    4204                 :   }
    4205                 : SWIGINTERN void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
    4206               0 :     OGR_G_SetCoordinateDimension(self, dimension);
    4207                 :   }
    4208                 : SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
    4209               1 :     return OGR_G_GetDimension(self);
    4210                 :   }
    4211                 : 
    4212               0 : char const *OGRDriverShadow_get_name( OGRDriverShadow *h ) {
    4213               0 :   return OGR_Dr_GetName( h );
    4214                 : }
    4215                 : 
    4216               0 : char const *OGRDataSourceShadow_get_name( OGRDataSourceShadow *h ) {
    4217               0 :   return OGR_DS_GetName( h );
    4218                 : }
    4219                 : 
    4220               0 : char const *OGRDriverShadow_name_get( OGRDriverShadow *h ) {
    4221               0 :   return OGR_Dr_GetName( h );
    4222                 : }
    4223                 : 
    4224               0 : char const *OGRDataSourceShadow_name_get( OGRDataSourceShadow *h ) {
    4225               0 :   return OGR_DS_GetName( h );
    4226                 : }
    4227                 : 
    4228                 : 
    4229               1 :   OGRDataSourceShadow* GetOpenDS(int ds_number) {
    4230               1 :     OGRDataSourceShadow* layer = (OGRDataSourceShadow*) OGRGetOpenDS(ds_number);
    4231               1 :     return layer;
    4232                 :   }
    4233                 : 
    4234                 : 
    4235             703 :   OGRDataSourceShadow* Open( const char *utf8_path, int update =0 ) {
    4236             703 :     CPLErrorReset();
    4237             703 :     OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpen(utf8_path,update,NULL);
    4238             703 :     if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    4239                 :     {
    4240                 :         CPLDebug( "SWIG", 
    4241                 :       "OGROpen() succeeded, but an error is posted, so we destroy"
    4242               0 :       " the datasource and fail at swig level." );
    4243               0 :         OGRReleaseDataSource(ds);
    4244               0 :         ds = NULL;
    4245                 :     }
    4246                 :   
    4247             703 :     return ds;
    4248                 :   }
    4249                 : 
    4250                 : 
    4251               9 :   OGRDataSourceShadow* OpenShared( const char *utf8_path, int update =0 ) {
    4252               9 :     CPLErrorReset();
    4253               9 :     OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpenShared(utf8_path,update,NULL);
    4254               9 :     if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    4255                 :     {
    4256               0 :         OGRReleaseDataSource(ds);
    4257               0 :         ds = NULL;
    4258                 :     }
    4259                 :   
    4260               9 :     return ds;
    4261                 :   }
    4262                 : 
    4263                 : 
    4264             366 : OGRDriverShadow* GetDriverByName( char const *name ) {
    4265             366 :   return (OGRDriverShadow*) OGRGetDriverByName( name );
    4266                 : }
    4267                 : 
    4268               0 : OGRDriverShadow* GetDriver(int driver_number) {
    4269               0 :   return (OGRDriverShadow*) OGRGetDriver(driver_number);
    4270                 : }
    4271                 : 
    4272                 : 
    4273              53 :   char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    4274                 :     int nResArgCount;
    4275                 : 
    4276                 :     nResArgCount = 
    4277              53 :       OGRGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions ); 
    4278                 : 
    4279              53 :     if( nResArgCount <= 0 )
    4280               0 :         return NULL;
    4281                 :     else
    4282              53 :         return papszArgv;
    4283                 :   }
    4284                 : 
    4285                 : #ifdef __cplusplus
    4286                 : extern "C" {
    4287                 : #endif
    4288               0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4289               0 :   PyObject *resultobj = 0;
    4290                 :   int result;
    4291                 :   
    4292               0 :   if (!PyArg_ParseTuple(args,(char *)":GetUseExceptions")) SWIG_fail;
    4293               0 :   result = (int)GetUseExceptions();
    4294               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    4295               0 :   return resultobj;
    4296                 : fail:
    4297               0 :   return NULL;
    4298                 : }
    4299                 : 
    4300                 : 
    4301               0 : SWIGINTERN PyObject *_wrap_UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4302               0 :   PyObject *resultobj = 0;
    4303                 :   
    4304               0 :   if (!PyArg_ParseTuple(args,(char *)":UseExceptions")) SWIG_fail;
    4305               0 :   UseExceptions();
    4306               0 :   resultobj = SWIG_Py_Void();
    4307               0 :   return resultobj;
    4308                 : fail:
    4309               0 :   return NULL;
    4310                 : }
    4311                 : 
    4312                 : 
    4313               0 : SWIGINTERN PyObject *_wrap_DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4314               0 :   PyObject *resultobj = 0;
    4315                 :   
    4316               0 :   if (!PyArg_ParseTuple(args,(char *)":DontUseExceptions")) SWIG_fail;
    4317               0 :   DontUseExceptions();
    4318               0 :   resultobj = SWIG_Py_Void();
    4319               0 :   return resultobj;
    4320                 : fail:
    4321               0 :   return NULL;
    4322                 : }
    4323                 : 
    4324                 : 
    4325               0 : SWIGINTERN PyObject *_wrap_Driver_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4326               0 :   PyObject *resultobj = 0;
    4327               0 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4328               0 :   void *argp1 = 0 ;
    4329               0 :   int res1 = 0 ;
    4330               0 :   PyObject * obj0 = 0 ;
    4331               0 :   char *result = 0 ;
    4332                 :   
    4333               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_name_get",&obj0)) SWIG_fail;
    4334               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4335               0 :   if (!SWIG_IsOK(res1)) {
    4336               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_name_get" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4337                 :   }
    4338               0 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4339                 :   {
    4340               0 :     if ( bUseExceptions ) {
    4341               0 :       CPLErrorReset();
    4342                 :     }
    4343               0 :     result = (char *)OGRDriverShadow_name_get(arg1);
    4344               0 :     if ( bUseExceptions ) {
    4345               0 :       CPLErr eclass = CPLGetLastErrorType();
    4346               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4347               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4348                 :       }
    4349                 :     }
    4350                 :   }
    4351               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
    4352               0 :   return resultobj;
    4353                 : fail:
    4354               0 :   return NULL;
    4355                 : }
    4356                 : 
    4357                 : 
    4358             173 : SWIGINTERN PyObject *_wrap_Driver_CreateDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    4359             173 :   PyObject *resultobj = 0;
    4360             173 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4361             173 :   char *arg2 = (char *) 0 ;
    4362             173 :   char **arg3 = (char **) 0 ;
    4363             173 :   void *argp1 = 0 ;
    4364             173 :   int res1 = 0 ;
    4365             173 :   int bToFree2 = 0 ;
    4366             173 :   PyObject * obj0 = 0 ;
    4367             173 :   PyObject * obj1 = 0 ;
    4368             173 :   PyObject * obj2 = 0 ;
    4369                 :   char *  kwnames[] = {
    4370                 :     (char *) "self",(char *) "utf8_path",(char *) "options", NULL 
    4371             173 :   };
    4372             173 :   OGRDataSourceShadow *result = 0 ;
    4373                 :   
    4374             173 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Driver_CreateDataSource",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
    4375             173 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4376             173 :   if (!SWIG_IsOK(res1)) {
    4377               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4378                 :   }
    4379             173 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4380                 :   {
    4381                 :     /* %typemap(in) (const char *utf8_path) */
    4382             173 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    4383             173 :     if (arg2 == NULL)
    4384                 :     {
    4385               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    4386               0 :       SWIG_fail;
    4387                 :     }
    4388                 :   }
    4389             173 :   if (obj2) {
    4390                 :     {
    4391                 :       /* %typemap(in) char **options */
    4392                 :       /* Check if is a list */
    4393              62 :       if ( ! PySequence_Check(obj2)) {
    4394               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    4395               0 :         SWIG_fail;
    4396                 :       }
    4397                 :       
    4398              62 :       int size = PySequence_Size(obj2);
    4399              95 :       for (int i = 0; i < size; i++) {
    4400              33 :         PyObject* pyObj = PySequence_GetItem(obj2,i);
    4401              33 :         if (PyUnicode_Check(pyObj))
    4402                 :         {
    4403                 :           char *pszStr;
    4404                 :           Py_ssize_t nLen;
    4405               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    4406                 : #if PY_VERSION_HEX >= 0x03000000
    4407                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4408                 : #else
    4409               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4410                 : #endif
    4411               0 :           arg3 = CSLAddString( arg3, pszStr );
    4412               0 :           Py_XDECREF(pyUTF8Str);
    4413                 :         }
    4414                 : #if PY_VERSION_HEX >= 0x03000000
    4415                 :         else if (PyBytes_Check(pyObj))
    4416                 :         arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
    4417                 : #else
    4418              33 :         else if (PyString_Check(pyObj))
    4419              33 :         arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
    4420                 : #endif
    4421                 :         else
    4422                 :         {
    4423               0 :           Py_DECREF(pyObj);
    4424               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    4425               0 :           SWIG_fail;
    4426                 :         }
    4427              33 :         Py_DECREF(pyObj);
    4428                 :       }
    4429                 :     }
    4430                 :   }
    4431                 :   {
    4432             173 :     if ( bUseExceptions ) {
    4433               0 :       CPLErrorReset();
    4434                 :     }
    4435             173 :     result = (OGRDataSourceShadow *)OGRDriverShadow_CreateDataSource(arg1,(char const *)arg2,arg3);
    4436             173 :     if ( bUseExceptions ) {
    4437               0 :       CPLErr eclass = CPLGetLastErrorType();
    4438               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4439               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4440                 :       }
    4441                 :     }
    4442                 :   }
    4443             173 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
    4444                 :   {
    4445                 :     /* %typemap(freearg) (const char *utf8_path) */
    4446             173 :     GDALPythonFreeCStr(arg2, bToFree2);
    4447                 :   }
    4448                 :   {
    4449                 :     /* %typemap(freearg) char **options */
    4450             173 :     CSLDestroy( arg3 );
    4451                 :   }
    4452             173 :   return resultobj;
    4453                 : fail:
    4454                 :   {
    4455                 :     /* %typemap(freearg) (const char *utf8_path) */
    4456               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    4457                 :   }
    4458                 :   {
    4459                 :     /* %typemap(freearg) char **options */
    4460               0 :     CSLDestroy( arg3 );
    4461                 :   }
    4462               0 :   return NULL;
    4463                 : }
    4464                 : 
    4465                 : 
    4466               0 : SWIGINTERN PyObject *_wrap_Driver_CopyDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    4467               0 :   PyObject *resultobj = 0;
    4468               0 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4469               0 :   OGRDataSourceShadow *arg2 = (OGRDataSourceShadow *) 0 ;
    4470               0 :   char *arg3 = (char *) 0 ;
    4471               0 :   char **arg4 = (char **) 0 ;
    4472               0 :   void *argp1 = 0 ;
    4473               0 :   int res1 = 0 ;
    4474               0 :   void *argp2 = 0 ;
    4475               0 :   int res2 = 0 ;
    4476               0 :   int bToFree3 = 0 ;
    4477               0 :   PyObject * obj0 = 0 ;
    4478               0 :   PyObject * obj1 = 0 ;
    4479               0 :   PyObject * obj2 = 0 ;
    4480               0 :   PyObject * obj3 = 0 ;
    4481                 :   char *  kwnames[] = {
    4482                 :     (char *) "self",(char *) "copy_ds",(char *) "utf8_path",(char *) "options", NULL 
    4483               0 :   };
    4484               0 :   OGRDataSourceShadow *result = 0 ;
    4485                 :   
    4486               0 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Driver_CopyDataSource",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    4487               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4488               0 :   if (!SWIG_IsOK(res1)) {
    4489               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4490                 :   }
    4491               0 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4492               0 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    4493               0 :   if (!SWIG_IsOK(res2)) {
    4494               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_CopyDataSource" "', argument " "2"" of type '" "OGRDataSourceShadow *""'"); 
    4495                 :   }
    4496               0 :   arg2 = reinterpret_cast< OGRDataSourceShadow * >(argp2);
    4497                 :   {
    4498                 :     /* %typemap(in) (const char *utf8_path) */
    4499               0 :     arg3 = GDALPythonObjectToCStr( obj2, &bToFree3 );
    4500               0 :     if (arg3 == NULL)
    4501                 :     {
    4502               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    4503               0 :       SWIG_fail;
    4504                 :     }
    4505                 :   }
    4506               0 :   if (obj3) {
    4507                 :     {
    4508                 :       /* %typemap(in) char **options */
    4509                 :       /* Check if is a list */
    4510               0 :       if ( ! PySequence_Check(obj3)) {
    4511               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    4512               0 :         SWIG_fail;
    4513                 :       }
    4514                 :       
    4515               0 :       int size = PySequence_Size(obj3);
    4516               0 :       for (int i = 0; i < size; i++) {
    4517               0 :         PyObject* pyObj = PySequence_GetItem(obj3,i);
    4518               0 :         if (PyUnicode_Check(pyObj))
    4519                 :         {
    4520                 :           char *pszStr;
    4521                 :           Py_ssize_t nLen;
    4522               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    4523                 : #if PY_VERSION_HEX >= 0x03000000
    4524                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4525                 : #else
    4526               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4527                 : #endif
    4528               0 :           arg4 = CSLAddString( arg4, pszStr );
    4529               0 :           Py_XDECREF(pyUTF8Str);
    4530                 :         }
    4531                 : #if PY_VERSION_HEX >= 0x03000000
    4532                 :         else if (PyBytes_Check(pyObj))
    4533                 :         arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
    4534                 : #else
    4535               0 :         else if (PyString_Check(pyObj))
    4536               0 :         arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
    4537                 : #endif
    4538                 :         else
    4539                 :         {
    4540               0 :           Py_DECREF(pyObj);
    4541               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    4542               0 :           SWIG_fail;
    4543                 :         }
    4544               0 :         Py_DECREF(pyObj);
    4545                 :       }
    4546                 :     }
    4547                 :   }
    4548                 :   {
    4549               0 :     if ( bUseExceptions ) {
    4550               0 :       CPLErrorReset();
    4551                 :     }
    4552               0 :     result = (OGRDataSourceShadow *)OGRDriverShadow_CopyDataSource(arg1,arg2,(char const *)arg3,arg4);
    4553               0 :     if ( bUseExceptions ) {
    4554               0 :       CPLErr eclass = CPLGetLastErrorType();
    4555               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4556               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4557                 :       }
    4558                 :     }
    4559                 :   }
    4560               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
    4561                 :   {
    4562                 :     /* %typemap(freearg) (const char *utf8_path) */
    4563               0 :     GDALPythonFreeCStr(arg3, bToFree3);
    4564                 :   }
    4565                 :   {
    4566                 :     /* %typemap(freearg) char **options */
    4567               0 :     CSLDestroy( arg4 );
    4568                 :   }
    4569               0 :   return resultobj;
    4570                 : fail:
    4571                 :   {
    4572                 :     /* %typemap(freearg) (const char *utf8_path) */
    4573               0 :     GDALPythonFreeCStr(arg3, bToFree3);
    4574                 :   }
    4575                 :   {
    4576                 :     /* %typemap(freearg) char **options */
    4577               0 :     CSLDestroy( arg4 );
    4578                 :   }
    4579               0 :   return NULL;
    4580                 : }
    4581                 : 
    4582                 : 
    4583              56 : SWIGINTERN PyObject *_wrap_Driver_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    4584              56 :   PyObject *resultobj = 0;
    4585              56 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4586              56 :   char *arg2 = (char *) 0 ;
    4587              56 :   int arg3 = (int) 0 ;
    4588              56 :   void *argp1 = 0 ;
    4589              56 :   int res1 = 0 ;
    4590              56 :   int bToFree2 = 0 ;
    4591                 :   int val3 ;
    4592              56 :   int ecode3 = 0 ;
    4593              56 :   PyObject * obj0 = 0 ;
    4594              56 :   PyObject * obj1 = 0 ;
    4595              56 :   PyObject * obj2 = 0 ;
    4596                 :   char *  kwnames[] = {
    4597                 :     (char *) "self",(char *) "utf8_path",(char *) "update", NULL 
    4598              56 :   };
    4599              56 :   OGRDataSourceShadow *result = 0 ;
    4600                 :   
    4601              56 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Driver_Open",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
    4602              56 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4603              56 :   if (!SWIG_IsOK(res1)) {
    4604               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Open" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4605                 :   }
    4606              56 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4607                 :   {
    4608                 :     /* %typemap(in) (const char *utf8_path) */
    4609              56 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    4610              56 :     if (arg2 == NULL)
    4611                 :     {
    4612               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    4613               0 :       SWIG_fail;
    4614                 :     }
    4615                 :   }
    4616              56 :   if (obj2) {
    4617              48 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
    4618              48 :     if (!SWIG_IsOK(ecode3)) {
    4619               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Open" "', argument " "3"" of type '" "int""'");
    4620                 :     } 
    4621              48 :     arg3 = static_cast< int >(val3);
    4622                 :   }
    4623                 :   {
    4624              56 :     if ( bUseExceptions ) {
    4625               0 :       CPLErrorReset();
    4626                 :     }
    4627              56 :     result = (OGRDataSourceShadow *)OGRDriverShadow_Open(arg1,(char const *)arg2,arg3);
    4628              56 :     if ( bUseExceptions ) {
    4629               0 :       CPLErr eclass = CPLGetLastErrorType();
    4630               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4631               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4632                 :       }
    4633                 :     }
    4634                 :   }
    4635              56 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
    4636                 :   {
    4637                 :     /* %typemap(freearg) (const char *utf8_path) */
    4638              56 :     GDALPythonFreeCStr(arg2, bToFree2);
    4639                 :   }
    4640              56 :   return resultobj;
    4641                 : fail:
    4642                 :   {
    4643                 :     /* %typemap(freearg) (const char *utf8_path) */
    4644               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    4645                 :   }
    4646               0 :   return NULL;
    4647                 : }
    4648                 : 
    4649                 : 
    4650             137 : SWIGINTERN PyObject *_wrap_Driver_DeleteDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4651             137 :   PyObject *resultobj = 0;
    4652             137 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4653             137 :   char *arg2 = (char *) 0 ;
    4654             137 :   void *argp1 = 0 ;
    4655             137 :   int res1 = 0 ;
    4656             137 :   int bToFree2 = 0 ;
    4657             137 :   PyObject * obj0 = 0 ;
    4658             137 :   PyObject * obj1 = 0 ;
    4659                 :   int result;
    4660                 :   
    4661             137 :   if (!PyArg_ParseTuple(args,(char *)"OO:Driver_DeleteDataSource",&obj0,&obj1)) SWIG_fail;
    4662             137 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4663             137 :   if (!SWIG_IsOK(res1)) {
    4664               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_DeleteDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4665                 :   }
    4666             137 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4667                 :   {
    4668                 :     /* %typemap(in) (const char *utf8_path) */
    4669             137 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    4670             137 :     if (arg2 == NULL)
    4671                 :     {
    4672               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    4673               0 :       SWIG_fail;
    4674                 :     }
    4675                 :   }
    4676                 :   {
    4677             137 :     if ( bUseExceptions ) {
    4678               0 :       CPLErrorReset();
    4679                 :     }
    4680             137 :     result = (int)OGRDriverShadow_DeleteDataSource(arg1,(char const *)arg2);
    4681             137 :     if ( bUseExceptions ) {
    4682               0 :       CPLErr eclass = CPLGetLastErrorType();
    4683               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4684               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4685                 :       }
    4686                 :     }
    4687                 :   }
    4688             137 :   resultobj = SWIG_From_int(static_cast< int >(result));
    4689                 :   {
    4690                 :     /* %typemap(freearg) (const char *utf8_path) */
    4691             137 :     GDALPythonFreeCStr(arg2, bToFree2);
    4692                 :   }
    4693             137 :   return resultobj;
    4694                 : fail:
    4695                 :   {
    4696                 :     /* %typemap(freearg) (const char *utf8_path) */
    4697               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    4698                 :   }
    4699               0 :   return NULL;
    4700                 : }
    4701                 : 
    4702                 : 
    4703              36 : SWIGINTERN PyObject *_wrap_Driver_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4704              36 :   PyObject *resultobj = 0;
    4705              36 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4706              36 :   char *arg2 = (char *) 0 ;
    4707              36 :   void *argp1 = 0 ;
    4708              36 :   int res1 = 0 ;
    4709                 :   int res2 ;
    4710              36 :   char *buf2 = 0 ;
    4711              36 :   int alloc2 = 0 ;
    4712              36 :   PyObject * obj0 = 0 ;
    4713              36 :   PyObject * obj1 = 0 ;
    4714                 :   bool result;
    4715                 :   
    4716              36 :   if (!PyArg_ParseTuple(args,(char *)"OO:Driver_TestCapability",&obj0,&obj1)) SWIG_fail;
    4717              36 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4718              36 :   if (!SWIG_IsOK(res1)) {
    4719               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_TestCapability" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4720                 :   }
    4721              36 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4722              36 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    4723              36 :   if (!SWIG_IsOK(res2)) {
    4724               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'");
    4725                 :   }
    4726              36 :   arg2 = reinterpret_cast< char * >(buf2);
    4727                 :   {
    4728              36 :     if (!arg2) {
    4729               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    4730                 :     }
    4731                 :   }
    4732                 :   {
    4733              36 :     if ( bUseExceptions ) {
    4734               0 :       CPLErrorReset();
    4735                 :     }
    4736              36 :     result = (bool)OGRDriverShadow_TestCapability(arg1,(char const *)arg2);
    4737              36 :     if ( bUseExceptions ) {
    4738               0 :       CPLErr eclass = CPLGetLastErrorType();
    4739               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4740               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4741                 :       }
    4742                 :     }
    4743                 :   }
    4744              36 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
    4745              36 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    4746              36 :   return resultobj;
    4747                 : fail:
    4748               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    4749               0 :   return NULL;
    4750                 : }
    4751                 : 
    4752                 : 
    4753              93 : SWIGINTERN PyObject *_wrap_Driver_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4754              93 :   PyObject *resultobj = 0;
    4755              93 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4756              93 :   void *argp1 = 0 ;
    4757              93 :   int res1 = 0 ;
    4758              93 :   PyObject * obj0 = 0 ;
    4759              93 :   char *result = 0 ;
    4760                 :   
    4761              93 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_GetName",&obj0)) SWIG_fail;
    4762              93 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4763              93 :   if (!SWIG_IsOK(res1)) {
    4764               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_GetName" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4765                 :   }
    4766              93 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4767                 :   {
    4768              93 :     if ( bUseExceptions ) {
    4769               0 :       CPLErrorReset();
    4770                 :     }
    4771              93 :     result = (char *)OGRDriverShadow_GetName(arg1);
    4772              93 :     if ( bUseExceptions ) {
    4773               0 :       CPLErr eclass = CPLGetLastErrorType();
    4774               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4775               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4776                 :       }
    4777                 :     }
    4778                 :   }
    4779              93 :   resultobj = SWIG_FromCharPtr((const char *)result);
    4780              93 :   return resultobj;
    4781                 : fail:
    4782               0 :   return NULL;
    4783                 : }
    4784                 : 
    4785                 : 
    4786               4 : SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4787               4 :   PyObject *resultobj = 0;
    4788               4 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4789               4 :   void *argp1 = 0 ;
    4790               4 :   int res1 = 0 ;
    4791               4 :   PyObject * obj0 = 0 ;
    4792                 :   
    4793               4 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_Register",&obj0)) SWIG_fail;
    4794               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4795               4 :   if (!SWIG_IsOK(res1)) {
    4796               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4797                 :   }
    4798               4 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4799                 :   {
    4800               4 :     if ( bUseExceptions ) {
    4801               0 :       CPLErrorReset();
    4802                 :     }
    4803                 :     OGRDriverShadow_Register(arg1);
    4804               4 :     if ( bUseExceptions ) {
    4805               0 :       CPLErr eclass = CPLGetLastErrorType();
    4806               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4807               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4808                 :       }
    4809                 :     }
    4810                 :   }
    4811               4 :   resultobj = SWIG_Py_Void();
    4812               4 :   return resultobj;
    4813                 : fail:
    4814               0 :   return NULL;
    4815                 : }
    4816                 : 
    4817                 : 
    4818               4 : SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4819               4 :   PyObject *resultobj = 0;
    4820               4 :   OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    4821               4 :   void *argp1 = 0 ;
    4822               4 :   int res1 = 0 ;
    4823               4 :   PyObject * obj0 = 0 ;
    4824                 :   
    4825               4 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_Deregister",&obj0)) SWIG_fail;
    4826               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    4827               4 :   if (!SWIG_IsOK(res1)) {
    4828               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
    4829                 :   }
    4830               4 :   arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
    4831                 :   {
    4832               4 :     if ( bUseExceptions ) {
    4833               0 :       CPLErrorReset();
    4834                 :     }
    4835                 :     OGRDriverShadow_Deregister(arg1);
    4836               4 :     if ( bUseExceptions ) {
    4837               0 :       CPLErr eclass = CPLGetLastErrorType();
    4838               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4839               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4840                 :       }
    4841                 :     }
    4842                 :   }
    4843               4 :   resultobj = SWIG_Py_Void();
    4844               4 :   return resultobj;
    4845                 : fail:
    4846               0 :   return NULL;
    4847                 : }
    4848                 : 
    4849                 : 
    4850               1 : SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4851                 :   PyObject *obj;
    4852               1 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    4853               1 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRDriverShadow, SWIG_NewClientData(obj));
    4854               1 :   return SWIG_Py_Void();
    4855                 : }
    4856                 : 
    4857               0 : SWIGINTERN PyObject *_wrap_DataSource_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4858               0 :   PyObject *resultobj = 0;
    4859               0 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    4860               0 :   void *argp1 = 0 ;
    4861               0 :   int res1 = 0 ;
    4862               0 :   PyObject * obj0 = 0 ;
    4863               0 :   char *result = 0 ;
    4864                 :   
    4865               0 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_name_get",&obj0)) SWIG_fail;
    4866               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    4867               0 :   if (!SWIG_IsOK(res1)) {
    4868               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_name_get" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    4869                 :   }
    4870               0 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    4871                 :   {
    4872               0 :     if ( bUseExceptions ) {
    4873               0 :       CPLErrorReset();
    4874                 :     }
    4875               0 :     result = (char *)OGRDataSourceShadow_name_get(arg1);
    4876               0 :     if ( bUseExceptions ) {
    4877               0 :       CPLErr eclass = CPLGetLastErrorType();
    4878               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4879               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4880                 :       }
    4881                 :     }
    4882                 :   }
    4883               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
    4884               0 :   return resultobj;
    4885                 : fail:
    4886               0 :   return NULL;
    4887                 : }
    4888                 : 
    4889                 : 
    4890             925 : SWIGINTERN PyObject *_wrap_delete_DataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4891             925 :   PyObject *resultobj = 0;
    4892             925 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    4893             925 :   void *argp1 = 0 ;
    4894             925 :   int res1 = 0 ;
    4895             925 :   PyObject * obj0 = 0 ;
    4896                 :   
    4897             925 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_DataSource",&obj0)) SWIG_fail;
    4898             925 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_DISOWN |  0 );
    4899             925 :   if (!SWIG_IsOK(res1)) {
    4900               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DataSource" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    4901                 :   }
    4902             925 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    4903                 :   {
    4904             925 :     if ( bUseExceptions ) {
    4905               0 :       CPLErrorReset();
    4906                 :     }
    4907                 :     delete_OGRDataSourceShadow(arg1);
    4908             925 :     if ( bUseExceptions ) {
    4909               0 :       CPLErr eclass = CPLGetLastErrorType();
    4910               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4911               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4912                 :       }
    4913                 :     }
    4914                 :   }
    4915             925 :   resultobj = SWIG_Py_Void();
    4916             925 :   return resultobj;
    4917                 : fail:
    4918               0 :   return NULL;
    4919                 : }
    4920                 : 
    4921                 : 
    4922               4 : SWIGINTERN PyObject *_wrap_DataSource_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4923               4 :   PyObject *resultobj = 0;
    4924               4 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    4925               4 :   void *argp1 = 0 ;
    4926               4 :   int res1 = 0 ;
    4927               4 :   PyObject * obj0 = 0 ;
    4928                 :   int result;
    4929                 :   
    4930               4 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetRefCount",&obj0)) SWIG_fail;
    4931               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    4932               4 :   if (!SWIG_IsOK(res1)) {
    4933               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetRefCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    4934                 :   }
    4935               4 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    4936                 :   {
    4937               4 :     if ( bUseExceptions ) {
    4938               0 :       CPLErrorReset();
    4939                 :     }
    4940               4 :     result = (int)OGRDataSourceShadow_GetRefCount(arg1);
    4941               4 :     if ( bUseExceptions ) {
    4942               0 :       CPLErr eclass = CPLGetLastErrorType();
    4943               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4944               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4945                 :       }
    4946                 :     }
    4947                 :   }
    4948               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
    4949               4 :   return resultobj;
    4950                 : fail:
    4951               0 :   return NULL;
    4952                 : }
    4953                 : 
    4954                 : 
    4955               0 : SWIGINTERN PyObject *_wrap_DataSource_GetSummaryRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4956               0 :   PyObject *resultobj = 0;
    4957               0 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    4958               0 :   void *argp1 = 0 ;
    4959               0 :   int res1 = 0 ;
    4960               0 :   PyObject * obj0 = 0 ;
    4961                 :   int result;
    4962                 :   
    4963               0 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetSummaryRefCount",&obj0)) SWIG_fail;
    4964               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    4965               0 :   if (!SWIG_IsOK(res1)) {
    4966               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetSummaryRefCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    4967                 :   }
    4968               0 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    4969                 :   {
    4970               0 :     if ( bUseExceptions ) {
    4971               0 :       CPLErrorReset();
    4972                 :     }
    4973               0 :     result = (int)OGRDataSourceShadow_GetSummaryRefCount(arg1);
    4974               0 :     if ( bUseExceptions ) {
    4975               0 :       CPLErr eclass = CPLGetLastErrorType();
    4976               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    4977               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    4978                 :       }
    4979                 :     }
    4980                 :   }
    4981               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    4982               0 :   return resultobj;
    4983                 : fail:
    4984               0 :   return NULL;
    4985                 : }
    4986                 : 
    4987                 : 
    4988             195 : SWIGINTERN PyObject *_wrap_DataSource_GetLayerCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    4989             195 :   PyObject *resultobj = 0;
    4990             195 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    4991             195 :   void *argp1 = 0 ;
    4992             195 :   int res1 = 0 ;
    4993             195 :   PyObject * obj0 = 0 ;
    4994                 :   int result;
    4995                 :   
    4996             195 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetLayerCount",&obj0)) SWIG_fail;
    4997             195 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    4998             195 :   if (!SWIG_IsOK(res1)) {
    4999               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5000                 :   }
    5001             195 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5002                 :   {
    5003             195 :     if ( bUseExceptions ) {
    5004               0 :       CPLErrorReset();
    5005                 :     }
    5006             195 :     result = (int)OGRDataSourceShadow_GetLayerCount(arg1);
    5007             195 :     if ( bUseExceptions ) {
    5008               0 :       CPLErr eclass = CPLGetLastErrorType();
    5009               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5010               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5011                 :       }
    5012                 :     }
    5013                 :   }
    5014             195 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5015             195 :   return resultobj;
    5016                 : fail:
    5017               0 :   return NULL;
    5018                 : }
    5019                 : 
    5020                 : 
    5021              22 : SWIGINTERN PyObject *_wrap_DataSource_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5022              22 :   PyObject *resultobj = 0;
    5023              22 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5024              22 :   void *argp1 = 0 ;
    5025              22 :   int res1 = 0 ;
    5026              22 :   PyObject * obj0 = 0 ;
    5027              22 :   OGRDriverShadow *result = 0 ;
    5028                 :   
    5029              22 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetDriver",&obj0)) SWIG_fail;
    5030              22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5031              22 :   if (!SWIG_IsOK(res1)) {
    5032               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetDriver" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5033                 :   }
    5034              22 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5035                 :   {
    5036              22 :     if ( bUseExceptions ) {
    5037               0 :       CPLErrorReset();
    5038                 :     }
    5039              22 :     result = (OGRDriverShadow *)OGRDataSourceShadow_GetDriver(arg1);
    5040              22 :     if ( bUseExceptions ) {
    5041               0 :       CPLErr eclass = CPLGetLastErrorType();
    5042               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5043               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5044                 :       }
    5045                 :     }
    5046                 :   }
    5047              22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
    5048              22 :   return resultobj;
    5049                 : fail:
    5050               0 :   return NULL;
    5051                 : }
    5052                 : 
    5053                 : 
    5054              11 : SWIGINTERN PyObject *_wrap_DataSource_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5055              11 :   PyObject *resultobj = 0;
    5056              11 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5057              11 :   void *argp1 = 0 ;
    5058              11 :   int res1 = 0 ;
    5059              11 :   PyObject * obj0 = 0 ;
    5060              11 :   char *result = 0 ;
    5061                 :   
    5062              11 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetName",&obj0)) SWIG_fail;
    5063              11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5064              11 :   if (!SWIG_IsOK(res1)) {
    5065               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetName" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5066                 :   }
    5067              11 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5068                 :   {
    5069              11 :     if ( bUseExceptions ) {
    5070               0 :       CPLErrorReset();
    5071                 :     }
    5072              11 :     result = (char *)OGRDataSourceShadow_GetName(arg1);
    5073              11 :     if ( bUseExceptions ) {
    5074               0 :       CPLErr eclass = CPLGetLastErrorType();
    5075               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5076               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5077                 :       }
    5078                 :     }
    5079                 :   }
    5080              11 :   resultobj = SWIG_FromCharPtr((const char *)result);
    5081              11 :   return resultobj;
    5082                 : fail:
    5083               0 :   return NULL;
    5084                 : }
    5085                 : 
    5086                 : 
    5087              11 : SWIGINTERN PyObject *_wrap_DataSource_DeleteLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5088              11 :   PyObject *resultobj = 0;
    5089              11 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5090                 :   int arg2 ;
    5091              11 :   void *argp1 = 0 ;
    5092              11 :   int res1 = 0 ;
    5093                 :   int val2 ;
    5094              11 :   int ecode2 = 0 ;
    5095              11 :   PyObject * obj0 = 0 ;
    5096              11 :   PyObject * obj1 = 0 ;
    5097                 :   OGRErr result;
    5098                 :   
    5099              11 :   if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_DeleteLayer",&obj0,&obj1)) SWIG_fail;
    5100              11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5101              11 :   if (!SWIG_IsOK(res1)) {
    5102               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_DeleteLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5103                 :   }
    5104              11 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5105              11 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    5106              11 :   if (!SWIG_IsOK(ecode2)) {
    5107               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataSource_DeleteLayer" "', argument " "2"" of type '" "int""'");
    5108                 :   } 
    5109              11 :   arg2 = static_cast< int >(val2);
    5110                 :   {
    5111              11 :     if ( bUseExceptions ) {
    5112               0 :       CPLErrorReset();
    5113                 :     }
    5114              11 :     result = (OGRErr)OGRDataSourceShadow_DeleteLayer(arg1,arg2);
    5115              11 :     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                 :   {
    5123                 :     /* %typemap(out) OGRErr */
    5124              11 :     if ( result != 0 && bUseExceptions) {
    5125               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    5126               0 :       SWIG_fail;
    5127                 :     }
    5128                 :   }
    5129                 :   {
    5130                 :     /* %typemap(ret) OGRErr */
    5131              11 :     if (resultobj == Py_None ) {
    5132               0 :       Py_DECREF(resultobj);
    5133               0 :       resultobj = 0;
    5134                 :     }
    5135              11 :     if (resultobj == 0) {
    5136              11 :       resultobj = PyInt_FromLong( result );
    5137                 :     }
    5138                 :   }
    5139              11 :   return resultobj;
    5140                 : fail:
    5141               0 :   return NULL;
    5142                 : }
    5143                 : 
    5144                 : 
    5145               0 : SWIGINTERN PyObject *_wrap_DataSource_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5146               0 :   PyObject *resultobj = 0;
    5147               0 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5148               0 :   void *argp1 = 0 ;
    5149               0 :   int res1 = 0 ;
    5150               0 :   PyObject * obj0 = 0 ;
    5151                 :   OGRErr result;
    5152                 :   
    5153               0 :   if (!PyArg_ParseTuple(args,(char *)"O:DataSource_SyncToDisk",&obj0)) SWIG_fail;
    5154               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5155               0 :   if (!SWIG_IsOK(res1)) {
    5156               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_SyncToDisk" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5157                 :   }
    5158               0 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5159                 :   {
    5160               0 :     if ( bUseExceptions ) {
    5161               0 :       CPLErrorReset();
    5162                 :     }
    5163               0 :     result = (OGRErr)OGRDataSourceShadow_SyncToDisk(arg1);
    5164               0 :     if ( bUseExceptions ) {
    5165               0 :       CPLErr eclass = CPLGetLastErrorType();
    5166               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5167               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5168                 :       }
    5169                 :     }
    5170                 :   }
    5171                 :   {
    5172                 :     /* %typemap(out) OGRErr */
    5173               0 :     if ( result != 0 && bUseExceptions) {
    5174               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    5175               0 :       SWIG_fail;
    5176                 :     }
    5177                 :   }
    5178                 :   {
    5179                 :     /* %typemap(ret) OGRErr */
    5180               0 :     if (resultobj == Py_None ) {
    5181               0 :       Py_DECREF(resultobj);
    5182               0 :       resultobj = 0;
    5183                 :     }
    5184               0 :     if (resultobj == 0) {
    5185               0 :       resultobj = PyInt_FromLong( result );
    5186                 :     }
    5187                 :   }
    5188               0 :   return resultobj;
    5189                 : fail:
    5190               0 :   return NULL;
    5191                 : }
    5192                 : 
    5193                 : 
    5194            1412 : SWIGINTERN PyObject *_wrap_DataSource_CreateLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    5195            1412 :   PyObject *resultobj = 0;
    5196            1412 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5197            1412 :   char *arg2 = (char *) 0 ;
    5198            1412 :   OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
    5199            1412 :   OGRwkbGeometryType arg4 = (OGRwkbGeometryType) wkbUnknown ;
    5200            1412 :   char **arg5 = (char **) 0 ;
    5201            1412 :   void *argp1 = 0 ;
    5202            1412 :   int res1 = 0 ;
    5203                 :   int res2 ;
    5204            1412 :   char *buf2 = 0 ;
    5205            1412 :   int alloc2 = 0 ;
    5206            1412 :   void *argp3 = 0 ;
    5207            1412 :   int res3 = 0 ;
    5208                 :   int val4 ;
    5209            1412 :   int ecode4 = 0 ;
    5210            1412 :   PyObject * obj0 = 0 ;
    5211            1412 :   PyObject * obj1 = 0 ;
    5212            1412 :   PyObject * obj2 = 0 ;
    5213            1412 :   PyObject * obj3 = 0 ;
    5214            1412 :   PyObject * obj4 = 0 ;
    5215                 :   char *  kwnames[] = {
    5216                 :     (char *) "self",(char *) "name",(char *) "srs",(char *) "geom_type",(char *) "options", NULL 
    5217            1412 :   };
    5218            1412 :   OGRLayerShadow *result = 0 ;
    5219                 :   
    5220            1412 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:DataSource_CreateLayer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
    5221            1412 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5222            1412 :   if (!SWIG_IsOK(res1)) {
    5223               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_CreateLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5224                 :   }
    5225            1412 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5226            1412 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5227            1412 :   if (!SWIG_IsOK(res2)) {
    5228               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_CreateLayer" "', argument " "2"" of type '" "char const *""'");
    5229                 :   }
    5230            1412 :   arg2 = reinterpret_cast< char * >(buf2);
    5231            1412 :   if (obj2) {
    5232             178 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
    5233             178 :     if (!SWIG_IsOK(res3)) {
    5234               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_CreateLayer" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
    5235                 :     }
    5236             178 :     arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
    5237                 :   }
    5238            1412 :   if (obj3) {
    5239             197 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
    5240             197 :     if (!SWIG_IsOK(ecode4)) {
    5241               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DataSource_CreateLayer" "', argument " "4"" of type '" "OGRwkbGeometryType""'");
    5242                 :     } 
    5243             197 :     arg4 = static_cast< OGRwkbGeometryType >(val4);
    5244                 :   }
    5245            1412 :   if (obj4) {
    5246                 :     {
    5247                 :       /* %typemap(in) char **options */
    5248                 :       /* Check if is a list */
    5249             139 :       if ( ! PySequence_Check(obj4)) {
    5250               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    5251               0 :         SWIG_fail;
    5252                 :       }
    5253                 :       
    5254             139 :       int size = PySequence_Size(obj4);
    5255             222 :       for (int i = 0; i < size; i++) {
    5256              83 :         PyObject* pyObj = PySequence_GetItem(obj4,i);
    5257              83 :         if (PyUnicode_Check(pyObj))
    5258                 :         {
    5259                 :           char *pszStr;
    5260                 :           Py_ssize_t nLen;
    5261               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    5262                 : #if PY_VERSION_HEX >= 0x03000000
    5263                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    5264                 : #else
    5265               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    5266                 : #endif
    5267               0 :           arg5 = CSLAddString( arg5, pszStr );
    5268               0 :           Py_XDECREF(pyUTF8Str);
    5269                 :         }
    5270                 : #if PY_VERSION_HEX >= 0x03000000
    5271                 :         else if (PyBytes_Check(pyObj))
    5272                 :         arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
    5273                 : #else
    5274              83 :         else if (PyString_Check(pyObj))
    5275              83 :         arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
    5276                 : #endif
    5277                 :         else
    5278                 :         {
    5279               0 :           Py_DECREF(pyObj);
    5280               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    5281               0 :           SWIG_fail;
    5282                 :         }
    5283              83 :         Py_DECREF(pyObj);
    5284                 :       }
    5285                 :     }
    5286                 :   }
    5287                 :   {
    5288            1412 :     if (!arg2) {
    5289               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    5290                 :     }
    5291                 :   }
    5292                 :   {
    5293            1412 :     if ( bUseExceptions ) {
    5294               0 :       CPLErrorReset();
    5295                 :     }
    5296            1412 :     result = (OGRLayerShadow *)OGRDataSourceShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
    5297            1412 :     if ( bUseExceptions ) {
    5298               0 :       CPLErr eclass = CPLGetLastErrorType();
    5299               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5300               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5301                 :       }
    5302                 :     }
    5303                 :   }
    5304            1412 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5305            1412 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5306                 :   {
    5307                 :     /* %typemap(freearg) char **options */
    5308            1412 :     CSLDestroy( arg5 );
    5309                 :   }
    5310            1412 :   return resultobj;
    5311                 : fail:
    5312               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5313                 :   {
    5314                 :     /* %typemap(freearg) char **options */
    5315               0 :     CSLDestroy( arg5 );
    5316                 :   }
    5317               0 :   return NULL;
    5318                 : }
    5319                 : 
    5320                 : 
    5321               2 : SWIGINTERN PyObject *_wrap_DataSource_CopyLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    5322               2 :   PyObject *resultobj = 0;
    5323               2 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5324               2 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    5325               2 :   char *arg3 = (char *) 0 ;
    5326               2 :   char **arg4 = (char **) 0 ;
    5327               2 :   void *argp1 = 0 ;
    5328               2 :   int res1 = 0 ;
    5329               2 :   void *argp2 = 0 ;
    5330               2 :   int res2 = 0 ;
    5331                 :   int res3 ;
    5332               2 :   char *buf3 = 0 ;
    5333               2 :   int alloc3 = 0 ;
    5334               2 :   PyObject * obj0 = 0 ;
    5335               2 :   PyObject * obj1 = 0 ;
    5336               2 :   PyObject * obj2 = 0 ;
    5337               2 :   PyObject * obj3 = 0 ;
    5338                 :   char *  kwnames[] = {
    5339                 :     (char *) "self",(char *) "src_layer",(char *) "new_name",(char *) "options", NULL 
    5340               2 :   };
    5341               2 :   OGRLayerShadow *result = 0 ;
    5342                 :   
    5343               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:DataSource_CopyLayer",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    5344               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5345               2 :   if (!SWIG_IsOK(res1)) {
    5346               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_CopyLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5347                 :   }
    5348               2 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5349               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5350               2 :   if (!SWIG_IsOK(res2)) {
    5351               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_CopyLayer" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
    5352                 :   }
    5353               2 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
    5354               2 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    5355               2 :   if (!SWIG_IsOK(res3)) {
    5356               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_CopyLayer" "', argument " "3"" of type '" "char const *""'");
    5357                 :   }
    5358               2 :   arg3 = reinterpret_cast< char * >(buf3);
    5359               2 :   if (obj3) {
    5360                 :     {
    5361                 :       /* %typemap(in) char **options */
    5362                 :       /* Check if is a list */
    5363               0 :       if ( ! PySequence_Check(obj3)) {
    5364               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    5365               0 :         SWIG_fail;
    5366                 :       }
    5367                 :       
    5368               0 :       int size = PySequence_Size(obj3);
    5369               0 :       for (int i = 0; i < size; i++) {
    5370               0 :         PyObject* pyObj = PySequence_GetItem(obj3,i);
    5371               0 :         if (PyUnicode_Check(pyObj))
    5372                 :         {
    5373                 :           char *pszStr;
    5374                 :           Py_ssize_t nLen;
    5375               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    5376                 : #if PY_VERSION_HEX >= 0x03000000
    5377                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    5378                 : #else
    5379               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    5380                 : #endif
    5381               0 :           arg4 = CSLAddString( arg4, pszStr );
    5382               0 :           Py_XDECREF(pyUTF8Str);
    5383                 :         }
    5384                 : #if PY_VERSION_HEX >= 0x03000000
    5385                 :         else if (PyBytes_Check(pyObj))
    5386                 :         arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
    5387                 : #else
    5388               0 :         else if (PyString_Check(pyObj))
    5389               0 :         arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
    5390                 : #endif
    5391                 :         else
    5392                 :         {
    5393               0 :           Py_DECREF(pyObj);
    5394               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    5395               0 :           SWIG_fail;
    5396                 :         }
    5397               0 :         Py_DECREF(pyObj);
    5398                 :       }
    5399                 :     }
    5400                 :   }
    5401                 :   {
    5402               2 :     if (!arg2) {
    5403               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    5404                 :     }
    5405                 :   }
    5406                 :   {
    5407               2 :     if ( bUseExceptions ) {
    5408               0 :       CPLErrorReset();
    5409                 :     }
    5410               2 :     result = (OGRLayerShadow *)OGRDataSourceShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
    5411               2 :     if ( bUseExceptions ) {
    5412               0 :       CPLErr eclass = CPLGetLastErrorType();
    5413               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5414               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5415                 :       }
    5416                 :     }
    5417                 :   }
    5418               2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5419               2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    5420                 :   {
    5421                 :     /* %typemap(freearg) char **options */
    5422               2 :     CSLDestroy( arg4 );
    5423                 :   }
    5424               2 :   return resultobj;
    5425                 : fail:
    5426               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    5427                 :   {
    5428                 :     /* %typemap(freearg) char **options */
    5429               0 :     CSLDestroy( arg4 );
    5430                 :   }
    5431               0 :   return NULL;
    5432                 : }
    5433                 : 
    5434                 : 
    5435            2101 : SWIGINTERN PyObject *_wrap_DataSource_GetLayerByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5436            2101 :   PyObject *resultobj = 0;
    5437            2101 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5438            2101 :   int arg2 = (int) 0 ;
    5439            2101 :   void *argp1 = 0 ;
    5440            2101 :   int res1 = 0 ;
    5441                 :   int val2 ;
    5442            2101 :   int ecode2 = 0 ;
    5443            2101 :   PyObject * obj0 = 0 ;
    5444            2101 :   PyObject * obj1 = 0 ;
    5445            2101 :   OGRLayerShadow *result = 0 ;
    5446                 :   
    5447            2101 :   if (!PyArg_ParseTuple(args,(char *)"O|O:DataSource_GetLayerByIndex",&obj0,&obj1)) SWIG_fail;
    5448            2101 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5449            2101 :   if (!SWIG_IsOK(res1)) {
    5450               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerByIndex" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5451                 :   }
    5452            2101 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5453            2101 :   if (obj1) {
    5454            2101 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
    5455            2101 :     if (!SWIG_IsOK(ecode2)) {
    5456               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataSource_GetLayerByIndex" "', argument " "2"" of type '" "int""'");
    5457                 :     } 
    5458            2101 :     arg2 = static_cast< int >(val2);
    5459                 :   }
    5460                 :   {
    5461            2101 :     if ( bUseExceptions ) {
    5462               0 :       CPLErrorReset();
    5463                 :     }
    5464            2101 :     result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByIndex(arg1,arg2);
    5465            2101 :     if ( bUseExceptions ) {
    5466               0 :       CPLErr eclass = CPLGetLastErrorType();
    5467               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5468               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5469                 :       }
    5470                 :     }
    5471                 :   }
    5472            2101 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5473            2101 :   return resultobj;
    5474                 : fail:
    5475               0 :   return NULL;
    5476                 : }
    5477                 : 
    5478                 : 
    5479            1603 : SWIGINTERN PyObject *_wrap_DataSource_GetLayerByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5480            1603 :   PyObject *resultobj = 0;
    5481            1603 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5482            1603 :   char *arg2 = (char *) 0 ;
    5483            1603 :   void *argp1 = 0 ;
    5484            1603 :   int res1 = 0 ;
    5485                 :   int res2 ;
    5486            1603 :   char *buf2 = 0 ;
    5487            1603 :   int alloc2 = 0 ;
    5488            1603 :   PyObject * obj0 = 0 ;
    5489            1603 :   PyObject * obj1 = 0 ;
    5490            1603 :   OGRLayerShadow *result = 0 ;
    5491                 :   
    5492            1603 :   if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_GetLayerByName",&obj0,&obj1)) SWIG_fail;
    5493            1603 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5494            1603 :   if (!SWIG_IsOK(res1)) {
    5495               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerByName" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5496                 :   }
    5497            1603 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5498            1603 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5499            1603 :   if (!SWIG_IsOK(res2)) {
    5500               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_GetLayerByName" "', argument " "2"" of type '" "char const *""'");
    5501                 :   }
    5502            1603 :   arg2 = reinterpret_cast< char * >(buf2);
    5503                 :   {
    5504            1603 :     if ( bUseExceptions ) {
    5505               0 :       CPLErrorReset();
    5506                 :     }
    5507            1603 :     result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByName(arg1,(char const *)arg2);
    5508            1603 :     if ( bUseExceptions ) {
    5509               0 :       CPLErr eclass = CPLGetLastErrorType();
    5510               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5511               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5512                 :       }
    5513                 :     }
    5514                 :   }
    5515            1603 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5516            1603 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5517            1603 :   return resultobj;
    5518                 : fail:
    5519               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5520               0 :   return NULL;
    5521                 : }
    5522                 : 
    5523                 : 
    5524              47 : SWIGINTERN PyObject *_wrap_DataSource_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5525              47 :   PyObject *resultobj = 0;
    5526              47 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5527              47 :   char *arg2 = (char *) 0 ;
    5528              47 :   void *argp1 = 0 ;
    5529              47 :   int res1 = 0 ;
    5530                 :   int res2 ;
    5531              47 :   char *buf2 = 0 ;
    5532              47 :   int alloc2 = 0 ;
    5533              47 :   PyObject * obj0 = 0 ;
    5534              47 :   PyObject * obj1 = 0 ;
    5535                 :   bool result;
    5536                 :   
    5537              47 :   if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_TestCapability",&obj0,&obj1)) SWIG_fail;
    5538              47 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5539              47 :   if (!SWIG_IsOK(res1)) {
    5540               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_TestCapability" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5541                 :   }
    5542              47 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5543              47 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5544              47 :   if (!SWIG_IsOK(res2)) {
    5545               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_TestCapability" "', argument " "2"" of type '" "char const *""'");
    5546                 :   }
    5547              47 :   arg2 = reinterpret_cast< char * >(buf2);
    5548                 :   {
    5549              47 :     if (!arg2) {
    5550               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    5551                 :     }
    5552                 :   }
    5553                 :   {
    5554              47 :     if ( bUseExceptions ) {
    5555               0 :       CPLErrorReset();
    5556                 :     }
    5557              47 :     result = (bool)OGRDataSourceShadow_TestCapability(arg1,(char const *)arg2);
    5558              47 :     if ( bUseExceptions ) {
    5559               0 :       CPLErr eclass = CPLGetLastErrorType();
    5560               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5561               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5562                 :       }
    5563                 :     }
    5564                 :   }
    5565              47 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
    5566              47 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5567              47 :   return resultobj;
    5568                 : fail:
    5569               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5570               0 :   return NULL;
    5571                 : }
    5572                 : 
    5573                 : 
    5574            1166 : SWIGINTERN PyObject *_wrap_DataSource_ExecuteSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    5575            1166 :   PyObject *resultobj = 0;
    5576            1166 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5577            1166 :   char *arg2 = (char *) 0 ;
    5578            1166 :   OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
    5579            1166 :   char *arg4 = (char *) "" ;
    5580            1166 :   void *argp1 = 0 ;
    5581            1166 :   int res1 = 0 ;
    5582                 :   int res2 ;
    5583            1166 :   char *buf2 = 0 ;
    5584            1166 :   int alloc2 = 0 ;
    5585            1166 :   void *argp3 = 0 ;
    5586            1166 :   int res3 = 0 ;
    5587                 :   int res4 ;
    5588            1166 :   char *buf4 = 0 ;
    5589            1166 :   int alloc4 = 0 ;
    5590            1166 :   PyObject * obj0 = 0 ;
    5591            1166 :   PyObject * obj1 = 0 ;
    5592            1166 :   PyObject * obj2 = 0 ;
    5593            1166 :   PyObject * obj3 = 0 ;
    5594                 :   char *  kwnames[] = {
    5595                 :     (char *) "self",(char *) "statement",(char *) "spatialFilter",(char *) "dialect", NULL 
    5596            1166 :   };
    5597            1166 :   OGRLayerShadow *result = 0 ;
    5598                 :   
    5599            1166 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DataSource_ExecuteSQL",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    5600            1166 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5601            1166 :   if (!SWIG_IsOK(res1)) {
    5602               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_ExecuteSQL" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5603                 :   }
    5604            1166 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5605            1166 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5606            1166 :   if (!SWIG_IsOK(res2)) {
    5607               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_ExecuteSQL" "', argument " "2"" of type '" "char const *""'");
    5608                 :   }
    5609            1166 :   arg2 = reinterpret_cast< char * >(buf2);
    5610            1166 :   if (obj2) {
    5611               6 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    5612               6 :     if (!SWIG_IsOK(res3)) {
    5613               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_ExecuteSQL" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
    5614                 :     }
    5615               6 :     arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
    5616                 :   }
    5617            1166 :   if (obj3) {
    5618               9 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
    5619               9 :     if (!SWIG_IsOK(res4)) {
    5620               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DataSource_ExecuteSQL" "', argument " "4"" of type '" "char const *""'");
    5621                 :     }
    5622               9 :     arg4 = reinterpret_cast< char * >(buf4);
    5623                 :   }
    5624                 :   {
    5625            1166 :     if (!arg2) {
    5626               1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    5627                 :     }
    5628                 :   }
    5629                 :   {
    5630            1165 :     if ( bUseExceptions ) {
    5631               0 :       CPLErrorReset();
    5632                 :     }
    5633            1165 :     result = (OGRLayerShadow *)OGRDataSourceShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
    5634            1165 :     if ( bUseExceptions ) {
    5635               0 :       CPLErr eclass = CPLGetLastErrorType();
    5636               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5637               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5638                 :       }
    5639                 :     }
    5640                 :   }
    5641            1165 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5642            1165 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5643            1165 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
    5644            1165 :   return resultobj;
    5645                 : fail:
    5646               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5647               1 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
    5648               1 :   return NULL;
    5649                 : }
    5650                 : 
    5651                 : 
    5652             197 : SWIGINTERN PyObject *_wrap_DataSource_ReleaseResultSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5653             197 :   PyObject *resultobj = 0;
    5654             197 :   OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    5655             197 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    5656             197 :   void *argp1 = 0 ;
    5657             197 :   int res1 = 0 ;
    5658             197 :   int res2 = 0 ;
    5659             197 :   PyObject * obj0 = 0 ;
    5660             197 :   PyObject * obj1 = 0 ;
    5661                 :   
    5662             197 :   if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_ReleaseResultSet",&obj0,&obj1)) SWIG_fail;
    5663             197 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
    5664             197 :   if (!SWIG_IsOK(res1)) {
    5665               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_ReleaseResultSet" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
    5666                 :   }
    5667             197 :   arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
    5668             197 :   res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRLayerShadow, SWIG_POINTER_DISOWN |  0 );
    5669             197 :   if (!SWIG_IsOK(res2)) {
    5670               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_ReleaseResultSet" "', argument " "2"" of type '" "OGRLayerShadow *""'");
    5671                 :   }
    5672                 :   {
    5673             197 :     if ( bUseExceptions ) {
    5674               0 :       CPLErrorReset();
    5675                 :     }
    5676             197 :     OGRDataSourceShadow_ReleaseResultSet(arg1,arg2);
    5677             197 :     if ( bUseExceptions ) {
    5678               0 :       CPLErr eclass = CPLGetLastErrorType();
    5679               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5680               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5681                 :       }
    5682                 :     }
    5683                 :   }
    5684             197 :   resultobj = SWIG_Py_Void();
    5685             197 :   return resultobj;
    5686                 : fail:
    5687               0 :   return NULL;
    5688                 : }
    5689                 : 
    5690                 : 
    5691               1 : SWIGINTERN PyObject *DataSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5692                 :   PyObject *obj;
    5693               1 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    5694               1 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRDataSourceShadow, SWIG_NewClientData(obj));
    5695               1 :   return SWIG_Py_Void();
    5696                 : }
    5697                 : 
    5698               0 : SWIGINTERN PyObject *_wrap_Layer_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5699               0 :   PyObject *resultobj = 0;
    5700               0 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5701               0 :   void *argp1 = 0 ;
    5702               0 :   int res1 = 0 ;
    5703               0 :   PyObject * obj0 = 0 ;
    5704                 :   int result;
    5705                 :   
    5706               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetRefCount",&obj0)) SWIG_fail;
    5707               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5708               0 :   if (!SWIG_IsOK(res1)) {
    5709               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetRefCount" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    5710                 :   }
    5711               0 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    5712                 :   {
    5713               0 :     if ( bUseExceptions ) {
    5714               0 :       CPLErrorReset();
    5715                 :     }
    5716               0 :     result = (int)OGRLayerShadow_GetRefCount(arg1);
    5717               0 :     if ( bUseExceptions ) {
    5718               0 :       CPLErr eclass = CPLGetLastErrorType();
    5719               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5720               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5721                 :       }
    5722                 :     }
    5723                 :   }
    5724               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5725               0 :   return resultobj;
    5726                 : fail:
    5727               0 :   return NULL;
    5728                 : }
    5729                 : 
    5730                 : 
    5731              47 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5732              47 :   PyObject *resultobj = 0;
    5733              47 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5734              47 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    5735              47 :   void *argp1 = 0 ;
    5736              47 :   int res1 = 0 ;
    5737              47 :   void *argp2 = 0 ;
    5738              47 :   int res2 = 0 ;
    5739              47 :   PyObject * obj0 = 0 ;
    5740              47 :   PyObject * obj1 = 0 ;
    5741                 :   
    5742              47 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetSpatialFilter",&obj0,&obj1)) SWIG_fail;
    5743              47 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5744              47 :   if (!SWIG_IsOK(res1)) {
    5745               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    5746                 :   }
    5747              47 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    5748              47 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    5749              47 :   if (!SWIG_IsOK(res2)) {
    5750               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetSpatialFilter" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
    5751                 :   }
    5752              47 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
    5753                 :   {
    5754              47 :     if ( bUseExceptions ) {
    5755               0 :       CPLErrorReset();
    5756                 :     }
    5757                 :     OGRLayerShadow_SetSpatialFilter(arg1,arg2);
    5758              47 :     if ( bUseExceptions ) {
    5759               0 :       CPLErr eclass = CPLGetLastErrorType();
    5760               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5761               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5762                 :       }
    5763                 :     }
    5764                 :   }
    5765              47 :   resultobj = SWIG_Py_Void();
    5766              47 :   return resultobj;
    5767                 : fail:
    5768               0 :   return NULL;
    5769                 : }
    5770                 : 
    5771                 : 
    5772              39 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5773              39 :   PyObject *resultobj = 0;
    5774              39 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5775                 :   double arg2 ;
    5776                 :   double arg3 ;
    5777                 :   double arg4 ;
    5778                 :   double arg5 ;
    5779              39 :   void *argp1 = 0 ;
    5780              39 :   int res1 = 0 ;
    5781                 :   double val2 ;
    5782              39 :   int ecode2 = 0 ;
    5783                 :   double val3 ;
    5784              39 :   int ecode3 = 0 ;
    5785                 :   double val4 ;
    5786              39 :   int ecode4 = 0 ;
    5787                 :   double val5 ;
    5788              39 :   int ecode5 = 0 ;
    5789              39 :   PyObject * obj0 = 0 ;
    5790              39 :   PyObject * obj1 = 0 ;
    5791              39 :   PyObject * obj2 = 0 ;
    5792              39 :   PyObject * obj3 = 0 ;
    5793              39 :   PyObject * obj4 = 0 ;
    5794                 :   
    5795              39 :   if (!PyArg_ParseTuple(args,(char *)"OOOOO:Layer_SetSpatialFilterRect",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
    5796              39 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5797              39 :   if (!SWIG_IsOK(res1)) {
    5798               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilterRect" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    5799                 :   }
    5800              39 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    5801              39 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    5802              39 :   if (!SWIG_IsOK(ecode2)) {
    5803               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilterRect" "', argument " "2"" of type '" "double""'");
    5804                 :   } 
    5805              39 :   arg2 = static_cast< double >(val2);
    5806              39 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
    5807              39 :   if (!SWIG_IsOK(ecode3)) {
    5808               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_SetSpatialFilterRect" "', argument " "3"" of type '" "double""'");
    5809                 :   } 
    5810              39 :   arg3 = static_cast< double >(val3);
    5811              39 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
    5812              39 :   if (!SWIG_IsOK(ecode4)) {
    5813               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_SetSpatialFilterRect" "', argument " "4"" of type '" "double""'");
    5814                 :   } 
    5815              39 :   arg4 = static_cast< double >(val4);
    5816              39 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
    5817              39 :   if (!SWIG_IsOK(ecode5)) {
    5818               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_SetSpatialFilterRect" "', argument " "5"" of type '" "double""'");
    5819                 :   } 
    5820              39 :   arg5 = static_cast< double >(val5);
    5821                 :   {
    5822              39 :     if ( bUseExceptions ) {
    5823               0 :       CPLErrorReset();
    5824                 :     }
    5825                 :     OGRLayerShadow_SetSpatialFilterRect(arg1,arg2,arg3,arg4,arg5);
    5826              39 :     if ( bUseExceptions ) {
    5827               0 :       CPLErr eclass = CPLGetLastErrorType();
    5828               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5829               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5830                 :       }
    5831                 :     }
    5832                 :   }
    5833              39 :   resultobj = SWIG_Py_Void();
    5834              39 :   return resultobj;
    5835                 : fail:
    5836               0 :   return NULL;
    5837                 : }
    5838                 : 
    5839                 : 
    5840               0 : SWIGINTERN PyObject *_wrap_Layer_GetSpatialFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5841               0 :   PyObject *resultobj = 0;
    5842               0 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5843               0 :   void *argp1 = 0 ;
    5844               0 :   int res1 = 0 ;
    5845               0 :   PyObject * obj0 = 0 ;
    5846               0 :   OGRGeometryShadow *result = 0 ;
    5847                 :   
    5848               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetSpatialFilter",&obj0)) SWIG_fail;
    5849               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5850               0 :   if (!SWIG_IsOK(res1)) {
    5851               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    5852                 :   }
    5853               0 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    5854                 :   {
    5855               0 :     if ( bUseExceptions ) {
    5856               0 :       CPLErrorReset();
    5857                 :     }
    5858               0 :     result = (OGRGeometryShadow *)OGRLayerShadow_GetSpatialFilter(arg1);
    5859               0 :     if ( bUseExceptions ) {
    5860               0 :       CPLErr eclass = CPLGetLastErrorType();
    5861               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5862               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5863                 :       }
    5864                 :     }
    5865                 :   }
    5866               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    5867               0 :   return resultobj;
    5868                 : fail:
    5869               0 :   return NULL;
    5870                 : }
    5871                 : 
    5872                 : 
    5873             203 : SWIGINTERN PyObject *_wrap_Layer_SetAttributeFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5874             203 :   PyObject *resultobj = 0;
    5875             203 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5876             203 :   char *arg2 = (char *) 0 ;
    5877             203 :   void *argp1 = 0 ;
    5878             203 :   int res1 = 0 ;
    5879                 :   int res2 ;
    5880             203 :   char *buf2 = 0 ;
    5881             203 :   int alloc2 = 0 ;
    5882             203 :   PyObject * obj0 = 0 ;
    5883             203 :   PyObject * obj1 = 0 ;
    5884                 :   OGRErr result;
    5885                 :   
    5886             203 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetAttributeFilter",&obj0,&obj1)) SWIG_fail;
    5887             203 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5888             203 :   if (!SWIG_IsOK(res1)) {
    5889               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetAttributeFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    5890                 :   }
    5891             203 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    5892             203 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5893             203 :   if (!SWIG_IsOK(res2)) {
    5894               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetAttributeFilter" "', argument " "2"" of type '" "char *""'");
    5895                 :   }
    5896             203 :   arg2 = reinterpret_cast< char * >(buf2);
    5897                 :   {
    5898             203 :     if ( bUseExceptions ) {
    5899               0 :       CPLErrorReset();
    5900                 :     }
    5901             203 :     result = (OGRErr)OGRLayerShadow_SetAttributeFilter(arg1,arg2);
    5902             203 :     if ( bUseExceptions ) {
    5903               0 :       CPLErr eclass = CPLGetLastErrorType();
    5904               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5905               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5906                 :       }
    5907                 :     }
    5908                 :   }
    5909                 :   {
    5910                 :     /* %typemap(out) OGRErr */
    5911             203 :     if ( result != 0 && bUseExceptions) {
    5912               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    5913               0 :       SWIG_fail;
    5914                 :     }
    5915                 :   }
    5916             203 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5917                 :   {
    5918                 :     /* %typemap(ret) OGRErr */
    5919             203 :     if (resultobj == Py_None ) {
    5920               0 :       Py_DECREF(resultobj);
    5921               0 :       resultobj = 0;
    5922                 :     }
    5923             203 :     if (resultobj == 0) {
    5924             203 :       resultobj = PyInt_FromLong( result );
    5925                 :     }
    5926                 :   }
    5927             203 :   return resultobj;
    5928                 : fail:
    5929               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5930               0 :   return NULL;
    5931                 : }
    5932                 : 
    5933                 : 
    5934            1428 : SWIGINTERN PyObject *_wrap_Layer_ResetReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5935            1428 :   PyObject *resultobj = 0;
    5936            1428 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5937            1428 :   void *argp1 = 0 ;
    5938            1428 :   int res1 = 0 ;
    5939            1428 :   PyObject * obj0 = 0 ;
    5940                 :   
    5941            1428 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_ResetReading",&obj0)) SWIG_fail;
    5942            1428 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5943            1428 :   if (!SWIG_IsOK(res1)) {
    5944               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ResetReading" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    5945                 :   }
    5946            1428 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    5947                 :   {
    5948            1428 :     if ( bUseExceptions ) {
    5949               0 :       CPLErrorReset();
    5950                 :     }
    5951                 :     OGRLayerShadow_ResetReading(arg1);
    5952            1428 :     if ( bUseExceptions ) {
    5953               0 :       CPLErr eclass = CPLGetLastErrorType();
    5954               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5955               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5956                 :       }
    5957                 :     }
    5958                 :   }
    5959            1428 :   resultobj = SWIG_Py_Void();
    5960            1428 :   return resultobj;
    5961                 : fail:
    5962               0 :   return NULL;
    5963                 : }
    5964                 : 
    5965                 : 
    5966            1620 : SWIGINTERN PyObject *_wrap_Layer_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5967            1620 :   PyObject *resultobj = 0;
    5968            1620 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    5969            1620 :   void *argp1 = 0 ;
    5970            1620 :   int res1 = 0 ;
    5971            1620 :   PyObject * obj0 = 0 ;
    5972            1620 :   char *result = 0 ;
    5973                 :   
    5974            1620 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetName",&obj0)) SWIG_fail;
    5975            1620 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    5976            1620 :   if (!SWIG_IsOK(res1)) {
    5977               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetName" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    5978                 :   }
    5979            1620 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    5980                 :   {
    5981            1620 :     if ( bUseExceptions ) {
    5982               0 :       CPLErrorReset();
    5983                 :     }
    5984            1620 :     result = (char *)OGRLayerShadow_GetName(arg1);
    5985            1620 :     if ( bUseExceptions ) {
    5986               0 :       CPLErr eclass = CPLGetLastErrorType();
    5987               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5988               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5989                 :       }
    5990                 :     }
    5991                 :   }
    5992            1620 :   resultobj = SWIG_FromCharPtr((const char *)result);
    5993            1620 :   return resultobj;
    5994                 : fail:
    5995               0 :   return NULL;
    5996                 : }
    5997                 : 
    5998                 : 
    5999              52 : SWIGINTERN PyObject *_wrap_Layer_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6000              52 :   PyObject *resultobj = 0;
    6001              52 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6002              52 :   void *argp1 = 0 ;
    6003              52 :   int res1 = 0 ;
    6004              52 :   PyObject * obj0 = 0 ;
    6005                 :   OGRwkbGeometryType result;
    6006                 :   
    6007              52 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetGeomType",&obj0)) SWIG_fail;
    6008              52 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6009              52 :   if (!SWIG_IsOK(res1)) {
    6010               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeomType" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6011                 :   }
    6012              52 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6013                 :   {
    6014              52 :     if ( bUseExceptions ) {
    6015               0 :       CPLErrorReset();
    6016                 :     }
    6017              52 :     result = (OGRwkbGeometryType)OGRLayerShadow_GetGeomType(arg1);
    6018              52 :     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             104 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6026              52 :   return resultobj;
    6027                 : fail:
    6028               0 :   return NULL;
    6029                 : }
    6030                 : 
    6031                 : 
    6032              20 : SWIGINTERN PyObject *_wrap_Layer_GetGeometryColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6033              20 :   PyObject *resultobj = 0;
    6034              20 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6035              20 :   void *argp1 = 0 ;
    6036              20 :   int res1 = 0 ;
    6037              20 :   PyObject * obj0 = 0 ;
    6038              20 :   char *result = 0 ;
    6039                 :   
    6040              20 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetGeometryColumn",&obj0)) SWIG_fail;
    6041              20 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6042              20 :   if (!SWIG_IsOK(res1)) {
    6043               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeometryColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6044                 :   }
    6045              20 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6046                 :   {
    6047              20 :     if ( bUseExceptions ) {
    6048               0 :       CPLErrorReset();
    6049                 :     }
    6050              20 :     result = (char *)OGRLayerShadow_GetGeometryColumn(arg1);
    6051              20 :     if ( bUseExceptions ) {
    6052               0 :       CPLErr eclass = CPLGetLastErrorType();
    6053               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6054               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6055                 :       }
    6056                 :     }
    6057                 :   }
    6058              20 :   resultobj = SWIG_FromCharPtr((const char *)result);
    6059              20 :   return resultobj;
    6060                 : fail:
    6061               0 :   return NULL;
    6062                 : }
    6063                 : 
    6064                 : 
    6065              15 : SWIGINTERN PyObject *_wrap_Layer_GetFIDColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6066              15 :   PyObject *resultobj = 0;
    6067              15 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6068              15 :   void *argp1 = 0 ;
    6069              15 :   int res1 = 0 ;
    6070              15 :   PyObject * obj0 = 0 ;
    6071              15 :   char *result = 0 ;
    6072                 :   
    6073              15 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetFIDColumn",&obj0)) SWIG_fail;
    6074              15 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6075              15 :   if (!SWIG_IsOK(res1)) {
    6076               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFIDColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6077                 :   }
    6078              15 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6079                 :   {
    6080              15 :     if ( bUseExceptions ) {
    6081               0 :       CPLErrorReset();
    6082                 :     }
    6083              15 :     result = (char *)OGRLayerShadow_GetFIDColumn(arg1);
    6084              15 :     if ( bUseExceptions ) {
    6085               0 :       CPLErr eclass = CPLGetLastErrorType();
    6086               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6087               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6088                 :       }
    6089                 :     }
    6090                 :   }
    6091              15 :   resultobj = SWIG_FromCharPtr((const char *)result);
    6092              15 :   return resultobj;
    6093                 : fail:
    6094               0 :   return NULL;
    6095                 : }
    6096                 : 
    6097                 : 
    6098              83 : SWIGINTERN PyObject *_wrap_Layer_GetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6099              83 :   PyObject *resultobj = 0;
    6100              83 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6101                 :   long arg2 ;
    6102              83 :   void *argp1 = 0 ;
    6103              83 :   int res1 = 0 ;
    6104                 :   long val2 ;
    6105              83 :   int ecode2 = 0 ;
    6106              83 :   PyObject * obj0 = 0 ;
    6107              83 :   PyObject * obj1 = 0 ;
    6108              83 :   OGRFeatureShadow *result = 0 ;
    6109                 :   
    6110              83 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_GetFeature",&obj0,&obj1)) SWIG_fail;
    6111              83 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6112              83 :   if (!SWIG_IsOK(res1)) {
    6113               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6114                 :   }
    6115              83 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6116              83 :   ecode2 = SWIG_AsVal_long(obj1, &val2);
    6117              83 :   if (!SWIG_IsOK(ecode2)) {
    6118               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_GetFeature" "', argument " "2"" of type '" "long""'");
    6119                 :   } 
    6120              83 :   arg2 = static_cast< long >(val2);
    6121                 :   {
    6122              83 :     if ( bUseExceptions ) {
    6123               0 :       CPLErrorReset();
    6124                 :     }
    6125              83 :     result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
    6126              83 :     if ( bUseExceptions ) {
    6127               0 :       CPLErr eclass = CPLGetLastErrorType();
    6128               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6129               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6130                 :       }
    6131                 :     }
    6132                 :   }
    6133              83 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
    6134              83 :   return resultobj;
    6135                 : fail:
    6136               0 :   return NULL;
    6137                 : }
    6138                 : 
    6139                 : 
    6140            6662 : SWIGINTERN PyObject *_wrap_Layer_GetNextFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6141            6662 :   PyObject *resultobj = 0;
    6142            6662 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6143            6662 :   void *argp1 = 0 ;
    6144            6662 :   int res1 = 0 ;
    6145            6662 :   PyObject * obj0 = 0 ;
    6146            6662 :   OGRFeatureShadow *result = 0 ;
    6147                 :   
    6148            6662 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetNextFeature",&obj0)) SWIG_fail;
    6149            6662 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6150            6662 :   if (!SWIG_IsOK(res1)) {
    6151               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetNextFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6152                 :   }
    6153            6662 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6154                 :   {
    6155            6662 :     if ( bUseExceptions ) {
    6156               0 :       CPLErrorReset();
    6157                 :     }
    6158            6662 :     result = (OGRFeatureShadow *)OGRLayerShadow_GetNextFeature(arg1);
    6159            6662 :     if ( bUseExceptions ) {
    6160               0 :       CPLErr eclass = CPLGetLastErrorType();
    6161               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6162               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6163                 :       }
    6164                 :     }
    6165                 :   }
    6166            6662 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
    6167            6662 :   return resultobj;
    6168                 : fail:
    6169               0 :   return NULL;
    6170                 : }
    6171                 : 
    6172                 : 
    6173              10 : SWIGINTERN PyObject *_wrap_Layer_SetNextByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6174              10 :   PyObject *resultobj = 0;
    6175              10 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6176                 :   long arg2 ;
    6177              10 :   void *argp1 = 0 ;
    6178              10 :   int res1 = 0 ;
    6179                 :   long val2 ;
    6180              10 :   int ecode2 = 0 ;
    6181              10 :   PyObject * obj0 = 0 ;
    6182              10 :   PyObject * obj1 = 0 ;
    6183                 :   OGRErr result;
    6184                 :   
    6185              10 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetNextByIndex",&obj0,&obj1)) SWIG_fail;
    6186              10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6187              10 :   if (!SWIG_IsOK(res1)) {
    6188               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetNextByIndex" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6189                 :   }
    6190              10 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6191              10 :   ecode2 = SWIG_AsVal_long(obj1, &val2);
    6192              10 :   if (!SWIG_IsOK(ecode2)) {
    6193               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetNextByIndex" "', argument " "2"" of type '" "long""'");
    6194                 :   } 
    6195              10 :   arg2 = static_cast< long >(val2);
    6196                 :   {
    6197              10 :     if ( bUseExceptions ) {
    6198               0 :       CPLErrorReset();
    6199                 :     }
    6200              10 :     result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,arg2);
    6201              10 :     if ( bUseExceptions ) {
    6202               0 :       CPLErr eclass = CPLGetLastErrorType();
    6203               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6204               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6205                 :       }
    6206                 :     }
    6207                 :   }
    6208                 :   {
    6209                 :     /* %typemap(out) OGRErr */
    6210              10 :     if ( result != 0 && bUseExceptions) {
    6211               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6212               0 :       SWIG_fail;
    6213                 :     }
    6214                 :   }
    6215                 :   {
    6216                 :     /* %typemap(ret) OGRErr */
    6217              10 :     if (resultobj == Py_None ) {
    6218               0 :       Py_DECREF(resultobj);
    6219               0 :       resultobj = 0;
    6220                 :     }
    6221              10 :     if (resultobj == 0) {
    6222              10 :       resultobj = PyInt_FromLong( result );
    6223                 :     }
    6224                 :   }
    6225              10 :   return resultobj;
    6226                 : fail:
    6227               0 :   return NULL;
    6228                 : }
    6229                 : 
    6230                 : 
    6231            2043 : SWIGINTERN PyObject *_wrap_Layer_SetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6232            2043 :   PyObject *resultobj = 0;
    6233            2043 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6234            2043 :   OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    6235            2043 :   void *argp1 = 0 ;
    6236            2043 :   int res1 = 0 ;
    6237            2043 :   void *argp2 = 0 ;
    6238            2043 :   int res2 = 0 ;
    6239            2043 :   PyObject * obj0 = 0 ;
    6240            2043 :   PyObject * obj1 = 0 ;
    6241                 :   OGRErr result;
    6242                 :   
    6243            2043 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetFeature",&obj0,&obj1)) SWIG_fail;
    6244            2043 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6245            2043 :   if (!SWIG_IsOK(res1)) {
    6246               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6247                 :   }
    6248            2043 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6249            2043 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    6250            2043 :   if (!SWIG_IsOK(res2)) {
    6251               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
    6252                 :   }
    6253            2043 :   arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
    6254                 :   {
    6255            2043 :     if (!arg2) {
    6256               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    6257                 :     }
    6258                 :   }
    6259                 :   {
    6260            2043 :     if ( bUseExceptions ) {
    6261               0 :       CPLErrorReset();
    6262                 :     }
    6263            2043 :     result = (OGRErr)OGRLayerShadow_SetFeature(arg1,arg2);
    6264            2043 :     if ( bUseExceptions ) {
    6265               0 :       CPLErr eclass = CPLGetLastErrorType();
    6266               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6267               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6268                 :       }
    6269                 :     }
    6270                 :   }
    6271                 :   {
    6272                 :     /* %typemap(out) OGRErr */
    6273            2043 :     if ( result != 0 && bUseExceptions) {
    6274               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6275               0 :       SWIG_fail;
    6276                 :     }
    6277                 :   }
    6278                 :   {
    6279                 :     /* %typemap(ret) OGRErr */
    6280            2043 :     if (resultobj == Py_None ) {
    6281               0 :       Py_DECREF(resultobj);
    6282               0 :       resultobj = 0;
    6283                 :     }
    6284            2043 :     if (resultobj == 0) {
    6285            2043 :       resultobj = PyInt_FromLong( result );
    6286                 :     }
    6287                 :   }
    6288            2043 :   return resultobj;
    6289                 : fail:
    6290               0 :   return NULL;
    6291                 : }
    6292                 : 
    6293                 : 
    6294           18825 : SWIGINTERN PyObject *_wrap_Layer_CreateFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6295           18825 :   PyObject *resultobj = 0;
    6296           18825 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6297           18825 :   OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    6298           18825 :   void *argp1 = 0 ;
    6299           18825 :   int res1 = 0 ;
    6300           18825 :   void *argp2 = 0 ;
    6301           18825 :   int res2 = 0 ;
    6302           18825 :   PyObject * obj0 = 0 ;
    6303           18825 :   PyObject * obj1 = 0 ;
    6304                 :   OGRErr result;
    6305                 :   
    6306           18825 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_CreateFeature",&obj0,&obj1)) SWIG_fail;
    6307           18825 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6308           18825 :   if (!SWIG_IsOK(res1)) {
    6309               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6310                 :   }
    6311           18825 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6312           18825 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    6313           18825 :   if (!SWIG_IsOK(res2)) {
    6314               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
    6315                 :   }
    6316           18825 :   arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
    6317                 :   {
    6318           18825 :     if (!arg2) {
    6319               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    6320                 :     }
    6321                 :   }
    6322                 :   {
    6323           18825 :     if ( bUseExceptions ) {
    6324               0 :       CPLErrorReset();
    6325                 :     }
    6326           18825 :     result = (OGRErr)OGRLayerShadow_CreateFeature(arg1,arg2);
    6327           18825 :     if ( bUseExceptions ) {
    6328               0 :       CPLErr eclass = CPLGetLastErrorType();
    6329               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6330               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6331                 :       }
    6332                 :     }
    6333                 :   }
    6334                 :   {
    6335                 :     /* %typemap(out) OGRErr */
    6336           18825 :     if ( result != 0 && bUseExceptions) {
    6337               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6338               0 :       SWIG_fail;
    6339                 :     }
    6340                 :   }
    6341                 :   {
    6342                 :     /* %typemap(ret) OGRErr */
    6343           18825 :     if (resultobj == Py_None ) {
    6344               0 :       Py_DECREF(resultobj);
    6345               0 :       resultobj = 0;
    6346                 :     }
    6347           18825 :     if (resultobj == 0) {
    6348           18825 :       resultobj = PyInt_FromLong( result );
    6349                 :     }
    6350                 :   }
    6351           18825 :   return resultobj;
    6352                 : fail:
    6353               0 :   return NULL;
    6354                 : }
    6355                 : 
    6356                 : 
    6357              19 : SWIGINTERN PyObject *_wrap_Layer_DeleteFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6358              19 :   PyObject *resultobj = 0;
    6359              19 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6360                 :   long arg2 ;
    6361              19 :   void *argp1 = 0 ;
    6362              19 :   int res1 = 0 ;
    6363                 :   long val2 ;
    6364              19 :   int ecode2 = 0 ;
    6365              19 :   PyObject * obj0 = 0 ;
    6366              19 :   PyObject * obj1 = 0 ;
    6367                 :   OGRErr result;
    6368                 :   
    6369              19 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_DeleteFeature",&obj0,&obj1)) SWIG_fail;
    6370              19 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6371              19 :   if (!SWIG_IsOK(res1)) {
    6372               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6373                 :   }
    6374              19 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6375              19 :   ecode2 = SWIG_AsVal_long(obj1, &val2);
    6376              19 :   if (!SWIG_IsOK(ecode2)) {
    6377               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_DeleteFeature" "', argument " "2"" of type '" "long""'");
    6378                 :   } 
    6379              19 :   arg2 = static_cast< long >(val2);
    6380                 :   {
    6381              19 :     if ( bUseExceptions ) {
    6382               0 :       CPLErrorReset();
    6383                 :     }
    6384              19 :     result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,arg2);
    6385              19 :     if ( bUseExceptions ) {
    6386               0 :       CPLErr eclass = CPLGetLastErrorType();
    6387               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6388               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6389                 :       }
    6390                 :     }
    6391                 :   }
    6392                 :   {
    6393                 :     /* %typemap(out) OGRErr */
    6394              19 :     if ( result != 0 && bUseExceptions) {
    6395               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6396               0 :       SWIG_fail;
    6397                 :     }
    6398                 :   }
    6399                 :   {
    6400                 :     /* %typemap(ret) OGRErr */
    6401              19 :     if (resultobj == Py_None ) {
    6402               0 :       Py_DECREF(resultobj);
    6403               0 :       resultobj = 0;
    6404                 :     }
    6405              19 :     if (resultobj == 0) {
    6406              19 :       resultobj = PyInt_FromLong( result );
    6407                 :     }
    6408                 :   }
    6409              19 :   return resultobj;
    6410                 : fail:
    6411               0 :   return NULL;
    6412                 : }
    6413                 : 
    6414                 : 
    6415               2 : SWIGINTERN PyObject *_wrap_Layer_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6416               2 :   PyObject *resultobj = 0;
    6417               2 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6418               2 :   void *argp1 = 0 ;
    6419               2 :   int res1 = 0 ;
    6420               2 :   PyObject * obj0 = 0 ;
    6421                 :   OGRErr result;
    6422                 :   
    6423               2 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_SyncToDisk",&obj0)) SWIG_fail;
    6424               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6425               2 :   if (!SWIG_IsOK(res1)) {
    6426               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SyncToDisk" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6427                 :   }
    6428               2 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6429                 :   {
    6430               2 :     if ( bUseExceptions ) {
    6431               0 :       CPLErrorReset();
    6432                 :     }
    6433               2 :     result = (OGRErr)OGRLayerShadow_SyncToDisk(arg1);
    6434               2 :     if ( bUseExceptions ) {
    6435               0 :       CPLErr eclass = CPLGetLastErrorType();
    6436               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6437               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6438                 :       }
    6439                 :     }
    6440                 :   }
    6441                 :   {
    6442                 :     /* %typemap(out) OGRErr */
    6443               2 :     if ( result != 0 && bUseExceptions) {
    6444               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6445               0 :       SWIG_fail;
    6446                 :     }
    6447                 :   }
    6448                 :   {
    6449                 :     /* %typemap(ret) OGRErr */
    6450               2 :     if (resultobj == Py_None ) {
    6451               0 :       Py_DECREF(resultobj);
    6452               0 :       resultobj = 0;
    6453                 :     }
    6454               2 :     if (resultobj == 0) {
    6455               2 :       resultobj = PyInt_FromLong( result );
    6456                 :     }
    6457                 :   }
    6458               2 :   return resultobj;
    6459                 : fail:
    6460               0 :   return NULL;
    6461                 : }
    6462                 : 
    6463                 : 
    6464           17530 : SWIGINTERN PyObject *_wrap_Layer_GetLayerDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6465           17530 :   PyObject *resultobj = 0;
    6466           17530 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6467           17530 :   void *argp1 = 0 ;
    6468           17530 :   int res1 = 0 ;
    6469           17530 :   PyObject * obj0 = 0 ;
    6470           17530 :   OGRFeatureDefnShadow *result = 0 ;
    6471                 :   
    6472           17530 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetLayerDefn",&obj0)) SWIG_fail;
    6473           17530 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6474           17530 :   if (!SWIG_IsOK(res1)) {
    6475               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetLayerDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6476                 :   }
    6477           17530 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6478                 :   {
    6479           17530 :     if ( bUseExceptions ) {
    6480               0 :       CPLErrorReset();
    6481                 :     }
    6482           17530 :     result = (OGRFeatureDefnShadow *)OGRLayerShadow_GetLayerDefn(arg1);
    6483           17530 :     if ( bUseExceptions ) {
    6484               0 :       CPLErr eclass = CPLGetLastErrorType();
    6485               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6486               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6487                 :       }
    6488                 :     }
    6489                 :   }
    6490           17530 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
    6491           17530 :   return resultobj;
    6492                 : fail:
    6493               0 :   return NULL;
    6494                 : }
    6495                 : 
    6496                 : 
    6497             456 : SWIGINTERN PyObject *_wrap_Layer_GetFeatureCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    6498             456 :   PyObject *resultobj = 0;
    6499             456 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6500             456 :   int arg2 = (int) 1 ;
    6501             456 :   void *argp1 = 0 ;
    6502             456 :   int res1 = 0 ;
    6503                 :   int val2 ;
    6504             456 :   int ecode2 = 0 ;
    6505             456 :   PyObject * obj0 = 0 ;
    6506             456 :   PyObject * obj1 = 0 ;
    6507                 :   char *  kwnames[] = {
    6508                 :     (char *) "self",(char *) "force", NULL 
    6509             456 :   };
    6510                 :   int result;
    6511                 :   
    6512             456 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Layer_GetFeatureCount",kwnames,&obj0,&obj1)) SWIG_fail;
    6513             456 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6514             456 :   if (!SWIG_IsOK(res1)) {
    6515               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeatureCount" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6516                 :   }
    6517             456 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6518             456 :   if (obj1) {
    6519              13 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
    6520              13 :     if (!SWIG_IsOK(ecode2)) {
    6521               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_GetFeatureCount" "', argument " "2"" of type '" "int""'");
    6522                 :     } 
    6523              13 :     arg2 = static_cast< int >(val2);
    6524                 :   }
    6525                 :   {
    6526             456 :     if ( bUseExceptions ) {
    6527               0 :       CPLErrorReset();
    6528                 :     }
    6529             456 :     result = (int)OGRLayerShadow_GetFeatureCount(arg1,arg2);
    6530             456 :     if ( bUseExceptions ) {
    6531               0 :       CPLErr eclass = CPLGetLastErrorType();
    6532               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6533               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6534                 :       }
    6535                 :     }
    6536                 :   }
    6537             456 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6538             456 :   return resultobj;
    6539                 : fail:
    6540               0 :   return NULL;
    6541                 : }
    6542                 : 
    6543                 : 
    6544              61 : SWIGINTERN PyObject *_wrap_Layer_GetExtent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    6545              61 :   PyObject *resultobj = 0;
    6546              61 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6547                 :   double *arg2 ;
    6548              61 :   int *arg3 = (int *) NULL ;
    6549              61 :   int arg4 = (int) 1 ;
    6550              61 :   int arg5 = (int) 0 ;
    6551              61 :   void *argp1 = 0 ;
    6552              61 :   int res1 = 0 ;
    6553                 :   double argout2[6] ;
    6554                 :   int isvalid2 ;
    6555                 :   int val4 ;
    6556              61 :   int ecode4 = 0 ;
    6557                 :   int val5 ;
    6558              61 :   int ecode5 = 0 ;
    6559              61 :   PyObject * obj0 = 0 ;
    6560              61 :   PyObject * obj1 = 0 ;
    6561              61 :   PyObject * obj2 = 0 ;
    6562                 :   char *  kwnames[] = {
    6563                 :     (char *) "self",(char *) "force",(char *) "can_return_null", NULL 
    6564              61 :   };
    6565                 :   
    6566                 :   {
    6567                 :     /* %typemap(in) (double argout2[4], int* isvalid2) */
    6568              61 :     arg2 = argout2;
    6569              61 :     arg3 = &isvalid2;
    6570                 :   }
    6571              61 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Layer_GetExtent",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
    6572              61 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6573              61 :   if (!SWIG_IsOK(res1)) {
    6574               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetExtent" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6575                 :   }
    6576              61 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6577              61 :   if (obj1) {
    6578               9 :     ecode4 = SWIG_AsVal_int(obj1, &val4);
    6579               9 :     if (!SWIG_IsOK(ecode4)) {
    6580               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetExtent" "', argument " "4"" of type '" "int""'");
    6581                 :     } 
    6582               9 :     arg4 = static_cast< int >(val4);
    6583                 :   }
    6584              61 :   if (obj2) {
    6585               9 :     ecode5 = SWIG_AsVal_int(obj2, &val5);
    6586               9 :     if (!SWIG_IsOK(ecode5)) {
    6587               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_GetExtent" "', argument " "5"" of type '" "int""'");
    6588                 :     } 
    6589               9 :     arg5 = static_cast< int >(val5);
    6590                 :   }
    6591                 :   {
    6592              61 :     if ( bUseExceptions ) {
    6593               0 :       CPLErrorReset();
    6594                 :     }
    6595                 :     OGRLayerShadow_GetExtent(arg1,arg2,arg3,arg4,arg5);
    6596              61 :     if ( bUseExceptions ) {
    6597               0 :       CPLErr eclass = CPLGetLastErrorType();
    6598               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6599               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6600                 :       }
    6601                 :     }
    6602                 :   }
    6603              61 :   resultobj = SWIG_Py_Void();
    6604                 :   {
    6605                 :     /* %typemap(argout) (double argout[4], int* isvalid)  */
    6606                 :     PyObject *r;
    6607              61 :     if ( !*arg3 ) {
    6608               0 :       Py_INCREF(Py_None);
    6609               0 :       r = Py_None;
    6610                 :     }
    6611                 :     else {
    6612              61 :       r = CreateTupleFromDoubleArray(arg2, 4);
    6613                 :     }
    6614              61 :     resultobj = t_output_helper(resultobj,r);
    6615                 :   }
    6616              61 :   return resultobj;
    6617                 : fail:
    6618               0 :   return NULL;
    6619                 : }
    6620                 : 
    6621                 : 
    6622              90 : SWIGINTERN PyObject *_wrap_Layer_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6623              90 :   PyObject *resultobj = 0;
    6624              90 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6625              90 :   char *arg2 = (char *) 0 ;
    6626              90 :   void *argp1 = 0 ;
    6627              90 :   int res1 = 0 ;
    6628                 :   int res2 ;
    6629              90 :   char *buf2 = 0 ;
    6630              90 :   int alloc2 = 0 ;
    6631              90 :   PyObject * obj0 = 0 ;
    6632              90 :   PyObject * obj1 = 0 ;
    6633                 :   bool result;
    6634                 :   
    6635              90 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_TestCapability",&obj0,&obj1)) SWIG_fail;
    6636              90 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6637              90 :   if (!SWIG_IsOK(res1)) {
    6638               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_TestCapability" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6639                 :   }
    6640              90 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6641              90 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6642              90 :   if (!SWIG_IsOK(res2)) {
    6643               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_TestCapability" "', argument " "2"" of type '" "char const *""'");
    6644                 :   }
    6645              90 :   arg2 = reinterpret_cast< char * >(buf2);
    6646                 :   {
    6647              90 :     if (!arg2) {
    6648               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    6649                 :     }
    6650                 :   }
    6651                 :   {
    6652              90 :     if ( bUseExceptions ) {
    6653               0 :       CPLErrorReset();
    6654                 :     }
    6655              90 :     result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
    6656              90 :     if ( bUseExceptions ) {
    6657               0 :       CPLErr eclass = CPLGetLastErrorType();
    6658               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6659               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6660                 :       }
    6661                 :     }
    6662                 :   }
    6663              90 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
    6664              90 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6665              90 :   return resultobj;
    6666                 : fail:
    6667               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6668               0 :   return NULL;
    6669                 : }
    6670                 : 
    6671                 : 
    6672            4477 : SWIGINTERN PyObject *_wrap_Layer_CreateField(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    6673            4477 :   PyObject *resultobj = 0;
    6674            4477 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6675            4477 :   OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
    6676            4477 :   int arg3 = (int) 1 ;
    6677            4477 :   void *argp1 = 0 ;
    6678            4477 :   int res1 = 0 ;
    6679            4477 :   void *argp2 = 0 ;
    6680            4477 :   int res2 = 0 ;
    6681                 :   int val3 ;
    6682            4477 :   int ecode3 = 0 ;
    6683            4477 :   PyObject * obj0 = 0 ;
    6684            4477 :   PyObject * obj1 = 0 ;
    6685            4477 :   PyObject * obj2 = 0 ;
    6686                 :   char *  kwnames[] = {
    6687                 :     (char *) "self",(char *) "field_def",(char *) "approx_ok", NULL 
    6688            4477 :   };
    6689                 :   OGRErr result;
    6690                 :   
    6691            4477 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Layer_CreateField",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
    6692            4477 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6693            4477 :   if (!SWIG_IsOK(res1)) {
    6694               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateField" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6695                 :   }
    6696            4477 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6697            4477 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
    6698            4477 :   if (!SWIG_IsOK(res2)) {
    6699               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateField" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'"); 
    6700                 :   }
    6701            4477 :   arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
    6702            4477 :   if (obj2) {
    6703               0 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
    6704               0 :     if (!SWIG_IsOK(ecode3)) {
    6705               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_CreateField" "', argument " "3"" of type '" "int""'");
    6706                 :     } 
    6707               0 :     arg3 = static_cast< int >(val3);
    6708                 :   }
    6709                 :   {
    6710            4477 :     if (!arg2) {
    6711               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    6712                 :     }
    6713                 :   }
    6714                 :   {
    6715            4477 :     if ( bUseExceptions ) {
    6716               0 :       CPLErrorReset();
    6717                 :     }
    6718            4477 :     result = (OGRErr)OGRLayerShadow_CreateField(arg1,arg2,arg3);
    6719            4477 :     if ( bUseExceptions ) {
    6720               0 :       CPLErr eclass = CPLGetLastErrorType();
    6721               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6722               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6723                 :       }
    6724                 :     }
    6725                 :   }
    6726                 :   {
    6727                 :     /* %typemap(out) OGRErr */
    6728            4477 :     if ( result != 0 && bUseExceptions) {
    6729               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6730               0 :       SWIG_fail;
    6731                 :     }
    6732                 :   }
    6733                 :   {
    6734                 :     /* %typemap(ret) OGRErr */
    6735            4477 :     if (resultobj == Py_None ) {
    6736               0 :       Py_DECREF(resultobj);
    6737               0 :       resultobj = 0;
    6738                 :     }
    6739            4477 :     if (resultobj == 0) {
    6740            4477 :       resultobj = PyInt_FromLong( result );
    6741                 :     }
    6742                 :   }
    6743            4477 :   return resultobj;
    6744                 : fail:
    6745               0 :   return NULL;
    6746                 : }
    6747                 : 
    6748                 : 
    6749              28 : SWIGINTERN PyObject *_wrap_Layer_DeleteField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6750              28 :   PyObject *resultobj = 0;
    6751              28 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6752                 :   int arg2 ;
    6753              28 :   void *argp1 = 0 ;
    6754              28 :   int res1 = 0 ;
    6755                 :   int val2 ;
    6756              28 :   int ecode2 = 0 ;
    6757              28 :   PyObject * obj0 = 0 ;
    6758              28 :   PyObject * obj1 = 0 ;
    6759                 :   OGRErr result;
    6760                 :   
    6761              28 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_DeleteField",&obj0,&obj1)) SWIG_fail;
    6762              28 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6763              28 :   if (!SWIG_IsOK(res1)) {
    6764               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteField" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6765                 :   }
    6766              28 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6767              28 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    6768              28 :   if (!SWIG_IsOK(ecode2)) {
    6769               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_DeleteField" "', argument " "2"" of type '" "int""'");
    6770                 :   } 
    6771              28 :   arg2 = static_cast< int >(val2);
    6772                 :   {
    6773              28 :     if ( bUseExceptions ) {
    6774               0 :       CPLErrorReset();
    6775                 :     }
    6776              28 :     result = (OGRErr)OGRLayerShadow_DeleteField(arg1,arg2);
    6777              28 :     if ( bUseExceptions ) {
    6778               0 :       CPLErr eclass = CPLGetLastErrorType();
    6779               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6780               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6781                 :       }
    6782                 :     }
    6783                 :   }
    6784                 :   {
    6785                 :     /* %typemap(out) OGRErr */
    6786              28 :     if ( result != 0 && bUseExceptions) {
    6787               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6788               0 :       SWIG_fail;
    6789                 :     }
    6790                 :   }
    6791                 :   {
    6792                 :     /* %typemap(ret) OGRErr */
    6793              28 :     if (resultobj == Py_None ) {
    6794               0 :       Py_DECREF(resultobj);
    6795               0 :       resultobj = 0;
    6796                 :     }
    6797              28 :     if (resultobj == 0) {
    6798              28 :       resultobj = PyInt_FromLong( result );
    6799                 :     }
    6800                 :   }
    6801              28 :   return resultobj;
    6802                 : fail:
    6803               0 :   return NULL;
    6804                 : }
    6805                 : 
    6806                 : 
    6807              24 : SWIGINTERN PyObject *_wrap_Layer_ReorderField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6808              24 :   PyObject *resultobj = 0;
    6809              24 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6810                 :   int arg2 ;
    6811                 :   int arg3 ;
    6812              24 :   void *argp1 = 0 ;
    6813              24 :   int res1 = 0 ;
    6814                 :   int val2 ;
    6815              24 :   int ecode2 = 0 ;
    6816                 :   int val3 ;
    6817              24 :   int ecode3 = 0 ;
    6818              24 :   PyObject * obj0 = 0 ;
    6819              24 :   PyObject * obj1 = 0 ;
    6820              24 :   PyObject * obj2 = 0 ;
    6821                 :   OGRErr result;
    6822                 :   
    6823              24 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Layer_ReorderField",&obj0,&obj1,&obj2)) SWIG_fail;
    6824              24 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6825              24 :   if (!SWIG_IsOK(res1)) {
    6826               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderField" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6827                 :   }
    6828              24 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6829              24 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    6830              24 :   if (!SWIG_IsOK(ecode2)) {
    6831               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_ReorderField" "', argument " "2"" of type '" "int""'");
    6832                 :   } 
    6833              24 :   arg2 = static_cast< int >(val2);
    6834              24 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    6835              24 :   if (!SWIG_IsOK(ecode3)) {
    6836               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_ReorderField" "', argument " "3"" of type '" "int""'");
    6837                 :   } 
    6838              24 :   arg3 = static_cast< int >(val3);
    6839                 :   {
    6840              24 :     if ( bUseExceptions ) {
    6841               0 :       CPLErrorReset();
    6842                 :     }
    6843              24 :     result = (OGRErr)OGRLayerShadow_ReorderField(arg1,arg2,arg3);
    6844              24 :     if ( bUseExceptions ) {
    6845               0 :       CPLErr eclass = CPLGetLastErrorType();
    6846               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6847               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6848                 :       }
    6849                 :     }
    6850                 :   }
    6851                 :   {
    6852                 :     /* %typemap(out) OGRErr */
    6853              24 :     if ( result != 0 && bUseExceptions) {
    6854               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6855               0 :       SWIG_fail;
    6856                 :     }
    6857                 :   }
    6858                 :   {
    6859                 :     /* %typemap(ret) OGRErr */
    6860              24 :     if (resultobj == Py_None ) {
    6861               0 :       Py_DECREF(resultobj);
    6862               0 :       resultobj = 0;
    6863                 :     }
    6864              24 :     if (resultobj == 0) {
    6865              24 :       resultobj = PyInt_FromLong( result );
    6866                 :     }
    6867                 :   }
    6868              24 :   return resultobj;
    6869                 : fail:
    6870               0 :   return NULL;
    6871                 : }
    6872                 : 
    6873                 : 
    6874              15 : SWIGINTERN PyObject *_wrap_Layer_ReorderFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6875              15 :   PyObject *resultobj = 0;
    6876              15 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6877                 :   int arg2 ;
    6878              15 :   int *arg3 = (int *) 0 ;
    6879              15 :   void *argp1 = 0 ;
    6880              15 :   int res1 = 0 ;
    6881              15 :   PyObject * obj0 = 0 ;
    6882              15 :   PyObject * obj1 = 0 ;
    6883                 :   OGRErr result;
    6884                 :   
    6885              15 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_ReorderFields",&obj0,&obj1)) SWIG_fail;
    6886              15 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6887              15 :   if (!SWIG_IsOK(res1)) {
    6888               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderFields" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6889                 :   }
    6890              15 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6891                 :   {
    6892                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    6893                 :     /* check if is List */
    6894              15 :     if ( !PySequence_Check(obj1) ) {
    6895               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    6896               0 :       SWIG_fail;
    6897                 :     }
    6898              15 :     arg2 = PySequence_Size(obj1);
    6899              15 :     arg3 = (int*) malloc(arg2*sizeof(int));
    6900              53 :     for( int i = 0; i<arg2; i++ ) {
    6901              38 :       PyObject *o = PySequence_GetItem(obj1,i);
    6902              38 :       if ( !PyArg_Parse(o,"i",&arg3[i]) ) {
    6903               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    6904               0 :         Py_DECREF(o);
    6905                 :         SWIG_fail;
    6906                 :       }
    6907              38 :       Py_DECREF(o);
    6908                 :     }
    6909                 :   }
    6910                 :   {
    6911              15 :     if ( bUseExceptions ) {
    6912               0 :       CPLErrorReset();
    6913                 :     }
    6914              15 :     result = (OGRErr)OGRLayerShadow_ReorderFields(arg1,arg2,arg3);
    6915              15 :     if ( bUseExceptions ) {
    6916               0 :       CPLErr eclass = CPLGetLastErrorType();
    6917               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6918               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6919                 :       }
    6920                 :     }
    6921                 :   }
    6922                 :   {
    6923                 :     /* %typemap(out) OGRErr */
    6924              15 :     if ( result != 0 && bUseExceptions) {
    6925               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    6926               0 :       SWIG_fail;
    6927                 :     }
    6928                 :   }
    6929                 :   {
    6930                 :     /* %typemap(freearg) (int nList, int* pList) */
    6931              15 :     if (arg3) {
    6932              15 :       free((void*) arg3);
    6933                 :     }
    6934                 :   }
    6935                 :   {
    6936                 :     /* %typemap(ret) OGRErr */
    6937              15 :     if (resultobj == Py_None ) {
    6938               0 :       Py_DECREF(resultobj);
    6939               0 :       resultobj = 0;
    6940                 :     }
    6941              15 :     if (resultobj == 0) {
    6942              15 :       resultobj = PyInt_FromLong( result );
    6943                 :     }
    6944                 :   }
    6945              15 :   return resultobj;
    6946                 : fail:
    6947                 :   {
    6948                 :     /* %typemap(freearg) (int nList, int* pList) */
    6949               0 :     if (arg3) {
    6950               0 :       free((void*) arg3);
    6951                 :     }
    6952                 :   }
    6953               0 :   return NULL;
    6954                 : }
    6955                 : 
    6956                 : 
    6957              32 : SWIGINTERN PyObject *_wrap_Layer_AlterFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6958              32 :   PyObject *resultobj = 0;
    6959              32 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    6960                 :   int arg2 ;
    6961              32 :   OGRFieldDefnShadow *arg3 = (OGRFieldDefnShadow *) 0 ;
    6962                 :   int arg4 ;
    6963              32 :   void *argp1 = 0 ;
    6964              32 :   int res1 = 0 ;
    6965                 :   int val2 ;
    6966              32 :   int ecode2 = 0 ;
    6967              32 :   void *argp3 = 0 ;
    6968              32 :   int res3 = 0 ;
    6969                 :   int val4 ;
    6970              32 :   int ecode4 = 0 ;
    6971              32 :   PyObject * obj0 = 0 ;
    6972              32 :   PyObject * obj1 = 0 ;
    6973              32 :   PyObject * obj2 = 0 ;
    6974              32 :   PyObject * obj3 = 0 ;
    6975                 :   OGRErr result;
    6976                 :   
    6977              32 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:Layer_AlterFieldDefn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    6978              32 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    6979              32 :   if (!SWIG_IsOK(res1)) {
    6980               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_AlterFieldDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    6981                 :   }
    6982              32 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    6983              32 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    6984              32 :   if (!SWIG_IsOK(ecode2)) {
    6985               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_AlterFieldDefn" "', argument " "2"" of type '" "int""'");
    6986                 :   } 
    6987              32 :   arg2 = static_cast< int >(val2);
    6988              32 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
    6989              32 :   if (!SWIG_IsOK(res3)) {
    6990               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_AlterFieldDefn" "', argument " "3"" of type '" "OGRFieldDefnShadow *""'"); 
    6991                 :   }
    6992              32 :   arg3 = reinterpret_cast< OGRFieldDefnShadow * >(argp3);
    6993              32 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
    6994              32 :   if (!SWIG_IsOK(ecode4)) {
    6995               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_AlterFieldDefn" "', argument " "4"" of type '" "int""'");
    6996                 :   } 
    6997              32 :   arg4 = static_cast< int >(val4);
    6998                 :   {
    6999              32 :     if (!arg3) {
    7000               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7001                 :     }
    7002                 :   }
    7003                 :   {
    7004              32 :     if ( bUseExceptions ) {
    7005               0 :       CPLErrorReset();
    7006                 :     }
    7007              32 :     result = (OGRErr)OGRLayerShadow_AlterFieldDefn(arg1,arg2,arg3,arg4);
    7008              32 :     if ( bUseExceptions ) {
    7009               0 :       CPLErr eclass = CPLGetLastErrorType();
    7010               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7011               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7012                 :       }
    7013                 :     }
    7014                 :   }
    7015                 :   {
    7016                 :     /* %typemap(out) OGRErr */
    7017              32 :     if ( result != 0 && bUseExceptions) {
    7018               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7019               0 :       SWIG_fail;
    7020                 :     }
    7021                 :   }
    7022                 :   {
    7023                 :     /* %typemap(ret) OGRErr */
    7024              32 :     if (resultobj == Py_None ) {
    7025               0 :       Py_DECREF(resultobj);
    7026               0 :       resultobj = 0;
    7027                 :     }
    7028              32 :     if (resultobj == 0) {
    7029              32 :       resultobj = PyInt_FromLong( result );
    7030                 :     }
    7031                 :   }
    7032              32 :   return resultobj;
    7033                 : fail:
    7034               0 :   return NULL;
    7035                 : }
    7036                 : 
    7037                 : 
    7038              61 : SWIGINTERN PyObject *_wrap_Layer_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7039              61 :   PyObject *resultobj = 0;
    7040              61 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7041              61 :   void *argp1 = 0 ;
    7042              61 :   int res1 = 0 ;
    7043              61 :   PyObject * obj0 = 0 ;
    7044                 :   OGRErr result;
    7045                 :   
    7046              61 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_StartTransaction",&obj0)) SWIG_fail;
    7047              61 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7048              61 :   if (!SWIG_IsOK(res1)) {
    7049               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_StartTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7050                 :   }
    7051              61 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7052                 :   {
    7053              61 :     if ( bUseExceptions ) {
    7054               0 :       CPLErrorReset();
    7055                 :     }
    7056              61 :     result = (OGRErr)OGRLayerShadow_StartTransaction(arg1);
    7057              61 :     if ( bUseExceptions ) {
    7058               0 :       CPLErr eclass = CPLGetLastErrorType();
    7059               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7060               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7061                 :       }
    7062                 :     }
    7063                 :   }
    7064                 :   {
    7065                 :     /* %typemap(out) OGRErr */
    7066              61 :     if ( result != 0 && bUseExceptions) {
    7067               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7068               0 :       SWIG_fail;
    7069                 :     }
    7070                 :   }
    7071                 :   {
    7072                 :     /* %typemap(ret) OGRErr */
    7073              61 :     if (resultobj == Py_None ) {
    7074               0 :       Py_DECREF(resultobj);
    7075               0 :       resultobj = 0;
    7076                 :     }
    7077              61 :     if (resultobj == 0) {
    7078              61 :       resultobj = PyInt_FromLong( result );
    7079                 :     }
    7080                 :   }
    7081              61 :   return resultobj;
    7082                 : fail:
    7083               0 :   return NULL;
    7084                 : }
    7085                 : 
    7086                 : 
    7087              60 : SWIGINTERN PyObject *_wrap_Layer_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7088              60 :   PyObject *resultobj = 0;
    7089              60 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7090              60 :   void *argp1 = 0 ;
    7091              60 :   int res1 = 0 ;
    7092              60 :   PyObject * obj0 = 0 ;
    7093                 :   OGRErr result;
    7094                 :   
    7095              60 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_CommitTransaction",&obj0)) SWIG_fail;
    7096              60 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7097              60 :   if (!SWIG_IsOK(res1)) {
    7098               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CommitTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7099                 :   }
    7100              60 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7101                 :   {
    7102              60 :     if ( bUseExceptions ) {
    7103               0 :       CPLErrorReset();
    7104                 :     }
    7105              60 :     result = (OGRErr)OGRLayerShadow_CommitTransaction(arg1);
    7106              60 :     if ( bUseExceptions ) {
    7107               0 :       CPLErr eclass = CPLGetLastErrorType();
    7108               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7109               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7110                 :       }
    7111                 :     }
    7112                 :   }
    7113                 :   {
    7114                 :     /* %typemap(out) OGRErr */
    7115              60 :     if ( result != 0 && bUseExceptions) {
    7116               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7117               0 :       SWIG_fail;
    7118                 :     }
    7119                 :   }
    7120                 :   {
    7121                 :     /* %typemap(ret) OGRErr */
    7122              60 :     if (resultobj == Py_None ) {
    7123               0 :       Py_DECREF(resultobj);
    7124               0 :       resultobj = 0;
    7125                 :     }
    7126              60 :     if (resultobj == 0) {
    7127              60 :       resultobj = PyInt_FromLong( result );
    7128                 :     }
    7129                 :   }
    7130              60 :   return resultobj;
    7131                 : fail:
    7132               0 :   return NULL;
    7133                 : }
    7134                 : 
    7135                 : 
    7136               1 : SWIGINTERN PyObject *_wrap_Layer_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7137               1 :   PyObject *resultobj = 0;
    7138               1 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7139               1 :   void *argp1 = 0 ;
    7140               1 :   int res1 = 0 ;
    7141               1 :   PyObject * obj0 = 0 ;
    7142                 :   OGRErr result;
    7143                 :   
    7144               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_RollbackTransaction",&obj0)) SWIG_fail;
    7145               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7146               1 :   if (!SWIG_IsOK(res1)) {
    7147               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_RollbackTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7148                 :   }
    7149               1 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7150                 :   {
    7151               1 :     if ( bUseExceptions ) {
    7152               0 :       CPLErrorReset();
    7153                 :     }
    7154               1 :     result = (OGRErr)OGRLayerShadow_RollbackTransaction(arg1);
    7155               1 :     if ( bUseExceptions ) {
    7156               0 :       CPLErr eclass = CPLGetLastErrorType();
    7157               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7158               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7159                 :       }
    7160                 :     }
    7161                 :   }
    7162                 :   {
    7163                 :     /* %typemap(out) OGRErr */
    7164               1 :     if ( result != 0 && bUseExceptions) {
    7165               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7166               0 :       SWIG_fail;
    7167                 :     }
    7168                 :   }
    7169                 :   {
    7170                 :     /* %typemap(ret) OGRErr */
    7171               1 :     if (resultobj == Py_None ) {
    7172               0 :       Py_DECREF(resultobj);
    7173               0 :       resultobj = 0;
    7174                 :     }
    7175               1 :     if (resultobj == 0) {
    7176               1 :       resultobj = PyInt_FromLong( result );
    7177                 :     }
    7178                 :   }
    7179               1 :   return resultobj;
    7180                 : fail:
    7181               0 :   return NULL;
    7182                 : }
    7183                 : 
    7184                 : 
    7185             177 : SWIGINTERN PyObject *_wrap_Layer_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7186             177 :   PyObject *resultobj = 0;
    7187             177 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7188             177 :   void *argp1 = 0 ;
    7189             177 :   int res1 = 0 ;
    7190             177 :   PyObject * obj0 = 0 ;
    7191             177 :   OSRSpatialReferenceShadow *result = 0 ;
    7192                 :   
    7193             177 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetSpatialRef",&obj0)) SWIG_fail;
    7194             177 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7195             177 :   if (!SWIG_IsOK(res1)) {
    7196               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialRef" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7197                 :   }
    7198             177 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7199                 :   {
    7200             177 :     if ( bUseExceptions ) {
    7201               0 :       CPLErrorReset();
    7202                 :     }
    7203             177 :     result = (OSRSpatialReferenceShadow *)OGRLayerShadow_GetSpatialRef(arg1);
    7204             177 :     if ( bUseExceptions ) {
    7205               0 :       CPLErr eclass = CPLGetLastErrorType();
    7206               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7207               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7208                 :       }
    7209                 :     }
    7210                 :   }
    7211             177 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
    7212             177 :   return resultobj;
    7213                 : fail:
    7214               0 :   return NULL;
    7215                 : }
    7216                 : 
    7217                 : 
    7218               0 : SWIGINTERN PyObject *_wrap_Layer_GetFeaturesRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7219               0 :   PyObject *resultobj = 0;
    7220               0 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7221               0 :   void *argp1 = 0 ;
    7222               0 :   int res1 = 0 ;
    7223               0 :   PyObject * obj0 = 0 ;
    7224                 :   GIntBig result;
    7225                 :   
    7226               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetFeaturesRead",&obj0)) SWIG_fail;
    7227               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7228               0 :   if (!SWIG_IsOK(res1)) {
    7229               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeaturesRead" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7230                 :   }
    7231               0 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7232                 :   {
    7233               0 :     if ( bUseExceptions ) {
    7234               0 :       CPLErrorReset();
    7235                 :     }
    7236               0 :     result = OGRLayerShadow_GetFeaturesRead(arg1);
    7237               0 :     if ( bUseExceptions ) {
    7238               0 :       CPLErr eclass = CPLGetLastErrorType();
    7239               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7240               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7241                 :       }
    7242                 :     }
    7243                 :   }
    7244               0 :   resultobj = SWIG_NewPointerObj((new GIntBig(static_cast< const GIntBig& >(result))), SWIGTYPE_p_GIntBig, SWIG_POINTER_OWN |  0 );
    7245               0 :   return resultobj;
    7246                 : fail:
    7247               0 :   return NULL;
    7248                 : }
    7249                 : 
    7250                 : 
    7251               3 : SWIGINTERN PyObject *_wrap_Layer_SetIgnoredFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7252               3 :   PyObject *resultobj = 0;
    7253               3 :   OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    7254               3 :   char **arg2 = (char **) 0 ;
    7255               3 :   void *argp1 = 0 ;
    7256               3 :   int res1 = 0 ;
    7257               3 :   PyObject * obj0 = 0 ;
    7258               3 :   PyObject * obj1 = 0 ;
    7259                 :   OGRErr result;
    7260                 :   
    7261               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetIgnoredFields",&obj0,&obj1)) SWIG_fail;
    7262               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    7263               3 :   if (!SWIG_IsOK(res1)) {
    7264               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetIgnoredFields" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    7265                 :   }
    7266               3 :   arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    7267                 :   {
    7268                 :     /* %typemap(in) char **options */
    7269                 :     /* Check if is a list */
    7270               3 :     if ( ! PySequence_Check(obj1)) {
    7271               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
    7272               0 :       SWIG_fail;
    7273                 :     }
    7274                 :     
    7275               3 :     int size = PySequence_Size(obj1);
    7276               7 :     for (int i = 0; i < size; i++) {
    7277               4 :       PyObject* pyObj = PySequence_GetItem(obj1,i);
    7278               4 :       if (PyUnicode_Check(pyObj))
    7279                 :       {
    7280                 :         char *pszStr;
    7281                 :         Py_ssize_t nLen;
    7282               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    7283                 : #if PY_VERSION_HEX >= 0x03000000
    7284                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7285                 : #else
    7286               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7287                 : #endif
    7288               0 :         arg2 = CSLAddString( arg2, pszStr );
    7289               0 :         Py_XDECREF(pyUTF8Str);
    7290                 :       }
    7291                 : #if PY_VERSION_HEX >= 0x03000000
    7292                 :       else if (PyBytes_Check(pyObj))
    7293                 :       arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
    7294                 : #else
    7295               4 :       else if (PyString_Check(pyObj))
    7296               4 :       arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
    7297                 : #endif
    7298                 :       else
    7299                 :       {
    7300               0 :         Py_DECREF(pyObj);
    7301               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    7302               0 :         SWIG_fail;
    7303                 :       }
    7304               4 :       Py_DECREF(pyObj);
    7305                 :     }
    7306                 :   }
    7307                 :   {
    7308               3 :     if ( bUseExceptions ) {
    7309               0 :       CPLErrorReset();
    7310                 :     }
    7311               3 :     result = (OGRErr)OGRLayerShadow_SetIgnoredFields(arg1,(char const **)arg2);
    7312               3 :     if ( bUseExceptions ) {
    7313               0 :       CPLErr eclass = CPLGetLastErrorType();
    7314               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7315               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7316                 :       }
    7317                 :     }
    7318                 :   }
    7319                 :   {
    7320                 :     /* %typemap(out) OGRErr */
    7321               3 :     if ( result != 0 && bUseExceptions) {
    7322               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7323               0 :       SWIG_fail;
    7324                 :     }
    7325                 :   }
    7326                 :   {
    7327                 :     /* %typemap(freearg) char **options */
    7328               3 :     CSLDestroy( arg2 );
    7329                 :   }
    7330                 :   {
    7331                 :     /* %typemap(ret) OGRErr */
    7332               3 :     if (resultobj == Py_None ) {
    7333               0 :       Py_DECREF(resultobj);
    7334               0 :       resultobj = 0;
    7335                 :     }
    7336               3 :     if (resultobj == 0) {
    7337               3 :       resultobj = PyInt_FromLong( result );
    7338                 :     }
    7339                 :   }
    7340               3 :   return resultobj;
    7341                 : fail:
    7342                 :   {
    7343                 :     /* %typemap(freearg) char **options */
    7344               0 :     CSLDestroy( arg2 );
    7345                 :   }
    7346               0 :   return NULL;
    7347                 : }
    7348                 : 
    7349                 : 
    7350               1 : SWIGINTERN PyObject *Layer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7351                 :   PyObject *obj;
    7352               1 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    7353               1 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRLayerShadow, SWIG_NewClientData(obj));
    7354               1 :   return SWIG_Py_Void();
    7355                 : }
    7356                 : 
    7357           24970 : SWIGINTERN PyObject *_wrap_delete_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7358           24970 :   PyObject *resultobj = 0;
    7359           24970 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7360           24970 :   void *argp1 = 0 ;
    7361           24970 :   int res1 = 0 ;
    7362           24970 :   PyObject * obj0 = 0 ;
    7363                 :   
    7364           24970 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_Feature",&obj0)) SWIG_fail;
    7365           24970 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_DISOWN |  0 );
    7366           24970 :   if (!SWIG_IsOK(res1)) {
    7367               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Feature" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7368                 :   }
    7369           24970 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7370                 :   {
    7371           24970 :     if ( bUseExceptions ) {
    7372               0 :       CPLErrorReset();
    7373                 :     }
    7374                 :     delete_OGRFeatureShadow(arg1);
    7375           24970 :     if ( bUseExceptions ) {
    7376               0 :       CPLErr eclass = CPLGetLastErrorType();
    7377               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7378               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7379                 :       }
    7380                 :     }
    7381                 :   }
    7382           24970 :   resultobj = SWIG_Py_Void();
    7383           24970 :   return resultobj;
    7384                 : fail:
    7385               0 :   return NULL;
    7386                 : }
    7387                 : 
    7388                 : 
    7389           18680 : SWIGINTERN PyObject *_wrap_new_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    7390           18680 :   PyObject *resultobj = 0;
    7391           18680 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    7392           18680 :   void *argp1 = 0 ;
    7393           18680 :   int res1 = 0 ;
    7394           18680 :   PyObject * obj0 = 0 ;
    7395                 :   char *  kwnames[] = {
    7396                 :     (char *) "feature_def", NULL 
    7397           18680 :   };
    7398           18680 :   OGRFeatureShadow *result = 0 ;
    7399                 :   
    7400           18680 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_Feature",kwnames,&obj0)) SWIG_fail;
    7401           18680 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
    7402           18680 :   if (!SWIG_IsOK(res1)) {
    7403               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Feature" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
    7404                 :   }
    7405           18680 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
    7406                 :   {
    7407           18680 :     if (!arg1) {
    7408               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7409                 :     }
    7410                 :   }
    7411                 :   {
    7412           18680 :     if ( bUseExceptions ) {
    7413               0 :       CPLErrorReset();
    7414                 :     }
    7415           18680 :     result = (OGRFeatureShadow *)new_OGRFeatureShadow(arg1);
    7416           18680 :     if ( bUseExceptions ) {
    7417               0 :       CPLErr eclass = CPLGetLastErrorType();
    7418               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7419               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7420                 :       }
    7421                 :     }
    7422                 :   }
    7423           18680 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_NEW |  0 );
    7424           18680 :   return resultobj;
    7425                 : fail:
    7426               0 :   return NULL;
    7427                 : }
    7428                 : 
    7429                 : 
    7430              76 : SWIGINTERN PyObject *_wrap_Feature_GetDefnRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7431              76 :   PyObject *resultobj = 0;
    7432              76 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7433              76 :   void *argp1 = 0 ;
    7434              76 :   int res1 = 0 ;
    7435              76 :   PyObject * obj0 = 0 ;
    7436              76 :   OGRFeatureDefnShadow *result = 0 ;
    7437                 :   
    7438              76 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetDefnRef",&obj0)) SWIG_fail;
    7439              76 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7440              76 :   if (!SWIG_IsOK(res1)) {
    7441               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7442                 :   }
    7443              76 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7444                 :   {
    7445              76 :     if ( bUseExceptions ) {
    7446               0 :       CPLErrorReset();
    7447                 :     }
    7448              76 :     result = (OGRFeatureDefnShadow *)OGRFeatureShadow_GetDefnRef(arg1);
    7449              76 :     if ( bUseExceptions ) {
    7450               0 :       CPLErr eclass = CPLGetLastErrorType();
    7451               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7452               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7453                 :       }
    7454                 :     }
    7455                 :   }
    7456              76 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
    7457              76 :   return resultobj;
    7458                 : fail:
    7459               0 :   return NULL;
    7460                 : }
    7461                 : 
    7462                 : 
    7463           15496 : SWIGINTERN PyObject *_wrap_Feature_SetGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7464           15496 :   PyObject *resultobj = 0;
    7465           15496 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7466           15496 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    7467           15496 :   void *argp1 = 0 ;
    7468           15496 :   int res1 = 0 ;
    7469           15496 :   void *argp2 = 0 ;
    7470           15496 :   int res2 = 0 ;
    7471           15496 :   PyObject * obj0 = 0 ;
    7472           15496 :   PyObject * obj1 = 0 ;
    7473                 :   OGRErr result;
    7474                 :   
    7475           15496 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetGeometry",&obj0,&obj1)) SWIG_fail;
    7476           15496 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7477           15496 :   if (!SWIG_IsOK(res1)) {
    7478               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometry" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7479                 :   }
    7480           15496 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7481           15496 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    7482           15496 :   if (!SWIG_IsOK(res2)) {
    7483               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
    7484                 :   }
    7485           15496 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
    7486                 :   {
    7487           15496 :     if ( bUseExceptions ) {
    7488               0 :       CPLErrorReset();
    7489                 :     }
    7490           15496 :     result = (OGRErr)OGRFeatureShadow_SetGeometry(arg1,arg2);
    7491           15496 :     if ( bUseExceptions ) {
    7492               0 :       CPLErr eclass = CPLGetLastErrorType();
    7493               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7494               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7495                 :       }
    7496                 :     }
    7497                 :   }
    7498                 :   {
    7499                 :     /* %typemap(out) OGRErr */
    7500           15496 :     if ( result != 0 && bUseExceptions) {
    7501               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7502               0 :       SWIG_fail;
    7503                 :     }
    7504                 :   }
    7505                 :   {
    7506                 :     /* %typemap(ret) OGRErr */
    7507           15496 :     if (resultobj == Py_None ) {
    7508               0 :       Py_DECREF(resultobj);
    7509               0 :       resultobj = 0;
    7510                 :     }
    7511           15496 :     if (resultobj == 0) {
    7512           15496 :       resultobj = PyInt_FromLong( result );
    7513                 :     }
    7514                 :   }
    7515           15496 :   return resultobj;
    7516                 : fail:
    7517               0 :   return NULL;
    7518                 : }
    7519                 : 
    7520                 : 
    7521             218 : SWIGINTERN PyObject *_wrap_Feature_SetGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7522             218 :   PyObject *resultobj = 0;
    7523             218 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7524             218 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    7525             218 :   void *argp1 = 0 ;
    7526             218 :   int res1 = 0 ;
    7527             218 :   int res2 = 0 ;
    7528             218 :   PyObject * obj0 = 0 ;
    7529             218 :   PyObject * obj1 = 0 ;
    7530                 :   OGRErr result;
    7531                 :   
    7532             218 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetGeometryDirectly",&obj0,&obj1)) SWIG_fail;
    7533             218 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7534             218 :   if (!SWIG_IsOK(res1)) {
    7535               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometryDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7536                 :   }
    7537             218 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7538             218 :   res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
    7539             218 :   if (!SWIG_IsOK(res2)) {
    7540               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
    7541                 :   }
    7542                 :   {
    7543             218 :     if ( bUseExceptions ) {
    7544               0 :       CPLErrorReset();
    7545                 :     }
    7546             436 :     result = (OGRErr)OGRFeatureShadow_SetGeometryDirectly(arg1,arg2);
    7547             218 :     if ( bUseExceptions ) {
    7548               0 :       CPLErr eclass = CPLGetLastErrorType();
    7549               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7550               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7551                 :       }
    7552                 :     }
    7553                 :   }
    7554                 :   {
    7555                 :     /* %typemap(out) OGRErr */
    7556             218 :     if ( result != 0 && bUseExceptions) {
    7557               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    7558               0 :       SWIG_fail;
    7559                 :     }
    7560                 :   }
    7561                 :   {
    7562                 :     /* %typemap(ret) OGRErr */
    7563             218 :     if (resultobj == Py_None ) {
    7564               0 :       Py_DECREF(resultobj);
    7565               0 :       resultobj = 0;
    7566                 :     }
    7567             218 :     if (resultobj == 0) {
    7568             218 :       resultobj = PyInt_FromLong( result );
    7569                 :     }
    7570                 :   }
    7571             218 :   return resultobj;
    7572                 : fail:
    7573               0 :   return NULL;
    7574                 : }
    7575                 : 
    7576                 : 
    7577            2466 : SWIGINTERN PyObject *_wrap_Feature_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7578            2466 :   PyObject *resultobj = 0;
    7579            2466 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7580            2466 :   void *argp1 = 0 ;
    7581            2466 :   int res1 = 0 ;
    7582            2466 :   PyObject * obj0 = 0 ;
    7583            2466 :   OGRGeometryShadow *result = 0 ;
    7584                 :   
    7585            2466 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetGeometryRef",&obj0)) SWIG_fail;
    7586            2466 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7587            2466 :   if (!SWIG_IsOK(res1)) {
    7588               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeometryRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7589                 :   }
    7590            2466 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7591                 :   {
    7592            2466 :     if ( bUseExceptions ) {
    7593               0 :       CPLErrorReset();
    7594                 :     }
    7595            2466 :     result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeometryRef(arg1);
    7596            2466 :     if ( bUseExceptions ) {
    7597               0 :       CPLErr eclass = CPLGetLastErrorType();
    7598               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7599               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7600                 :       }
    7601                 :     }
    7602                 :   }
    7603            2466 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    7604            2466 :   return resultobj;
    7605                 : fail:
    7606               0 :   return NULL;
    7607                 : }
    7608                 : 
    7609                 : 
    7610              36 : SWIGINTERN PyObject *_wrap_Feature_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7611              36 :   PyObject *resultobj = 0;
    7612              36 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7613              36 :   void *argp1 = 0 ;
    7614              36 :   int res1 = 0 ;
    7615              36 :   PyObject * obj0 = 0 ;
    7616              36 :   OGRFeatureShadow *result = 0 ;
    7617                 :   
    7618              36 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_Clone",&obj0)) SWIG_fail;
    7619              36 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7620              36 :   if (!SWIG_IsOK(res1)) {
    7621               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Clone" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7622                 :   }
    7623              36 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7624                 :   {
    7625              36 :     if ( bUseExceptions ) {
    7626               0 :       CPLErrorReset();
    7627                 :     }
    7628              36 :     result = (OGRFeatureShadow *)OGRFeatureShadow_Clone(arg1);
    7629              36 :     if ( bUseExceptions ) {
    7630               0 :       CPLErr eclass = CPLGetLastErrorType();
    7631               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7632               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7633                 :       }
    7634                 :     }
    7635                 :   }
    7636              36 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
    7637              36 :   return resultobj;
    7638                 : fail:
    7639               0 :   return NULL;
    7640                 : }
    7641                 : 
    7642                 : 
    7643              42 : SWIGINTERN PyObject *_wrap_Feature_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7644              42 :   PyObject *resultobj = 0;
    7645              42 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7646              42 :   OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    7647              42 :   void *argp1 = 0 ;
    7648              42 :   int res1 = 0 ;
    7649              42 :   void *argp2 = 0 ;
    7650              42 :   int res2 = 0 ;
    7651              42 :   PyObject * obj0 = 0 ;
    7652              42 :   PyObject * obj1 = 0 ;
    7653                 :   bool result;
    7654                 :   
    7655              42 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_Equal",&obj0,&obj1)) SWIG_fail;
    7656              42 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7657              42 :   if (!SWIG_IsOK(res1)) {
    7658               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Equal" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7659                 :   }
    7660              42 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7661              42 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7662              42 :   if (!SWIG_IsOK(res2)) {
    7663               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_Equal" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
    7664                 :   }
    7665              42 :   arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
    7666                 :   {
    7667              42 :     if (!arg2) {
    7668               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7669                 :     }
    7670                 :   }
    7671                 :   {
    7672              42 :     if ( bUseExceptions ) {
    7673               0 :       CPLErrorReset();
    7674                 :     }
    7675              42 :     result = (bool)OGRFeatureShadow_Equal(arg1,arg2);
    7676              42 :     if ( bUseExceptions ) {
    7677               0 :       CPLErr eclass = CPLGetLastErrorType();
    7678               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7679               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7680                 :       }
    7681                 :     }
    7682                 :   }
    7683              42 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
    7684              42 :   return resultobj;
    7685                 : fail:
    7686               0 :   return NULL;
    7687                 : }
    7688                 : 
    7689                 : 
    7690            4246 : SWIGINTERN PyObject *_wrap_Feature_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7691            4246 :   PyObject *resultobj = 0;
    7692            4246 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7693            4246 :   void *argp1 = 0 ;
    7694            4246 :   int res1 = 0 ;
    7695            4246 :   PyObject * obj0 = 0 ;
    7696                 :   int result;
    7697                 :   
    7698            4246 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetFieldCount",&obj0)) SWIG_fail;
    7699            4246 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7700            4246 :   if (!SWIG_IsOK(res1)) {
    7701               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7702                 :   }
    7703            4246 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7704                 :   {
    7705            4246 :     if ( bUseExceptions ) {
    7706               0 :       CPLErrorReset();
    7707                 :     }
    7708            4246 :     result = (int)OGRFeatureShadow_GetFieldCount(arg1);
    7709            4246 :     if ( bUseExceptions ) {
    7710               0 :       CPLErr eclass = CPLGetLastErrorType();
    7711               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7712               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7713                 :       }
    7714                 :     }
    7715                 :   }
    7716            4246 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7717            4246 :   return resultobj;
    7718                 : fail:
    7719               0 :   return NULL;
    7720                 : }
    7721                 : 
    7722                 : 
    7723              11 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7724              11 :   PyObject *resultobj = 0;
    7725              11 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7726                 :   int arg2 ;
    7727              11 :   void *argp1 = 0 ;
    7728              11 :   int res1 = 0 ;
    7729                 :   int val2 ;
    7730              11 :   int ecode2 = 0 ;
    7731              11 :   PyObject * obj0 = 0 ;
    7732              11 :   PyObject * obj1 = 0 ;
    7733              11 :   OGRFieldDefnShadow *result = 0 ;
    7734                 :   
    7735              11 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldDefnRef",&obj0,&obj1)) SWIG_fail;
    7736              11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7737              11 :   if (!SWIG_IsOK(res1)) {
    7738               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7739                 :   }
    7740              11 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7741              11 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    7742              11 :   if (!SWIG_IsOK(ecode2)) {
    7743               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldDefnRef" "', argument " "2"" of type '" "int""'");
    7744                 :   } 
    7745              11 :   arg2 = static_cast< int >(val2);
    7746                 :   {
    7747              11 :     if ( bUseExceptions ) {
    7748               0 :       CPLErrorReset();
    7749                 :     }
    7750              11 :     result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_0(arg1,arg2);
    7751              11 :     if ( bUseExceptions ) {
    7752               0 :       CPLErr eclass = CPLGetLastErrorType();
    7753               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7754               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7755                 :       }
    7756                 :     }
    7757                 :   }
    7758              11 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
    7759              11 :   return resultobj;
    7760                 : fail:
    7761               0 :   return NULL;
    7762                 : }
    7763                 : 
    7764                 : 
    7765               0 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7766               0 :   PyObject *resultobj = 0;
    7767               0 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7768               0 :   char *arg2 = (char *) 0 ;
    7769               0 :   void *argp1 = 0 ;
    7770               0 :   int res1 = 0 ;
    7771                 :   int res2 ;
    7772               0 :   char *buf2 = 0 ;
    7773               0 :   int alloc2 = 0 ;
    7774               0 :   PyObject * obj0 = 0 ;
    7775               0 :   PyObject * obj1 = 0 ;
    7776               0 :   OGRFieldDefnShadow *result = 0 ;
    7777                 :   
    7778               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldDefnRef",&obj0,&obj1)) SWIG_fail;
    7779               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7780               0 :   if (!SWIG_IsOK(res1)) {
    7781               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7782                 :   }
    7783               0 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7784               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7785               0 :   if (!SWIG_IsOK(res2)) {
    7786               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldDefnRef" "', argument " "2"" of type '" "char const *""'");
    7787                 :   }
    7788               0 :   arg2 = reinterpret_cast< char * >(buf2);
    7789                 :   {
    7790               0 :     if (!arg2) {
    7791               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7792                 :     }
    7793                 :   }
    7794                 :   {
    7795               0 :     if ( bUseExceptions ) {
    7796               0 :       CPLErrorReset();
    7797                 :     }
    7798               0 :     result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
    7799               0 :     if ( bUseExceptions ) {
    7800               0 :       CPLErr eclass = CPLGetLastErrorType();
    7801               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7802               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7803                 :       }
    7804                 :     }
    7805                 :   }
    7806               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
    7807               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7808               0 :   return resultobj;
    7809                 : fail:
    7810               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7811               0 :   return NULL;
    7812                 : }
    7813                 : 
    7814                 : 
    7815              11 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef(PyObject *self, PyObject *args) {
    7816                 :   int argc;
    7817                 :   PyObject *argv[3];
    7818                 :   int ii;
    7819                 :   
    7820              11 :   if (!PyTuple_Check(args)) SWIG_fail;
    7821              11 :   argc = (int)PyObject_Length(args);
    7822              33 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    7823              22 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    7824                 :   }
    7825              11 :   if (argc == 2) {
    7826                 :     int _v;
    7827              11 :     void *vptr = 0;
    7828              11 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    7829              11 :     _v = SWIG_CheckState(res);
    7830              11 :     if (_v) {
    7831                 :       {
    7832              11 :         int res = SWIG_AsVal_int(argv[1], NULL);
    7833              11 :         _v = SWIG_CheckState(res);
    7834                 :       }
    7835              11 :       if (_v) {
    7836              11 :         return _wrap_Feature_GetFieldDefnRef__SWIG_0(self, args);
    7837                 :       }
    7838                 :     }
    7839                 :   }
    7840               0 :   if (argc == 2) {
    7841                 :     int _v;
    7842               0 :     void *vptr = 0;
    7843               0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    7844               0 :     _v = SWIG_CheckState(res);
    7845               0 :     if (_v) {
    7846               0 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    7847               0 :       _v = SWIG_CheckState(res);
    7848               0 :       if (_v) {
    7849               0 :         return _wrap_Feature_GetFieldDefnRef__SWIG_1(self, args);
    7850                 :       }
    7851                 :     }
    7852                 :   }
    7853                 :   
    7854                 : fail:
    7855                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldDefnRef'.\n"
    7856                 :     "  Possible C/C++ prototypes are:\n"
    7857                 :     "    GetFieldDefnRef(OGRFeatureShadow *,int)\n"
    7858               0 :     "    GetFieldDefnRef(OGRFeatureShadow *,char const *)\n");
    7859               0 :   return NULL;
    7860                 : }
    7861                 : 
    7862                 : 
    7863            3097 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7864            3097 :   PyObject *resultobj = 0;
    7865            3097 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7866                 :   int arg2 ;
    7867            3097 :   void *argp1 = 0 ;
    7868            3097 :   int res1 = 0 ;
    7869                 :   int val2 ;
    7870            3097 :   int ecode2 = 0 ;
    7871            3097 :   PyObject * obj0 = 0 ;
    7872            3097 :   PyObject * obj1 = 0 ;
    7873            3097 :   char *result = 0 ;
    7874                 :   
    7875            3097 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsString",&obj0,&obj1)) SWIG_fail;
    7876            3097 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7877            3097 :   if (!SWIG_IsOK(res1)) {
    7878               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7879                 :   }
    7880            3097 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7881            3097 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    7882            3097 :   if (!SWIG_IsOK(ecode2)) {
    7883               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsString" "', argument " "2"" of type '" "int""'");
    7884                 :   } 
    7885            3097 :   arg2 = static_cast< int >(val2);
    7886                 :   {
    7887            3097 :     if ( bUseExceptions ) {
    7888               0 :       CPLErrorReset();
    7889                 :     }
    7890            3097 :     result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2);
    7891            3097 :     if ( bUseExceptions ) {
    7892               0 :       CPLErr eclass = CPLGetLastErrorType();
    7893               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7894               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7895                 :       }
    7896                 :     }
    7897                 :   }
    7898            3097 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7899            3097 :   return resultobj;
    7900                 : fail:
    7901               0 :   return NULL;
    7902                 : }
    7903                 : 
    7904                 : 
    7905             313 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7906             313 :   PyObject *resultobj = 0;
    7907             313 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    7908             313 :   char *arg2 = (char *) 0 ;
    7909             313 :   void *argp1 = 0 ;
    7910             313 :   int res1 = 0 ;
    7911                 :   int res2 ;
    7912             313 :   char *buf2 = 0 ;
    7913             313 :   int alloc2 = 0 ;
    7914             313 :   PyObject * obj0 = 0 ;
    7915             313 :   PyObject * obj1 = 0 ;
    7916             313 :   char *result = 0 ;
    7917                 :   
    7918             313 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsString",&obj0,&obj1)) SWIG_fail;
    7919             313 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    7920             313 :   if (!SWIG_IsOK(res1)) {
    7921               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    7922                 :   }
    7923             313 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    7924             313 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7925             313 :   if (!SWIG_IsOK(res2)) {
    7926               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsString" "', argument " "2"" of type '" "char const *""'");
    7927                 :   }
    7928             313 :   arg2 = reinterpret_cast< char * >(buf2);
    7929                 :   {
    7930             313 :     if (!arg2) {
    7931               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7932                 :     }
    7933                 :   }
    7934                 :   {
    7935             313 :     if ( bUseExceptions ) {
    7936               0 :       CPLErrorReset();
    7937                 :     }
    7938             313 :     result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
    7939             313 :     if ( bUseExceptions ) {
    7940               0 :       CPLErr eclass = CPLGetLastErrorType();
    7941               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7942               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7943                 :       }
    7944                 :     }
    7945                 :   }
    7946             313 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7947             313 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7948             313 :   return resultobj;
    7949                 : fail:
    7950               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7951               0 :   return NULL;
    7952                 : }
    7953                 : 
    7954                 : 
    7955            3410 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString(PyObject *self, PyObject *args) {
    7956                 :   int argc;
    7957                 :   PyObject *argv[3];
    7958                 :   int ii;
    7959                 :   
    7960            3410 :   if (!PyTuple_Check(args)) SWIG_fail;
    7961            3410 :   argc = (int)PyObject_Length(args);
    7962           10230 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    7963            6820 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    7964                 :   }
    7965            3410 :   if (argc == 2) {
    7966                 :     int _v;
    7967            3410 :     void *vptr = 0;
    7968            3410 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    7969            3410 :     _v = SWIG_CheckState(res);
    7970            3410 :     if (_v) {
    7971                 :       {
    7972            3410 :         int res = SWIG_AsVal_int(argv[1], NULL);
    7973            3410 :         _v = SWIG_CheckState(res);
    7974                 :       }
    7975            3410 :       if (_v) {
    7976            3097 :         return _wrap_Feature_GetFieldAsString__SWIG_0(self, args);
    7977                 :       }
    7978                 :     }
    7979                 :   }
    7980             313 :   if (argc == 2) {
    7981                 :     int _v;
    7982             313 :     void *vptr = 0;
    7983             313 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    7984             313 :     _v = SWIG_CheckState(res);
    7985             313 :     if (_v) {
    7986             313 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    7987             313 :       _v = SWIG_CheckState(res);
    7988             313 :       if (_v) {
    7989             313 :         return _wrap_Feature_GetFieldAsString__SWIG_1(self, args);
    7990                 :       }
    7991                 :     }
    7992                 :   }
    7993                 :   
    7994                 : fail:
    7995                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsString'.\n"
    7996                 :     "  Possible C/C++ prototypes are:\n"
    7997                 :     "    GetFieldAsString(OGRFeatureShadow *,int)\n"
    7998               0 :     "    GetFieldAsString(OGRFeatureShadow *,char const *)\n");
    7999               0 :   return NULL;
    8000                 : }
    8001                 : 
    8002                 : 
    8003            2535 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8004            2535 :   PyObject *resultobj = 0;
    8005            2535 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8006                 :   int arg2 ;
    8007            2535 :   void *argp1 = 0 ;
    8008            2535 :   int res1 = 0 ;
    8009                 :   int val2 ;
    8010            2535 :   int ecode2 = 0 ;
    8011            2535 :   PyObject * obj0 = 0 ;
    8012            2535 :   PyObject * obj1 = 0 ;
    8013                 :   int result;
    8014                 :   
    8015            2535 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger",&obj0,&obj1)) SWIG_fail;
    8016            2535 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8017            2535 :   if (!SWIG_IsOK(res1)) {
    8018               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8019                 :   }
    8020            2535 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8021            2535 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    8022            2535 :   if (!SWIG_IsOK(ecode2)) {
    8023               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "int""'");
    8024                 :   } 
    8025            2535 :   arg2 = static_cast< int >(val2);
    8026                 :   {
    8027            2535 :     if ( bUseExceptions ) {
    8028               0 :       CPLErrorReset();
    8029                 :     }
    8030            2535 :     result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
    8031            2535 :     if ( bUseExceptions ) {
    8032               0 :       CPLErr eclass = CPLGetLastErrorType();
    8033               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8034               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8035                 :       }
    8036                 :     }
    8037                 :   }
    8038            2535 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8039            2535 :   return resultobj;
    8040                 : fail:
    8041               0 :   return NULL;
    8042                 : }
    8043                 : 
    8044                 : 
    8045              15 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8046              15 :   PyObject *resultobj = 0;
    8047              15 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8048              15 :   char *arg2 = (char *) 0 ;
    8049              15 :   void *argp1 = 0 ;
    8050              15 :   int res1 = 0 ;
    8051                 :   int res2 ;
    8052              15 :   char *buf2 = 0 ;
    8053              15 :   int alloc2 = 0 ;
    8054              15 :   PyObject * obj0 = 0 ;
    8055              15 :   PyObject * obj1 = 0 ;
    8056                 :   int result;
    8057                 :   
    8058              15 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger",&obj0,&obj1)) SWIG_fail;
    8059              15 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8060              15 :   if (!SWIG_IsOK(res1)) {
    8061               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8062                 :   }
    8063              15 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8064              15 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    8065              15 :   if (!SWIG_IsOK(res2)) {
    8066               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "char const *""'");
    8067                 :   }
    8068              15 :   arg2 = reinterpret_cast< char * >(buf2);
    8069                 :   {
    8070              15 :     if (!arg2) {
    8071               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8072                 :     }
    8073                 :   }
    8074                 :   {
    8075              15 :     if ( bUseExceptions ) {
    8076               0 :       CPLErrorReset();
    8077                 :     }
    8078              15 :     result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
    8079              15 :     if ( bUseExceptions ) {
    8080               0 :       CPLErr eclass = CPLGetLastErrorType();
    8081               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8082               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8083                 :       }
    8084                 :     }
    8085                 :   }
    8086              15 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8087              15 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8088              15 :   return resultobj;
    8089                 : fail:
    8090               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8091               0 :   return NULL;
    8092                 : }
    8093                 : 
    8094                 : 
    8095            2550 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger(PyObject *self, PyObject *args) {
    8096                 :   int argc;
    8097                 :   PyObject *argv[3];
    8098                 :   int ii;
    8099                 :   
    8100            2550 :   if (!PyTuple_Check(args)) SWIG_fail;
    8101            2550 :   argc = (int)PyObject_Length(args);
    8102            7650 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    8103            5100 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    8104                 :   }
    8105            2550 :   if (argc == 2) {
    8106                 :     int _v;
    8107            2550 :     void *vptr = 0;
    8108            2550 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    8109            2550 :     _v = SWIG_CheckState(res);
    8110            2550 :     if (_v) {
    8111                 :       {
    8112            2550 :         int res = SWIG_AsVal_int(argv[1], NULL);
    8113            2550 :         _v = SWIG_CheckState(res);
    8114                 :       }
    8115            2550 :       if (_v) {
    8116            2535 :         return _wrap_Feature_GetFieldAsInteger__SWIG_0(self, args);
    8117                 :       }
    8118                 :     }
    8119                 :   }
    8120              15 :   if (argc == 2) {
    8121                 :     int _v;
    8122              15 :     void *vptr = 0;
    8123              15 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    8124              15 :     _v = SWIG_CheckState(res);
    8125              15 :     if (_v) {
    8126              15 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    8127              15 :       _v = SWIG_CheckState(res);
    8128              15 :       if (_v) {
    8129              15 :         return _wrap_Feature_GetFieldAsInteger__SWIG_1(self, args);
    8130                 :       }
    8131                 :     }
    8132                 :   }
    8133                 :   
    8134                 : fail:
    8135                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsInteger'.\n"
    8136                 :     "  Possible C/C++ prototypes are:\n"
    8137                 :     "    GetFieldAsInteger(OGRFeatureShadow *,int)\n"
    8138               0 :     "    GetFieldAsInteger(OGRFeatureShadow *,char const *)\n");
    8139               0 :   return NULL;
    8140                 : }
    8141                 : 
    8142                 : 
    8143             554 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8144             554 :   PyObject *resultobj = 0;
    8145             554 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8146                 :   int arg2 ;
    8147             554 :   void *argp1 = 0 ;
    8148             554 :   int res1 = 0 ;
    8149                 :   int val2 ;
    8150             554 :   int ecode2 = 0 ;
    8151             554 :   PyObject * obj0 = 0 ;
    8152             554 :   PyObject * obj1 = 0 ;
    8153                 :   double result;
    8154                 :   
    8155             554 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDouble",&obj0,&obj1)) SWIG_fail;
    8156             554 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8157             554 :   if (!SWIG_IsOK(res1)) {
    8158               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8159                 :   }
    8160             554 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8161             554 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    8162             554 :   if (!SWIG_IsOK(ecode2)) {
    8163               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "int""'");
    8164                 :   } 
    8165             554 :   arg2 = static_cast< int >(val2);
    8166                 :   {
    8167             554 :     if ( bUseExceptions ) {
    8168               0 :       CPLErrorReset();
    8169                 :     }
    8170             554 :     result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
    8171             554 :     if ( bUseExceptions ) {
    8172               0 :       CPLErr eclass = CPLGetLastErrorType();
    8173               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8174               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8175                 :       }
    8176                 :     }
    8177                 :   }
    8178             554 :   resultobj = SWIG_From_double(static_cast< double >(result));
    8179             554 :   return resultobj;
    8180                 : fail:
    8181               0 :   return NULL;
    8182                 : }
    8183                 : 
    8184                 : 
    8185               9 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8186               9 :   PyObject *resultobj = 0;
    8187               9 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8188               9 :   char *arg2 = (char *) 0 ;
    8189               9 :   void *argp1 = 0 ;
    8190               9 :   int res1 = 0 ;
    8191                 :   int res2 ;
    8192               9 :   char *buf2 = 0 ;
    8193               9 :   int alloc2 = 0 ;
    8194               9 :   PyObject * obj0 = 0 ;
    8195               9 :   PyObject * obj1 = 0 ;
    8196                 :   double result;
    8197                 :   
    8198               9 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDouble",&obj0,&obj1)) SWIG_fail;
    8199               9 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8200               9 :   if (!SWIG_IsOK(res1)) {
    8201               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8202                 :   }
    8203               9 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8204               9 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    8205               9 :   if (!SWIG_IsOK(res2)) {
    8206               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "char const *""'");
    8207                 :   }
    8208               9 :   arg2 = reinterpret_cast< char * >(buf2);
    8209                 :   {
    8210               9 :     if (!arg2) {
    8211               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8212                 :     }
    8213                 :   }
    8214                 :   {
    8215               9 :     if ( bUseExceptions ) {
    8216               0 :       CPLErrorReset();
    8217                 :     }
    8218               9 :     result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
    8219               9 :     if ( bUseExceptions ) {
    8220               0 :       CPLErr eclass = CPLGetLastErrorType();
    8221               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8222               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8223                 :       }
    8224                 :     }
    8225                 :   }
    8226               9 :   resultobj = SWIG_From_double(static_cast< double >(result));
    8227               9 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8228               9 :   return resultobj;
    8229                 : fail:
    8230               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8231               0 :   return NULL;
    8232                 : }
    8233                 : 
    8234                 : 
    8235             563 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble(PyObject *self, PyObject *args) {
    8236                 :   int argc;
    8237                 :   PyObject *argv[3];
    8238                 :   int ii;
    8239                 :   
    8240             563 :   if (!PyTuple_Check(args)) SWIG_fail;
    8241             563 :   argc = (int)PyObject_Length(args);
    8242            1689 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    8243            1126 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    8244                 :   }
    8245             563 :   if (argc == 2) {
    8246                 :     int _v;
    8247             563 :     void *vptr = 0;
    8248             563 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    8249             563 :     _v = SWIG_CheckState(res);
    8250             563 :     if (_v) {
    8251                 :       {
    8252             563 :         int res = SWIG_AsVal_int(argv[1], NULL);
    8253             563 :         _v = SWIG_CheckState(res);
    8254                 :       }
    8255             563 :       if (_v) {
    8256             554 :         return _wrap_Feature_GetFieldAsDouble__SWIG_0(self, args);
    8257                 :       }
    8258                 :     }
    8259                 :   }
    8260               9 :   if (argc == 2) {
    8261                 :     int _v;
    8262               9 :     void *vptr = 0;
    8263               9 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    8264               9 :     _v = SWIG_CheckState(res);
    8265               9 :     if (_v) {
    8266               9 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    8267               9 :       _v = SWIG_CheckState(res);
    8268               9 :       if (_v) {
    8269               9 :         return _wrap_Feature_GetFieldAsDouble__SWIG_1(self, args);
    8270                 :       }
    8271                 :     }
    8272                 :   }
    8273                 :   
    8274                 : fail:
    8275                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsDouble'.\n"
    8276                 :     "  Possible C/C++ prototypes are:\n"
    8277                 :     "    GetFieldAsDouble(OGRFeatureShadow *,int)\n"
    8278               0 :     "    GetFieldAsDouble(OGRFeatureShadow *,char const *)\n");
    8279               0 :   return NULL;
    8280                 : }
    8281                 : 
    8282                 : 
    8283               1 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8284               1 :   PyObject *resultobj = 0;
    8285               1 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8286                 :   int arg2 ;
    8287               1 :   int *arg3 = (int *) 0 ;
    8288               1 :   int *arg4 = (int *) 0 ;
    8289               1 :   int *arg5 = (int *) 0 ;
    8290               1 :   int *arg6 = (int *) 0 ;
    8291               1 :   int *arg7 = (int *) 0 ;
    8292               1 :   int *arg8 = (int *) 0 ;
    8293               1 :   int *arg9 = (int *) 0 ;
    8294               1 :   void *argp1 = 0 ;
    8295               1 :   int res1 = 0 ;
    8296                 :   int val2 ;
    8297               1 :   int ecode2 = 0 ;
    8298                 :   int temp3 ;
    8299               1 :   int res3 = SWIG_TMPOBJ ;
    8300                 :   int temp4 ;
    8301               1 :   int res4 = SWIG_TMPOBJ ;
    8302                 :   int temp5 ;
    8303               1 :   int res5 = SWIG_TMPOBJ ;
    8304                 :   int temp6 ;
    8305               1 :   int res6 = SWIG_TMPOBJ ;
    8306                 :   int temp7 ;
    8307               1 :   int res7 = SWIG_TMPOBJ ;
    8308                 :   int temp8 ;
    8309               1 :   int res8 = SWIG_TMPOBJ ;
    8310                 :   int temp9 ;
    8311               1 :   int res9 = SWIG_TMPOBJ ;
    8312               1 :   PyObject * obj0 = 0 ;
    8313               1 :   PyObject * obj1 = 0 ;
    8314                 :   
    8315               1 :   arg3 = &temp3;
    8316               1 :   arg4 = &temp4;
    8317               1 :   arg5 = &temp5;
    8318               1 :   arg6 = &temp6;
    8319               1 :   arg7 = &temp7;
    8320               1 :   arg8 = &temp8;
    8321               1 :   arg9 = &temp9;
    8322               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDateTime",&obj0,&obj1)) SWIG_fail;
    8323               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8324               1 :   if (!SWIG_IsOK(res1)) {
    8325               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8326                 :   }
    8327               1 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8328               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    8329               1 :   if (!SWIG_IsOK(ecode2)) {
    8330               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDateTime" "', argument " "2"" of type '" "int""'");
    8331                 :   } 
    8332               1 :   arg2 = static_cast< int >(val2);
    8333                 :   {
    8334               1 :     if ( bUseExceptions ) {
    8335               0 :       CPLErrorReset();
    8336                 :     }
    8337                 :     OGRFeatureShadow_GetFieldAsDateTime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    8338               1 :     if ( bUseExceptions ) {
    8339               0 :       CPLErr eclass = CPLGetLastErrorType();
    8340               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8341               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8342                 :       }
    8343                 :     }
    8344                 :   }
    8345               1 :   resultobj = SWIG_Py_Void();
    8346               2 :   if (SWIG_IsTmpObj(res3)) {
    8347               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
    8348                 :   } else {
    8349               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    8350               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
    8351                 :   }
    8352               2 :   if (SWIG_IsTmpObj(res4)) {
    8353               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
    8354                 :   } else {
    8355               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    8356               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
    8357                 :   }
    8358               2 :   if (SWIG_IsTmpObj(res5)) {
    8359               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
    8360                 :   } else {
    8361               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    8362               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
    8363                 :   }
    8364               2 :   if (SWIG_IsTmpObj(res6)) {
    8365               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
    8366                 :   } else {
    8367               0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    8368               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
    8369                 :   }
    8370               2 :   if (SWIG_IsTmpObj(res7)) {
    8371               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
    8372                 :   } else {
    8373               0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    8374               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
    8375                 :   }
    8376               2 :   if (SWIG_IsTmpObj(res8)) {
    8377               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8)));
    8378                 :   } else {
    8379               0 :     int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    8380               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags));
    8381                 :   }
    8382               2 :   if (SWIG_IsTmpObj(res9)) {
    8383               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9)));
    8384                 :   } else {
    8385               0 :     int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    8386               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags));
    8387                 :   }
    8388               1 :   return resultobj;
    8389                 : fail:
    8390               0 :   return NULL;
    8391                 : }
    8392                 : 
    8393                 : 
    8394               3 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8395               3 :   PyObject *resultobj = 0;
    8396               3 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8397                 :   int arg2 ;
    8398               3 :   int *arg3 = (int *) 0 ;
    8399               3 :   int **arg4 = (int **) 0 ;
    8400               3 :   void *argp1 = 0 ;
    8401               3 :   int res1 = 0 ;
    8402                 :   int val2 ;
    8403               3 :   int ecode2 = 0 ;
    8404                 :   int nLen3 ;
    8405                 :   int *pList3 ;
    8406               3 :   PyObject * obj0 = 0 ;
    8407               3 :   PyObject * obj1 = 0 ;
    8408                 :   
    8409                 :   {
    8410                 :     /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
    8411               3 :     arg3 = &nLen3;
    8412               3 :     arg4 = &pList3;
    8413                 :   }
    8414               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsIntegerList",&obj0,&obj1)) SWIG_fail;
    8415               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8416               3 :   if (!SWIG_IsOK(res1)) {
    8417               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8418                 :   }
    8419               3 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8420               3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    8421               3 :   if (!SWIG_IsOK(ecode2)) {
    8422               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "2"" of type '" "int""'");
    8423                 :   } 
    8424               3 :   arg2 = static_cast< int >(val2);
    8425                 :   {
    8426               3 :     if ( bUseExceptions ) {
    8427               0 :       CPLErrorReset();
    8428                 :     }
    8429                 :     OGRFeatureShadow_GetFieldAsIntegerList(arg1,arg2,arg3,(int const **)arg4);
    8430               3 :     if ( bUseExceptions ) {
    8431               0 :       CPLErr eclass = CPLGetLastErrorType();
    8432               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8433               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8434                 :       }
    8435                 :     }
    8436                 :   }
    8437               3 :   resultobj = SWIG_Py_Void();
    8438                 :   {
    8439                 :     /* %typemap(argout) (int *nLen, const int **pList ) */
    8440               3 :     Py_DECREF(resultobj);
    8441               3 :     PyObject *out = PyList_New( *arg3 );
    8442              10 :     for( int i=0; i<*arg3; i++ ) {
    8443               7 :       PyObject *val = PyInt_FromLong( (*arg4)[i] );
    8444               7 :       PyList_SetItem( out, i, val );
    8445                 :     }
    8446               3 :     resultobj = out;
    8447                 :   }
    8448               3 :   return resultobj;
    8449                 : fail:
    8450               0 :   return NULL;
    8451                 : }
    8452                 : 
    8453                 : 
    8454              16 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8455              16 :   PyObject *resultobj = 0;
    8456              16 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8457                 :   int arg2 ;
    8458              16 :   int *arg3 = (int *) 0 ;
    8459              16 :   double **arg4 = (double **) 0 ;
    8460              16 :   void *argp1 = 0 ;
    8461              16 :   int res1 = 0 ;
    8462                 :   int val2 ;
    8463              16 :   int ecode2 = 0 ;
    8464                 :   int nLen3 ;
    8465                 :   double *pList3 ;
    8466              16 :   PyObject * obj0 = 0 ;
    8467              16 :   PyObject * obj1 = 0 ;
    8468                 :   
    8469                 :   {
    8470                 :     /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
    8471              16 :     arg3 = &nLen3;
    8472              16 :     arg4 = &pList3;
    8473                 :   }
    8474              16 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDoubleList",&obj0,&obj1)) SWIG_fail;
    8475              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8476              16 :   if (!SWIG_IsOK(res1)) {
    8477               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8478                 :   }
    8479              16 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8480              16 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    8481              16 :   if (!SWIG_IsOK(ecode2)) {
    8482               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "2"" of type '" "int""'");
    8483                 :   } 
    8484              16 :   arg2 = static_cast< int >(val2);
    8485                 :   {
    8486              16 :     if ( bUseExceptions ) {
    8487               0 :       CPLErrorReset();
    8488                 :     }
    8489                 :     OGRFeatureShadow_GetFieldAsDoubleList(arg1,arg2,arg3,(double const **)arg4);
    8490              16 :     if ( bUseExceptions ) {
    8491               0 :       CPLErr eclass = CPLGetLastErrorType();
    8492               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8493               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8494                 :       }
    8495                 :     }
    8496                 :   }
    8497              16 :   resultobj = SWIG_Py_Void();
    8498                 :   {
    8499                 :     /* %typemap(argout) (int *nLen, const double **pList ) */
    8500              16 :     Py_DECREF(resultobj);
    8501              16 :     PyObject *out = PyList_New( *arg3 );
    8502              49 :     for( int i=0; i<*arg3; i++ ) {
    8503              33 :       PyObject *val = PyFloat_FromDouble( (*arg4)[i] );
    8504              33 :       PyList_SetItem( out, i, val );
    8505                 :     }
    8506              16 :     resultobj = out;
    8507                 :   }
    8508              16 :   return resultobj;
    8509                 : fail:
    8510               0 :   return NULL;
    8511                 : }
    8512                 : 
    8513                 : 
    8514               3 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8515               3 :   PyObject *resultobj = 0;
    8516               3 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8517                 :   int arg2 ;
    8518               3 :   void *argp1 = 0 ;
    8519               3 :   int res1 = 0 ;
    8520                 :   int val2 ;
    8521               3 :   int ecode2 = 0 ;
    8522               3 :   PyObject * obj0 = 0 ;
    8523               3 :   PyObject * obj1 = 0 ;
    8524               3 :   char **result = 0 ;
    8525                 :   
    8526               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsStringList",&obj0,&obj1)) SWIG_fail;
    8527               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8528               3 :   if (!SWIG_IsOK(res1)) {
    8529               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8530                 :   }
    8531               3 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8532               3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    8533               3 :   if (!SWIG_IsOK(ecode2)) {
    8534               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsStringList" "', argument " "2"" of type '" "int""'");
    8535                 :   } 
    8536               3 :   arg2 = static_cast< int >(val2);
    8537                 :   {
    8538               3 :     if ( bUseExceptions ) {
    8539               0 :       CPLErrorReset();
    8540                 :     }
    8541               3 :     result = (char **)OGRFeatureShadow_GetFieldAsStringList(arg1,arg2);
    8542               3 :     if ( bUseExceptions ) {
    8543               0 :       CPLErr eclass = CPLGetLastErrorType();
    8544               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8545               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8546                 :       }
    8547                 :     }
    8548                 :   }
    8549                 :   {
    8550                 :     /* %typemap(out) char **options -> ( string ) */
    8551               3 :     char **stringarray = result;
    8552               3 :     if ( stringarray == NULL ) {
    8553               0 :       resultobj = Py_None;
    8554               0 :       Py_INCREF( resultobj );
    8555                 :     }
    8556                 :     else {
    8557               3 :       int len = CSLCount( stringarray );
    8558               3 :       resultobj = PyList_New( len );
    8559               9 :       for ( int i = 0; i < len; ++i ) {
    8560               6 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    8561               6 :         PyList_SetItem(resultobj, i, o );
    8562                 :       }
    8563                 :     }
    8564                 :   }
    8565               3 :   return resultobj;
    8566                 : fail:
    8567               0 :   return NULL;
    8568                 : }
    8569                 : 
    8570                 : 
    8571            4426 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8572            4426 :   PyObject *resultobj = 0;
    8573            4426 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8574                 :   int arg2 ;
    8575            4426 :   void *argp1 = 0 ;
    8576            4426 :   int res1 = 0 ;
    8577                 :   int val2 ;
    8578            4426 :   int ecode2 = 0 ;
    8579            4426 :   PyObject * obj0 = 0 ;
    8580            4426 :   PyObject * obj1 = 0 ;
    8581                 :   bool result;
    8582                 :   
    8583            4426 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldSet",&obj0,&obj1)) SWIG_fail;
    8584            4426 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8585            4426 :   if (!SWIG_IsOK(res1)) {
    8586               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8587                 :   }
    8588            4426 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8589            4426 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    8590            4426 :   if (!SWIG_IsOK(ecode2)) {
    8591               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "int""'");
    8592                 :   } 
    8593            4426 :   arg2 = static_cast< int >(val2);
    8594                 :   {
    8595            4426 :     if ( bUseExceptions ) {
    8596               0 :       CPLErrorReset();
    8597                 :     }
    8598            4426 :     result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
    8599            4426 :     if ( bUseExceptions ) {
    8600               0 :       CPLErr eclass = CPLGetLastErrorType();
    8601               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8602               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8603                 :       }
    8604                 :     }
    8605                 :   }
    8606            4426 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
    8607            4426 :   return resultobj;
    8608                 : fail:
    8609               0 :   return NULL;
    8610                 : }
    8611                 : 
    8612                 : 
    8613               8 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8614               8 :   PyObject *resultobj = 0;
    8615               8 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8616               8 :   char *arg2 = (char *) 0 ;
    8617               8 :   void *argp1 = 0 ;
    8618               8 :   int res1 = 0 ;
    8619                 :   int res2 ;
    8620               8 :   char *buf2 = 0 ;
    8621               8 :   int alloc2 = 0 ;
    8622               8 :   PyObject * obj0 = 0 ;
    8623               8 :   PyObject * obj1 = 0 ;
    8624                 :   bool result;
    8625                 :   
    8626               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldSet",&obj0,&obj1)) SWIG_fail;
    8627               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8628               8 :   if (!SWIG_IsOK(res1)) {
    8629               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8630                 :   }
    8631               8 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8632               8 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    8633               8 :   if (!SWIG_IsOK(res2)) {
    8634               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "char const *""'");
    8635                 :   }
    8636               8 :   arg2 = reinterpret_cast< char * >(buf2);
    8637                 :   {
    8638               8 :     if (!arg2) {
    8639               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8640                 :     }
    8641                 :   }
    8642                 :   {
    8643               8 :     if ( bUseExceptions ) {
    8644               0 :       CPLErrorReset();
    8645                 :     }
    8646               8 :     result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
    8647               8 :     if ( bUseExceptions ) {
    8648               0 :       CPLErr eclass = CPLGetLastErrorType();
    8649               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8650               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8651                 :       }
    8652                 :     }
    8653                 :   }
    8654               8 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
    8655               8 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8656               8 :   return resultobj;
    8657                 : fail:
    8658               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8659               0 :   return NULL;
    8660                 : }
    8661                 : 
    8662                 : 
    8663            4434 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet(PyObject *self, PyObject *args) {
    8664                 :   int argc;
    8665                 :   PyObject *argv[3];
    8666                 :   int ii;
    8667                 :   
    8668            4434 :   if (!PyTuple_Check(args)) SWIG_fail;
    8669            4434 :   argc = (int)PyObject_Length(args);
    8670           13302 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    8671            8868 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    8672                 :   }
    8673            4434 :   if (argc == 2) {
    8674                 :     int _v;
    8675            4434 :     void *vptr = 0;
    8676            4434 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    8677            4434 :     _v = SWIG_CheckState(res);
    8678            4434 :     if (_v) {
    8679                 :       {
    8680            4434 :         int res = SWIG_AsVal_int(argv[1], NULL);
    8681            4434 :         _v = SWIG_CheckState(res);
    8682                 :       }
    8683            4434 :       if (_v) {
    8684            4426 :         return _wrap_Feature_IsFieldSet__SWIG_0(self, args);
    8685                 :       }
    8686                 :     }
    8687                 :   }
    8688               8 :   if (argc == 2) {
    8689                 :     int _v;
    8690               8 :     void *vptr = 0;
    8691               8 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    8692               8 :     _v = SWIG_CheckState(res);
    8693               8 :     if (_v) {
    8694               8 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    8695               8 :       _v = SWIG_CheckState(res);
    8696               8 :       if (_v) {
    8697               8 :         return _wrap_Feature_IsFieldSet__SWIG_1(self, args);
    8698                 :       }
    8699                 :     }
    8700                 :   }
    8701                 :   
    8702                 : fail:
    8703                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_IsFieldSet'.\n"
    8704                 :     "  Possible C/C++ prototypes are:\n"
    8705                 :     "    IsFieldSet(OGRFeatureShadow *,int)\n"
    8706               0 :     "    IsFieldSet(OGRFeatureShadow *,char const *)\n");
    8707               0 :   return NULL;
    8708                 : }
    8709                 : 
    8710                 : 
    8711           20823 : SWIGINTERN PyObject *_wrap_Feature_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8712           20823 :   PyObject *resultobj = 0;
    8713           20823 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8714           20823 :   char *arg2 = (char *) 0 ;
    8715           20823 :   void *argp1 = 0 ;
    8716           20823 :   int res1 = 0 ;
    8717                 :   int res2 ;
    8718           20823 :   char *buf2 = 0 ;
    8719           20823 :   int alloc2 = 0 ;
    8720           20823 :   PyObject * obj0 = 0 ;
    8721           20823 :   PyObject * obj1 = 0 ;
    8722                 :   int result;
    8723                 :   
    8724           20823 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldIndex",&obj0,&obj1)) SWIG_fail;
    8725           20823 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8726           20823 :   if (!SWIG_IsOK(res1)) {
    8727           18680 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8728                 :   }
    8729            2143 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8730            2143 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    8731            2143 :   if (!SWIG_IsOK(res2)) {
    8732               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldIndex" "', argument " "2"" of type '" "char const *""'");
    8733                 :   }
    8734            2143 :   arg2 = reinterpret_cast< char * >(buf2);
    8735                 :   {
    8736            2143 :     if (!arg2) {
    8737               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8738                 :     }
    8739                 :   }
    8740                 :   {
    8741            2143 :     if ( bUseExceptions ) {
    8742               0 :       CPLErrorReset();
    8743                 :     }
    8744            2143 :     result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
    8745            2143 :     if ( bUseExceptions ) {
    8746               0 :       CPLErr eclass = CPLGetLastErrorType();
    8747               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8748               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8749                 :       }
    8750                 :     }
    8751                 :   }
    8752            2143 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8753            2143 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8754            2143 :   return resultobj;
    8755                 : fail:
    8756           18680 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8757           18680 :   return NULL;
    8758                 : }
    8759                 : 
    8760                 : 
    8761             216 : SWIGINTERN PyObject *_wrap_Feature_GetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8762             216 :   PyObject *resultobj = 0;
    8763             216 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8764             216 :   void *argp1 = 0 ;
    8765             216 :   int res1 = 0 ;
    8766             216 :   PyObject * obj0 = 0 ;
    8767                 :   int result;
    8768                 :   
    8769             216 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetFID",&obj0)) SWIG_fail;
    8770             216 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8771             216 :   if (!SWIG_IsOK(res1)) {
    8772               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8773                 :   }
    8774             216 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8775                 :   {
    8776             216 :     if ( bUseExceptions ) {
    8777               0 :       CPLErrorReset();
    8778                 :     }
    8779             216 :     result = (int)OGRFeatureShadow_GetFID(arg1);
    8780             216 :     if ( bUseExceptions ) {
    8781               0 :       CPLErr eclass = CPLGetLastErrorType();
    8782               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8783               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8784                 :       }
    8785                 :     }
    8786                 :   }
    8787             216 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8788             216 :   return resultobj;
    8789                 : fail:
    8790               0 :   return NULL;
    8791                 : }
    8792                 : 
    8793                 : 
    8794              39 : SWIGINTERN PyObject *_wrap_Feature_SetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8795              39 :   PyObject *resultobj = 0;
    8796              39 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8797                 :   int arg2 ;
    8798              39 :   void *argp1 = 0 ;
    8799              39 :   int res1 = 0 ;
    8800                 :   int val2 ;
    8801              39 :   int ecode2 = 0 ;
    8802              39 :   PyObject * obj0 = 0 ;
    8803              39 :   PyObject * obj1 = 0 ;
    8804                 :   OGRErr result;
    8805                 :   
    8806              39 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetFID",&obj0,&obj1)) SWIG_fail;
    8807              39 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8808              39 :   if (!SWIG_IsOK(res1)) {
    8809               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8810                 :   }
    8811              39 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8812              39 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    8813              39 :   if (!SWIG_IsOK(ecode2)) {
    8814               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFID" "', argument " "2"" of type '" "int""'");
    8815                 :   } 
    8816              39 :   arg2 = static_cast< int >(val2);
    8817                 :   {
    8818              39 :     if ( bUseExceptions ) {
    8819               0 :       CPLErrorReset();
    8820                 :     }
    8821              39 :     result = (OGRErr)OGRFeatureShadow_SetFID(arg1,arg2);
    8822              39 :     if ( bUseExceptions ) {
    8823               0 :       CPLErr eclass = CPLGetLastErrorType();
    8824               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8825               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8826                 :       }
    8827                 :     }
    8828                 :   }
    8829                 :   {
    8830                 :     /* %typemap(out) OGRErr */
    8831              39 :     if ( result != 0 && bUseExceptions) {
    8832               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
    8833               0 :       SWIG_fail;
    8834                 :     }
    8835                 :   }
    8836                 :   {
    8837                 :     /* %typemap(ret) OGRErr */
    8838              39 :     if (resultobj == Py_None ) {
    8839               0 :       Py_DECREF(resultobj);
    8840               0 :       resultobj = 0;
    8841                 :     }
    8842              39 :     if (resultobj == 0) {
    8843              39 :       resultobj = PyInt_FromLong( result );
    8844                 :     }
    8845                 :   }
    8846              39 :   return resultobj;
    8847                 : fail:
    8848               0 :   return NULL;
    8849                 : }
    8850                 : 
    8851                 : 
    8852               0 : SWIGINTERN PyObject *_wrap_Feature_DumpReadable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8853               0 :   PyObject *resultobj = 0;
    8854               0 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8855               0 :   void *argp1 = 0 ;
    8856               0 :   int res1 = 0 ;
    8857               0 :   PyObject * obj0 = 0 ;
    8858                 :   
    8859               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_DumpReadable",&obj0)) SWIG_fail;
    8860               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8861               0 :   if (!SWIG_IsOK(res1)) {
    8862               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_DumpReadable" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8863                 :   }
    8864               0 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8865                 :   {
    8866               0 :     if ( bUseExceptions ) {
    8867               0 :       CPLErrorReset();
    8868                 :     }
    8869                 :     OGRFeatureShadow_DumpReadable(arg1);
    8870               0 :     if ( bUseExceptions ) {
    8871               0 :       CPLErr eclass = CPLGetLastErrorType();
    8872               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8873               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8874                 :       }
    8875                 :     }
    8876                 :   }
    8877               0 :   resultobj = SWIG_Py_Void();
    8878               0 :   return resultobj;
    8879                 : fail:
    8880               0 :   return NULL;
    8881                 : }
    8882                 : 
    8883                 : 
    8884               0 : SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8885               0 :   PyObject *resultobj = 0;
    8886               0 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8887                 :   int arg2 ;
    8888               0 :   void *argp1 = 0 ;
    8889               0 :   int res1 = 0 ;
    8890                 :   int val2 ;
    8891               0 :   int ecode2 = 0 ;
    8892               0 :   PyObject * obj0 = 0 ;
    8893               0 :   PyObject * obj1 = 0 ;
    8894                 :   
    8895               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_UnsetField",&obj0,&obj1)) SWIG_fail;
    8896               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8897               0 :   if (!SWIG_IsOK(res1)) {
    8898               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8899                 :   }
    8900               0 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8901               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    8902               0 :   if (!SWIG_IsOK(ecode2)) {
    8903               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "int""'");
    8904                 :   } 
    8905               0 :   arg2 = static_cast< int >(val2);
    8906                 :   {
    8907               0 :     if ( bUseExceptions ) {
    8908               0 :       CPLErrorReset();
    8909                 :     }
    8910                 :     OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
    8911               0 :     if ( bUseExceptions ) {
    8912               0 :       CPLErr eclass = CPLGetLastErrorType();
    8913               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8914               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8915                 :       }
    8916                 :     }
    8917                 :   }
    8918               0 :   resultobj = SWIG_Py_Void();
    8919               0 :   return resultobj;
    8920                 : fail:
    8921               0 :   return NULL;
    8922                 : }
    8923                 : 
    8924                 : 
    8925               0 : SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8926               0 :   PyObject *resultobj = 0;
    8927               0 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    8928               0 :   char *arg2 = (char *) 0 ;
    8929               0 :   void *argp1 = 0 ;
    8930               0 :   int res1 = 0 ;
    8931                 :   int res2 ;
    8932               0 :   char *buf2 = 0 ;
    8933               0 :   int alloc2 = 0 ;
    8934               0 :   PyObject * obj0 = 0 ;
    8935               0 :   PyObject * obj1 = 0 ;
    8936                 :   
    8937               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_UnsetField",&obj0,&obj1)) SWIG_fail;
    8938               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    8939               0 :   if (!SWIG_IsOK(res1)) {
    8940               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    8941                 :   }
    8942               0 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    8943               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    8944               0 :   if (!SWIG_IsOK(res2)) {
    8945               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "char const *""'");
    8946                 :   }
    8947               0 :   arg2 = reinterpret_cast< char * >(buf2);
    8948                 :   {
    8949               0 :     if (!arg2) {
    8950               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8951                 :     }
    8952                 :   }
    8953                 :   {
    8954               0 :     if ( bUseExceptions ) {
    8955               0 :       CPLErrorReset();
    8956                 :     }
    8957                 :     OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
    8958               0 :     if ( bUseExceptions ) {
    8959               0 :       CPLErr eclass = CPLGetLastErrorType();
    8960               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8961               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8962                 :       }
    8963                 :     }
    8964                 :   }
    8965               0 :   resultobj = SWIG_Py_Void();
    8966               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8967               0 :   return resultobj;
    8968                 : fail:
    8969               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8970               0 :   return NULL;
    8971                 : }
    8972                 : 
    8973                 : 
    8974               0 : SWIGINTERN PyObject *_wrap_Feature_UnsetField(PyObject *self, PyObject *args) {
    8975                 :   int argc;
    8976                 :   PyObject *argv[3];
    8977                 :   int ii;
    8978                 :   
    8979               0 :   if (!PyTuple_Check(args)) SWIG_fail;
    8980               0 :   argc = (int)PyObject_Length(args);
    8981               0 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    8982               0 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    8983                 :   }
    8984               0 :   if (argc == 2) {
    8985                 :     int _v;
    8986               0 :     void *vptr = 0;
    8987               0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    8988               0 :     _v = SWIG_CheckState(res);
    8989               0 :     if (_v) {
    8990                 :       {
    8991               0 :         int res = SWIG_AsVal_int(argv[1], NULL);
    8992               0 :         _v = SWIG_CheckState(res);
    8993                 :       }
    8994               0 :       if (_v) {
    8995               0 :         return _wrap_Feature_UnsetField__SWIG_0(self, args);
    8996                 :       }
    8997                 :     }
    8998                 :   }
    8999               0 :   if (argc == 2) {
    9000                 :     int _v;
    9001               0 :     void *vptr = 0;
    9002               0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9003               0 :     _v = SWIG_CheckState(res);
    9004               0 :     if (_v) {
    9005               0 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    9006               0 :       _v = SWIG_CheckState(res);
    9007               0 :       if (_v) {
    9008               0 :         return _wrap_Feature_UnsetField__SWIG_1(self, args);
    9009                 :       }
    9010                 :     }
    9011                 :   }
    9012                 :   
    9013                 : fail:
    9014                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_UnsetField'.\n"
    9015                 :     "  Possible C/C++ prototypes are:\n"
    9016                 :     "    UnsetField(OGRFeatureShadow *,int)\n"
    9017               0 :     "    UnsetField(OGRFeatureShadow *,char const *)\n");
    9018               0 :   return NULL;
    9019                 : }
    9020                 : 
    9021                 : 
    9022            2751 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9023            2751 :   PyObject *resultobj = 0;
    9024            2751 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9025                 :   int arg2 ;
    9026            2751 :   char *arg3 = (char *) 0 ;
    9027            2751 :   void *argp1 = 0 ;
    9028            2751 :   int res1 = 0 ;
    9029                 :   int val2 ;
    9030            2751 :   int ecode2 = 0 ;
    9031            2751 :   PyObject *str3 = 0 ;
    9032            2751 :   int bToFree3 = 0 ;
    9033            2751 :   PyObject * obj0 = 0 ;
    9034            2751 :   PyObject * obj1 = 0 ;
    9035            2751 :   PyObject * obj2 = 0 ;
    9036                 :   
    9037            2751 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
    9038            2751 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9039            2751 :   if (!SWIG_IsOK(res1)) {
    9040               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9041                 :   }
    9042            2751 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9043            2751 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9044            2751 :   if (!SWIG_IsOK(ecode2)) {
    9045               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
    9046                 :   } 
    9047            2751 :   arg2 = static_cast< int >(val2);
    9048                 :   {
    9049                 :     /* %typemap(in) (tostring argin) */
    9050            2751 :     str3 = PyObject_Str( obj2 );
    9051            2751 :     if ( str3 == 0 ) {
    9052               0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
    9053               0 :       SWIG_fail;
    9054                 :     }
    9055                 :     
    9056            2751 :     arg3 = GDALPythonObjectToCStr(str3, &bToFree3); 
    9057                 :   }
    9058                 :   {
    9059            2751 :     if ( bUseExceptions ) {
    9060               0 :       CPLErrorReset();
    9061                 :     }
    9062                 :     OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
    9063            2751 :     if ( bUseExceptions ) {
    9064               0 :       CPLErr eclass = CPLGetLastErrorType();
    9065               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9066               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9067                 :       }
    9068                 :     }
    9069                 :   }
    9070            2751 :   resultobj = SWIG_Py_Void();
    9071                 :   {
    9072                 :     /* %typemap(freearg) (tostring argin) */
    9073            2751 :     if ( str3 != NULL)
    9074                 :     {
    9075            2751 :       Py_DECREF(str3);
    9076                 :     }
    9077            2751 :     GDALPythonFreeCStr(arg3, bToFree3);
    9078                 :   }
    9079            2751 :   return resultobj;
    9080                 : fail:
    9081                 :   {
    9082                 :     /* %typemap(freearg) (tostring argin) */
    9083               0 :     if ( str3 != NULL)
    9084                 :     {
    9085               0 :       Py_DECREF(str3);
    9086                 :     }
    9087               0 :     GDALPythonFreeCStr(arg3, bToFree3);
    9088                 :   }
    9089               0 :   return NULL;
    9090                 : }
    9091                 : 
    9092                 : 
    9093             302 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9094             302 :   PyObject *resultobj = 0;
    9095             302 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9096             302 :   char *arg2 = (char *) 0 ;
    9097             302 :   char *arg3 = (char *) 0 ;
    9098             302 :   void *argp1 = 0 ;
    9099             302 :   int res1 = 0 ;
    9100                 :   int res2 ;
    9101             302 :   char *buf2 = 0 ;
    9102             302 :   int alloc2 = 0 ;
    9103             302 :   PyObject *str3 = 0 ;
    9104             302 :   int bToFree3 = 0 ;
    9105             302 :   PyObject * obj0 = 0 ;
    9106             302 :   PyObject * obj1 = 0 ;
    9107             302 :   PyObject * obj2 = 0 ;
    9108                 :   
    9109             302 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
    9110             302 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9111             302 :   if (!SWIG_IsOK(res1)) {
    9112               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9113                 :   }
    9114             302 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9115             302 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9116             302 :   if (!SWIG_IsOK(res2)) {
    9117               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
    9118                 :   }
    9119             302 :   arg2 = reinterpret_cast< char * >(buf2);
    9120                 :   {
    9121                 :     /* %typemap(in) (tostring argin) */
    9122             302 :     str3 = PyObject_Str( obj2 );
    9123             302 :     if ( str3 == 0 ) {
    9124               0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
    9125               0 :       SWIG_fail;
    9126                 :     }
    9127                 :     
    9128             302 :     arg3 = GDALPythonObjectToCStr(str3, &bToFree3); 
    9129                 :   }
    9130                 :   {
    9131             302 :     if (!arg2) {
    9132               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9133                 :     }
    9134                 :   }
    9135                 :   {
    9136             302 :     if ( bUseExceptions ) {
    9137               0 :       CPLErrorReset();
    9138                 :     }
    9139                 :     OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
    9140             302 :     if ( bUseExceptions ) {
    9141               0 :       CPLErr eclass = CPLGetLastErrorType();
    9142               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9143               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9144                 :       }
    9145                 :     }
    9146                 :   }
    9147             302 :   resultobj = SWIG_Py_Void();
    9148             302 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9149                 :   {
    9150                 :     /* %typemap(freearg) (tostring argin) */
    9151             302 :     if ( str3 != NULL)
    9152                 :     {
    9153             302 :       Py_DECREF(str3);
    9154                 :     }
    9155             302 :     GDALPythonFreeCStr(arg3, bToFree3);
    9156                 :   }
    9157             302 :   return resultobj;
    9158                 : fail:
    9159               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9160                 :   {
    9161                 :     /* %typemap(freearg) (tostring argin) */
    9162               0 :     if ( str3 != NULL)
    9163                 :     {
    9164               0 :       Py_DECREF(str3);
    9165                 :     }
    9166               0 :     GDALPythonFreeCStr(arg3, bToFree3);
    9167                 :   }
    9168               0 :   return NULL;
    9169                 : }
    9170                 : 
    9171                 : 
    9172            8130 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9173            8130 :   PyObject *resultobj = 0;
    9174            8130 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9175                 :   int arg2 ;
    9176                 :   int arg3 ;
    9177            8130 :   void *argp1 = 0 ;
    9178            8130 :   int res1 = 0 ;
    9179                 :   int val2 ;
    9180            8130 :   int ecode2 = 0 ;
    9181                 :   int val3 ;
    9182            8130 :   int ecode3 = 0 ;
    9183            8130 :   PyObject * obj0 = 0 ;
    9184            8130 :   PyObject * obj1 = 0 ;
    9185            8130 :   PyObject * obj2 = 0 ;
    9186                 :   
    9187            8130 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
    9188            8130 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9189            8130 :   if (!SWIG_IsOK(res1)) {
    9190               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9191                 :   }
    9192            8130 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9193            8130 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9194            8130 :   if (!SWIG_IsOK(ecode2)) {
    9195               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
    9196                 :   } 
    9197            8130 :   arg2 = static_cast< int >(val2);
    9198            8130 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    9199            8130 :   if (!SWIG_IsOK(ecode3)) {
    9200               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
    9201                 :   } 
    9202            8130 :   arg3 = static_cast< int >(val3);
    9203                 :   {
    9204            8130 :     if ( bUseExceptions ) {
    9205               0 :       CPLErrorReset();
    9206                 :     }
    9207                 :     OGRFeatureShadow_SetField__SWIG_2(arg1,arg2,arg3);
    9208            8130 :     if ( bUseExceptions ) {
    9209               0 :       CPLErr eclass = CPLGetLastErrorType();
    9210               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9211               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9212                 :       }
    9213                 :     }
    9214                 :   }
    9215            8130 :   resultobj = SWIG_Py_Void();
    9216            8130 :   return resultobj;
    9217                 : fail:
    9218               0 :   return NULL;
    9219                 : }
    9220                 : 
    9221                 : 
    9222              69 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9223              69 :   PyObject *resultobj = 0;
    9224              69 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9225              69 :   char *arg2 = (char *) 0 ;
    9226                 :   int arg3 ;
    9227              69 :   void *argp1 = 0 ;
    9228              69 :   int res1 = 0 ;
    9229                 :   int res2 ;
    9230              69 :   char *buf2 = 0 ;
    9231              69 :   int alloc2 = 0 ;
    9232                 :   int val3 ;
    9233              69 :   int ecode3 = 0 ;
    9234              69 :   PyObject * obj0 = 0 ;
    9235              69 :   PyObject * obj1 = 0 ;
    9236              69 :   PyObject * obj2 = 0 ;
    9237                 :   
    9238              69 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
    9239              69 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9240              69 :   if (!SWIG_IsOK(res1)) {
    9241               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9242                 :   }
    9243              69 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9244              69 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9245              69 :   if (!SWIG_IsOK(res2)) {
    9246               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
    9247                 :   }
    9248              69 :   arg2 = reinterpret_cast< char * >(buf2);
    9249              69 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    9250              69 :   if (!SWIG_IsOK(ecode3)) {
    9251               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
    9252                 :   } 
    9253              69 :   arg3 = static_cast< int >(val3);
    9254                 :   {
    9255              69 :     if (!arg2) {
    9256               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9257                 :     }
    9258                 :   }
    9259                 :   {
    9260              69 :     if ( bUseExceptions ) {
    9261               0 :       CPLErrorReset();
    9262                 :     }
    9263                 :     OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
    9264              69 :     if ( bUseExceptions ) {
    9265               0 :       CPLErr eclass = CPLGetLastErrorType();
    9266               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9267               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9268                 :       }
    9269                 :     }
    9270                 :   }
    9271              69 :   resultobj = SWIG_Py_Void();
    9272              69 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9273              69 :   return resultobj;
    9274                 : fail:
    9275               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9276               0 :   return NULL;
    9277                 : }
    9278                 : 
    9279                 : 
    9280               9 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9281               9 :   PyObject *resultobj = 0;
    9282               9 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9283                 :   int arg2 ;
    9284                 :   double arg3 ;
    9285               9 :   void *argp1 = 0 ;
    9286               9 :   int res1 = 0 ;
    9287                 :   int val2 ;
    9288               9 :   int ecode2 = 0 ;
    9289                 :   double val3 ;
    9290               9 :   int ecode3 = 0 ;
    9291               9 :   PyObject * obj0 = 0 ;
    9292               9 :   PyObject * obj1 = 0 ;
    9293               9 :   PyObject * obj2 = 0 ;
    9294                 :   
    9295               9 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
    9296               9 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9297               9 :   if (!SWIG_IsOK(res1)) {
    9298               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9299                 :   }
    9300               9 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9301               9 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9302               9 :   if (!SWIG_IsOK(ecode2)) {
    9303               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
    9304                 :   } 
    9305               9 :   arg2 = static_cast< int >(val2);
    9306               9 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
    9307               9 :   if (!SWIG_IsOK(ecode3)) {
    9308               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
    9309                 :   } 
    9310               9 :   arg3 = static_cast< double >(val3);
    9311                 :   {
    9312               9 :     if ( bUseExceptions ) {
    9313               0 :       CPLErrorReset();
    9314                 :     }
    9315                 :     OGRFeatureShadow_SetField__SWIG_4(arg1,arg2,arg3);
    9316               9 :     if ( bUseExceptions ) {
    9317               0 :       CPLErr eclass = CPLGetLastErrorType();
    9318               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9319               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9320                 :       }
    9321                 :     }
    9322                 :   }
    9323               9 :   resultobj = SWIG_Py_Void();
    9324               9 :   return resultobj;
    9325                 : fail:
    9326               0 :   return NULL;
    9327                 : }
    9328                 : 
    9329                 : 
    9330              38 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9331              38 :   PyObject *resultobj = 0;
    9332              38 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9333              38 :   char *arg2 = (char *) 0 ;
    9334                 :   double arg3 ;
    9335              38 :   void *argp1 = 0 ;
    9336              38 :   int res1 = 0 ;
    9337                 :   int res2 ;
    9338              38 :   char *buf2 = 0 ;
    9339              38 :   int alloc2 = 0 ;
    9340                 :   double val3 ;
    9341              38 :   int ecode3 = 0 ;
    9342              38 :   PyObject * obj0 = 0 ;
    9343              38 :   PyObject * obj1 = 0 ;
    9344              38 :   PyObject * obj2 = 0 ;
    9345                 :   
    9346              38 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
    9347              38 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9348              38 :   if (!SWIG_IsOK(res1)) {
    9349               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9350                 :   }
    9351              38 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9352              38 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9353              38 :   if (!SWIG_IsOK(res2)) {
    9354               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
    9355                 :   }
    9356              38 :   arg2 = reinterpret_cast< char * >(buf2);
    9357              38 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
    9358              38 :   if (!SWIG_IsOK(ecode3)) {
    9359               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
    9360                 :   } 
    9361              38 :   arg3 = static_cast< double >(val3);
    9362                 :   {
    9363              38 :     if (!arg2) {
    9364               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9365                 :     }
    9366                 :   }
    9367                 :   {
    9368              38 :     if ( bUseExceptions ) {
    9369               0 :       CPLErrorReset();
    9370                 :     }
    9371                 :     OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3);
    9372              38 :     if ( bUseExceptions ) {
    9373               0 :       CPLErr eclass = CPLGetLastErrorType();
    9374               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9375               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9376                 :       }
    9377                 :     }
    9378                 :   }
    9379              38 :   resultobj = SWIG_Py_Void();
    9380              38 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9381              38 :   return resultobj;
    9382                 : fail:
    9383               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9384               0 :   return NULL;
    9385                 : }
    9386                 : 
    9387                 : 
    9388              24 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9389              24 :   PyObject *resultobj = 0;
    9390              24 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9391                 :   int arg2 ;
    9392                 :   int arg3 ;
    9393                 :   int arg4 ;
    9394                 :   int arg5 ;
    9395                 :   int arg6 ;
    9396                 :   int arg7 ;
    9397                 :   int arg8 ;
    9398                 :   int arg9 ;
    9399              24 :   void *argp1 = 0 ;
    9400              24 :   int res1 = 0 ;
    9401                 :   int val2 ;
    9402              24 :   int ecode2 = 0 ;
    9403                 :   int val3 ;
    9404              24 :   int ecode3 = 0 ;
    9405                 :   int val4 ;
    9406              24 :   int ecode4 = 0 ;
    9407                 :   int val5 ;
    9408              24 :   int ecode5 = 0 ;
    9409                 :   int val6 ;
    9410              24 :   int ecode6 = 0 ;
    9411                 :   int val7 ;
    9412              24 :   int ecode7 = 0 ;
    9413                 :   int val8 ;
    9414              24 :   int ecode8 = 0 ;
    9415                 :   int val9 ;
    9416              24 :   int ecode9 = 0 ;
    9417              24 :   PyObject * obj0 = 0 ;
    9418              24 :   PyObject * obj1 = 0 ;
    9419              24 :   PyObject * obj2 = 0 ;
    9420              24 :   PyObject * obj3 = 0 ;
    9421              24 :   PyObject * obj4 = 0 ;
    9422              24 :   PyObject * obj5 = 0 ;
    9423              24 :   PyObject * obj6 = 0 ;
    9424              24 :   PyObject * obj7 = 0 ;
    9425              24 :   PyObject * obj8 = 0 ;
    9426                 :   
    9427              24 :   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:Feature_SetField",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
    9428              24 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9429              24 :   if (!SWIG_IsOK(res1)) {
    9430               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9431                 :   }
    9432              24 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9433              24 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9434              24 :   if (!SWIG_IsOK(ecode2)) {
    9435               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
    9436                 :   } 
    9437              24 :   arg2 = static_cast< int >(val2);
    9438              24 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    9439              24 :   if (!SWIG_IsOK(ecode3)) {
    9440               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
    9441                 :   } 
    9442              24 :   arg3 = static_cast< int >(val3);
    9443              24 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
    9444              24 :   if (!SWIG_IsOK(ecode4)) {
    9445               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
    9446                 :   } 
    9447              24 :   arg4 = static_cast< int >(val4);
    9448              24 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
    9449              24 :   if (!SWIG_IsOK(ecode5)) {
    9450               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
    9451                 :   } 
    9452              24 :   arg5 = static_cast< int >(val5);
    9453              24 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
    9454              24 :   if (!SWIG_IsOK(ecode6)) {
    9455               0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
    9456                 :   } 
    9457              24 :   arg6 = static_cast< int >(val6);
    9458              24 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
    9459              24 :   if (!SWIG_IsOK(ecode7)) {
    9460               0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
    9461                 :   } 
    9462              24 :   arg7 = static_cast< int >(val7);
    9463              24 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
    9464              24 :   if (!SWIG_IsOK(ecode8)) {
    9465               0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "int""'");
    9466                 :   } 
    9467              24 :   arg8 = static_cast< int >(val8);
    9468              24 :   ecode9 = SWIG_AsVal_int(obj8, &val9);
    9469              24 :   if (!SWIG_IsOK(ecode9)) {
    9470               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
    9471                 :   } 
    9472              24 :   arg9 = static_cast< int >(val9);
    9473                 :   {
    9474              24 :     if ( bUseExceptions ) {
    9475               0 :       CPLErrorReset();
    9476                 :     }
    9477                 :     OGRFeatureShadow_SetField__SWIG_6(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    9478              24 :     if ( bUseExceptions ) {
    9479               0 :       CPLErr eclass = CPLGetLastErrorType();
    9480               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9481               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9482                 :       }
    9483                 :     }
    9484                 :   }
    9485              24 :   resultobj = SWIG_Py_Void();
    9486              24 :   return resultobj;
    9487                 : fail:
    9488               0 :   return NULL;
    9489                 : }
    9490                 : 
    9491                 : 
    9492               1 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9493               1 :   PyObject *resultobj = 0;
    9494               1 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9495               1 :   char *arg2 = (char *) 0 ;
    9496                 :   int arg3 ;
    9497                 :   int arg4 ;
    9498                 :   int arg5 ;
    9499                 :   int arg6 ;
    9500                 :   int arg7 ;
    9501                 :   int arg8 ;
    9502                 :   int arg9 ;
    9503               1 :   void *argp1 = 0 ;
    9504               1 :   int res1 = 0 ;
    9505                 :   int res2 ;
    9506               1 :   char *buf2 = 0 ;
    9507               1 :   int alloc2 = 0 ;
    9508                 :   int val3 ;
    9509               1 :   int ecode3 = 0 ;
    9510                 :   int val4 ;
    9511               1 :   int ecode4 = 0 ;
    9512                 :   int val5 ;
    9513               1 :   int ecode5 = 0 ;
    9514                 :   int val6 ;
    9515               1 :   int ecode6 = 0 ;
    9516                 :   int val7 ;
    9517               1 :   int ecode7 = 0 ;
    9518                 :   int val8 ;
    9519               1 :   int ecode8 = 0 ;
    9520                 :   int val9 ;
    9521               1 :   int ecode9 = 0 ;
    9522               1 :   PyObject * obj0 = 0 ;
    9523               1 :   PyObject * obj1 = 0 ;
    9524               1 :   PyObject * obj2 = 0 ;
    9525               1 :   PyObject * obj3 = 0 ;
    9526               1 :   PyObject * obj4 = 0 ;
    9527               1 :   PyObject * obj5 = 0 ;
    9528               1 :   PyObject * obj6 = 0 ;
    9529               1 :   PyObject * obj7 = 0 ;
    9530               1 :   PyObject * obj8 = 0 ;
    9531                 :   
    9532               1 :   if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:Feature_SetField",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
    9533               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9534               1 :   if (!SWIG_IsOK(res1)) {
    9535               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9536                 :   }
    9537               1 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9538               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9539               1 :   if (!SWIG_IsOK(res2)) {
    9540               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
    9541                 :   }
    9542               1 :   arg2 = reinterpret_cast< char * >(buf2);
    9543               1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    9544               1 :   if (!SWIG_IsOK(ecode3)) {
    9545               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
    9546                 :   } 
    9547               1 :   arg3 = static_cast< int >(val3);
    9548               1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
    9549               1 :   if (!SWIG_IsOK(ecode4)) {
    9550               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
    9551                 :   } 
    9552               1 :   arg4 = static_cast< int >(val4);
    9553               1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
    9554               1 :   if (!SWIG_IsOK(ecode5)) {
    9555               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
    9556                 :   } 
    9557               1 :   arg5 = static_cast< int >(val5);
    9558               1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
    9559               1 :   if (!SWIG_IsOK(ecode6)) {
    9560               0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
    9561                 :   } 
    9562               1 :   arg6 = static_cast< int >(val6);
    9563               1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
    9564               1 :   if (!SWIG_IsOK(ecode7)) {
    9565               0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
    9566                 :   } 
    9567               1 :   arg7 = static_cast< int >(val7);
    9568               1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
    9569               1 :   if (!SWIG_IsOK(ecode8)) {
    9570               0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "int""'");
    9571                 :   } 
    9572               1 :   arg8 = static_cast< int >(val8);
    9573               1 :   ecode9 = SWIG_AsVal_int(obj8, &val9);
    9574               1 :   if (!SWIG_IsOK(ecode9)) {
    9575               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
    9576                 :   } 
    9577               1 :   arg9 = static_cast< int >(val9);
    9578                 :   {
    9579               1 :     if (!arg2) {
    9580               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9581                 :     }
    9582                 :   }
    9583                 :   {
    9584               1 :     if ( bUseExceptions ) {
    9585               0 :       CPLErrorReset();
    9586                 :     }
    9587                 :     OGRFeatureShadow_SetField__SWIG_7(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    9588               1 :     if ( bUseExceptions ) {
    9589               0 :       CPLErr eclass = CPLGetLastErrorType();
    9590               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9591               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9592                 :       }
    9593                 :     }
    9594                 :   }
    9595               1 :   resultobj = SWIG_Py_Void();
    9596               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9597               1 :   return resultobj;
    9598                 : fail:
    9599               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9600               0 :   return NULL;
    9601                 : }
    9602                 : 
    9603                 : 
    9604           11324 : SWIGINTERN PyObject *_wrap_Feature_SetField(PyObject *self, PyObject *args) {
    9605                 :   int argc;
    9606                 :   PyObject *argv[10];
    9607                 :   int ii;
    9608                 :   
    9609           11324 :   if (!PyTuple_Check(args)) SWIG_fail;
    9610           11324 :   argc = (int)PyObject_Length(args);
    9611           45446 :   for (ii = 0; (ii < argc) && (ii < 9); ii++) {
    9612           34122 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    9613                 :   }
    9614           11324 :   if (argc == 3) {
    9615                 :     int _v;
    9616           11299 :     void *vptr = 0;
    9617           11299 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9618           11299 :     _v = SWIG_CheckState(res);
    9619           11299 :     if (_v) {
    9620                 :       {
    9621           11299 :         int res = SWIG_AsVal_int(argv[1], NULL);
    9622           11299 :         _v = SWIG_CheckState(res);
    9623                 :       }
    9624           11299 :       if (_v) {
    9625                 :         {
    9626           10890 :           int res = SWIG_AsVal_int(argv[2], NULL);
    9627           10890 :           _v = SWIG_CheckState(res);
    9628                 :         }
    9629           10890 :         if (_v) {
    9630            8130 :           return _wrap_Feature_SetField__SWIG_2(self, args);
    9631                 :         }
    9632                 :       }
    9633                 :     }
    9634                 :   }
    9635            3194 :   if (argc == 3) {
    9636                 :     int _v;
    9637            3169 :     void *vptr = 0;
    9638            3169 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9639            3169 :     _v = SWIG_CheckState(res);
    9640            3169 :     if (_v) {
    9641                 :       {
    9642            3169 :         int res = SWIG_AsVal_int(argv[1], NULL);
    9643            3169 :         _v = SWIG_CheckState(res);
    9644                 :       }
    9645            3169 :       if (_v) {
    9646                 :         {
    9647            2760 :           int res = SWIG_AsVal_double(argv[2], NULL);
    9648            2760 :           _v = SWIG_CheckState(res);
    9649                 :         }
    9650            2760 :         if (_v) {
    9651               9 :           return _wrap_Feature_SetField__SWIG_4(self, args);
    9652                 :         }
    9653                 :       }
    9654                 :     }
    9655                 :   }
    9656            3185 :   if (argc == 3) {
    9657                 :     int _v;
    9658            3160 :     void *vptr = 0;
    9659            3160 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9660            3160 :     _v = SWIG_CheckState(res);
    9661            3160 :     if (_v) {
    9662                 :       {
    9663            3160 :         int res = SWIG_AsVal_int(argv[1], NULL);
    9664            3160 :         _v = SWIG_CheckState(res);
    9665                 :       }
    9666            3160 :       if (_v) {
    9667            2751 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
    9668            2751 :         _v = SWIG_CheckState(res);
    9669            2751 :         if (_v) {
    9670            2751 :           return _wrap_Feature_SetField__SWIG_0(self, args);
    9671                 :         }
    9672                 :       }
    9673                 :     }
    9674                 :   }
    9675             434 :   if (argc == 3) {
    9676                 :     int _v;
    9677             409 :     void *vptr = 0;
    9678             409 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9679             409 :     _v = SWIG_CheckState(res);
    9680             409 :     if (_v) {
    9681             409 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    9682             409 :       _v = SWIG_CheckState(res);
    9683             409 :       if (_v) {
    9684                 :         {
    9685             409 :           int res = SWIG_AsVal_int(argv[2], NULL);
    9686             409 :           _v = SWIG_CheckState(res);
    9687                 :         }
    9688             409 :         if (_v) {
    9689              69 :           return _wrap_Feature_SetField__SWIG_3(self, args);
    9690                 :         }
    9691                 :       }
    9692                 :     }
    9693                 :   }
    9694             365 :   if (argc == 3) {
    9695                 :     int _v;
    9696             340 :     void *vptr = 0;
    9697             340 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9698             340 :     _v = SWIG_CheckState(res);
    9699             340 :     if (_v) {
    9700             340 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    9701             340 :       _v = SWIG_CheckState(res);
    9702             340 :       if (_v) {
    9703                 :         {
    9704             340 :           int res = SWIG_AsVal_double(argv[2], NULL);
    9705             340 :           _v = SWIG_CheckState(res);
    9706                 :         }
    9707             340 :         if (_v) {
    9708              38 :           return _wrap_Feature_SetField__SWIG_5(self, args);
    9709                 :         }
    9710                 :       }
    9711                 :     }
    9712                 :   }
    9713             327 :   if (argc == 3) {
    9714                 :     int _v;
    9715             302 :     void *vptr = 0;
    9716             302 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9717             302 :     _v = SWIG_CheckState(res);
    9718             302 :     if (_v) {
    9719             302 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    9720             302 :       _v = SWIG_CheckState(res);
    9721             302 :       if (_v) {
    9722             302 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
    9723             302 :         _v = SWIG_CheckState(res);
    9724             302 :         if (_v) {
    9725             302 :           return _wrap_Feature_SetField__SWIG_1(self, args);
    9726                 :         }
    9727                 :       }
    9728                 :     }
    9729                 :   }
    9730              25 :   if (argc == 9) {
    9731                 :     int _v;
    9732              25 :     void *vptr = 0;
    9733              25 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9734              25 :     _v = SWIG_CheckState(res);
    9735              25 :     if (_v) {
    9736                 :       {
    9737              25 :         int res = SWIG_AsVal_int(argv[1], NULL);
    9738              25 :         _v = SWIG_CheckState(res);
    9739                 :       }
    9740              25 :       if (_v) {
    9741                 :         {
    9742              24 :           int res = SWIG_AsVal_int(argv[2], NULL);
    9743              24 :           _v = SWIG_CheckState(res);
    9744                 :         }
    9745              24 :         if (_v) {
    9746                 :           {
    9747              24 :             int res = SWIG_AsVal_int(argv[3], NULL);
    9748              24 :             _v = SWIG_CheckState(res);
    9749                 :           }
    9750              24 :           if (_v) {
    9751                 :             {
    9752              24 :               int res = SWIG_AsVal_int(argv[4], NULL);
    9753              24 :               _v = SWIG_CheckState(res);
    9754                 :             }
    9755              24 :             if (_v) {
    9756                 :               {
    9757              24 :                 int res = SWIG_AsVal_int(argv[5], NULL);
    9758              24 :                 _v = SWIG_CheckState(res);
    9759                 :               }
    9760              24 :               if (_v) {
    9761                 :                 {
    9762              24 :                   int res = SWIG_AsVal_int(argv[6], NULL);
    9763              24 :                   _v = SWIG_CheckState(res);
    9764                 :                 }
    9765              24 :                 if (_v) {
    9766                 :                   {
    9767              24 :                     int res = SWIG_AsVal_int(argv[7], NULL);
    9768              24 :                     _v = SWIG_CheckState(res);
    9769                 :                   }
    9770              24 :                   if (_v) {
    9771                 :                     {
    9772              24 :                       int res = SWIG_AsVal_int(argv[8], NULL);
    9773              24 :                       _v = SWIG_CheckState(res);
    9774                 :                     }
    9775              24 :                     if (_v) {
    9776              24 :                       return _wrap_Feature_SetField__SWIG_6(self, args);
    9777                 :                     }
    9778                 :                   }
    9779                 :                 }
    9780                 :               }
    9781                 :             }
    9782                 :           }
    9783                 :         }
    9784                 :       }
    9785                 :     }
    9786                 :   }
    9787               1 :   if (argc == 9) {
    9788                 :     int _v;
    9789               1 :     void *vptr = 0;
    9790               1 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    9791               1 :     _v = SWIG_CheckState(res);
    9792               1 :     if (_v) {
    9793               1 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    9794               1 :       _v = SWIG_CheckState(res);
    9795               1 :       if (_v) {
    9796                 :         {
    9797               1 :           int res = SWIG_AsVal_int(argv[2], NULL);
    9798               1 :           _v = SWIG_CheckState(res);
    9799                 :         }
    9800               1 :         if (_v) {
    9801                 :           {
    9802               1 :             int res = SWIG_AsVal_int(argv[3], NULL);
    9803               1 :             _v = SWIG_CheckState(res);
    9804                 :           }
    9805               1 :           if (_v) {
    9806                 :             {
    9807               1 :               int res = SWIG_AsVal_int(argv[4], NULL);
    9808               1 :               _v = SWIG_CheckState(res);
    9809                 :             }
    9810               1 :             if (_v) {
    9811                 :               {
    9812               1 :                 int res = SWIG_AsVal_int(argv[5], NULL);
    9813               1 :                 _v = SWIG_CheckState(res);
    9814                 :               }
    9815               1 :               if (_v) {
    9816                 :                 {
    9817               1 :                   int res = SWIG_AsVal_int(argv[6], NULL);
    9818               1 :                   _v = SWIG_CheckState(res);
    9819                 :                 }
    9820               1 :                 if (_v) {
    9821                 :                   {
    9822               1 :                     int res = SWIG_AsVal_int(argv[7], NULL);
    9823               1 :                     _v = SWIG_CheckState(res);
    9824                 :                   }
    9825               1 :                   if (_v) {
    9826                 :                     {
    9827               1 :                       int res = SWIG_AsVal_int(argv[8], NULL);
    9828               1 :                       _v = SWIG_CheckState(res);
    9829                 :                     }
    9830               1 :                     if (_v) {
    9831               1 :                       return _wrap_Feature_SetField__SWIG_7(self, args);
    9832                 :                     }
    9833                 :                   }
    9834                 :                 }
    9835                 :               }
    9836                 :             }
    9837                 :           }
    9838                 :         }
    9839                 :       }
    9840                 :     }
    9841                 :   }
    9842                 :   
    9843                 : fail:
    9844                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_SetField'.\n"
    9845                 :     "  Possible C/C++ prototypes are:\n"
    9846                 :     "    SetField(OGRFeatureShadow *,int,char const *)\n"
    9847                 :     "    SetField(OGRFeatureShadow *,char const *,char const *)\n"
    9848                 :     "    SetField(OGRFeatureShadow *,int,int)\n"
    9849                 :     "    SetField(OGRFeatureShadow *,char const *,int)\n"
    9850                 :     "    SetField(OGRFeatureShadow *,int,double)\n"
    9851                 :     "    SetField(OGRFeatureShadow *,char const *,double)\n"
    9852                 :     "    SetField(OGRFeatureShadow *,int,int,int,int,int,int,int,int)\n"
    9853               0 :     "    SetField(OGRFeatureShadow *,char const *,int,int,int,int,int,int,int)\n");
    9854               0 :   return NULL;
    9855                 : }
    9856                 : 
    9857                 : 
    9858               6 : SWIGINTERN PyObject *_wrap_Feature_SetFieldIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9859               6 :   PyObject *resultobj = 0;
    9860               6 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9861                 :   int arg2 ;
    9862                 :   int arg3 ;
    9863               6 :   int *arg4 = (int *) 0 ;
    9864               6 :   void *argp1 = 0 ;
    9865               6 :   int res1 = 0 ;
    9866                 :   int val2 ;
    9867               6 :   int ecode2 = 0 ;
    9868               6 :   PyObject * obj0 = 0 ;
    9869               6 :   PyObject * obj1 = 0 ;
    9870               6 :   PyObject * obj2 = 0 ;
    9871                 :   
    9872               6 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldIntegerList",&obj0,&obj1,&obj2)) SWIG_fail;
    9873               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9874               6 :   if (!SWIG_IsOK(res1)) {
    9875               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9876                 :   }
    9877               6 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9878               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9879               6 :   if (!SWIG_IsOK(ecode2)) {
    9880               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldIntegerList" "', argument " "2"" of type '" "int""'");
    9881                 :   } 
    9882               6 :   arg2 = static_cast< int >(val2);
    9883                 :   {
    9884                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    9885                 :     /* check if is List */
    9886               6 :     if ( !PySequence_Check(obj2) ) {
    9887               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    9888               0 :       SWIG_fail;
    9889                 :     }
    9890               6 :     arg3 = PySequence_Size(obj2);
    9891               6 :     arg4 = (int*) malloc(arg3*sizeof(int));
    9892              17 :     for( int i = 0; i<arg3; i++ ) {
    9893              11 :       PyObject *o = PySequence_GetItem(obj2,i);
    9894              11 :       if ( !PyArg_Parse(o,"i",&arg4[i]) ) {
    9895               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    9896               0 :         Py_DECREF(o);
    9897                 :         SWIG_fail;
    9898                 :       }
    9899              11 :       Py_DECREF(o);
    9900                 :     }
    9901                 :   }
    9902                 :   {
    9903               6 :     if ( bUseExceptions ) {
    9904               0 :       CPLErrorReset();
    9905                 :     }
    9906                 :     OGRFeatureShadow_SetFieldIntegerList(arg1,arg2,arg3,arg4);
    9907               6 :     if ( bUseExceptions ) {
    9908               0 :       CPLErr eclass = CPLGetLastErrorType();
    9909               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9910               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9911                 :       }
    9912                 :     }
    9913                 :   }
    9914               6 :   resultobj = SWIG_Py_Void();
    9915                 :   {
    9916                 :     /* %typemap(freearg) (int nList, int* pList) */
    9917               6 :     if (arg4) {
    9918               6 :       free((void*) arg4);
    9919                 :     }
    9920                 :   }
    9921               6 :   return resultobj;
    9922                 : fail:
    9923                 :   {
    9924                 :     /* %typemap(freearg) (int nList, int* pList) */
    9925               0 :     if (arg4) {
    9926               0 :       free((void*) arg4);
    9927                 :     }
    9928                 :   }
    9929               0 :   return NULL;
    9930                 : }
    9931                 : 
    9932                 : 
    9933              29 : SWIGINTERN PyObject *_wrap_Feature_SetFieldDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9934              29 :   PyObject *resultobj = 0;
    9935              29 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    9936                 :   int arg2 ;
    9937                 :   int arg3 ;
    9938              29 :   double *arg4 = (double *) 0 ;
    9939              29 :   void *argp1 = 0 ;
    9940              29 :   int res1 = 0 ;
    9941                 :   int val2 ;
    9942              29 :   int ecode2 = 0 ;
    9943              29 :   PyObject * obj0 = 0 ;
    9944              29 :   PyObject * obj1 = 0 ;
    9945              29 :   PyObject * obj2 = 0 ;
    9946                 :   
    9947              29 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldDoubleList",&obj0,&obj1,&obj2)) SWIG_fail;
    9948              29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
    9949              29 :   if (!SWIG_IsOK(res1)) {
    9950               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
    9951                 :   }
    9952              29 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
    9953              29 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    9954              29 :   if (!SWIG_IsOK(ecode2)) {
    9955               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldDoubleList" "', argument " "2"" of type '" "int""'");
    9956                 :   } 
    9957              29 :   arg2 = static_cast< int >(val2);
    9958                 :   {
    9959                 :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
    9960                 :     /* check if is List */
    9961              29 :     if ( !PySequence_Check(obj2) ) {
    9962               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    9963               0 :       SWIG_fail;
    9964                 :     }
    9965              29 :     arg3 = PySequence_Size(obj2);
    9966              29 :     arg4 = (double*) malloc(arg3*sizeof(double));
    9967              87 :     for( int i = 0; i<arg3; i++ ) {
    9968              58 :       PyObject *o = PySequence_GetItem(obj2,i);
    9969              58 :       if ( !PyArg_Parse(o,"d",&arg4[i]) ) {
    9970               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
    9971               0 :         Py_DECREF(o);
    9972                 :         SWIG_fail;
    9973                 :       }
    9974              58 :       Py_DECREF(o);
    9975                 :     }
    9976                 :   }
    9977                 :   {
    9978              29 :     if ( bUseExceptions ) {
    9979               0 :       CPLErrorReset();
    9980                 :     }
    9981                 :     OGRFeatureShadow_SetFieldDoubleList(arg1,arg2,arg3,arg4);
    9982              29 :     if ( bUseExceptions ) {
    9983               0 :       CPLErr eclass = CPLGetLastErrorType();
    9984               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9985               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9986                 :       }
    9987                 :     }
    9988                 :   }
    9989              29 :   resultobj = SWIG_Py_Void();
    9990                 :   {
    9991                 :     /* %typemap(freearg) (int nList, double* pList) */
    9992              29 :     if (arg4) {
    9993              29 :       free((void*) arg4);
    9994                 :     }
    9995                 :   }
    9996              29 :   return resultobj;
    9997                 : fail:
    9998                 :   {
    9999                 :     /* %typemap(freearg) (int nList, double* pList) */
   10000               0 :     if (arg4) {
   10001               0 :       free((void*) arg4);
   10002                 :     }
   10003                 :   }
   10004               0 :   return NULL;
   10005                 : }
   10006                 : 
   10007                 : 
   10008              14 : SWIGINTERN PyObject *_wrap_Feature_SetFieldStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10009              14 :   PyObject *resultobj = 0;
   10010              14 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10011                 :   int arg2 ;
   10012              14 :   char **arg3 = (char **) 0 ;
   10013              14 :   void *argp1 = 0 ;
   10014              14 :   int res1 = 0 ;
   10015                 :   int val2 ;
   10016              14 :   int ecode2 = 0 ;
   10017              14 :   PyObject * obj0 = 0 ;
   10018              14 :   PyObject * obj1 = 0 ;
   10019              14 :   PyObject * obj2 = 0 ;
   10020                 :   
   10021              14 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldStringList",&obj0,&obj1,&obj2)) SWIG_fail;
   10022              14 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10023              14 :   if (!SWIG_IsOK(res1)) {
   10024               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10025                 :   }
   10026              14 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10027              14 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   10028              14 :   if (!SWIG_IsOK(ecode2)) {
   10029               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldStringList" "', argument " "2"" of type '" "int""'");
   10030                 :   } 
   10031              14 :   arg2 = static_cast< int >(val2);
   10032                 :   {
   10033                 :     /* %typemap(in) char **options */
   10034                 :     /* Check if is a list */
   10035              14 :     if ( ! PySequence_Check(obj2)) {
   10036               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   10037               0 :       SWIG_fail;
   10038                 :     }
   10039                 :     
   10040              14 :     int size = PySequence_Size(obj2);
   10041              43 :     for (int i = 0; i < size; i++) {
   10042              29 :       PyObject* pyObj = PySequence_GetItem(obj2,i);
   10043              29 :       if (PyUnicode_Check(pyObj))
   10044                 :       {
   10045                 :         char *pszStr;
   10046                 :         Py_ssize_t nLen;
   10047               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   10048                 : #if PY_VERSION_HEX >= 0x03000000
   10049                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   10050                 : #else
   10051               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   10052                 : #endif
   10053               0 :         arg3 = CSLAddString( arg3, pszStr );
   10054               0 :         Py_XDECREF(pyUTF8Str);
   10055                 :       }
   10056                 : #if PY_VERSION_HEX >= 0x03000000
   10057                 :       else if (PyBytes_Check(pyObj))
   10058                 :       arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
   10059                 : #else
   10060              29 :       else if (PyString_Check(pyObj))
   10061              29 :       arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
   10062                 : #endif
   10063                 :       else
   10064                 :       {
   10065               0 :         Py_DECREF(pyObj);
   10066               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   10067               0 :         SWIG_fail;
   10068                 :       }
   10069              29 :       Py_DECREF(pyObj);
   10070                 :     }
   10071                 :   }
   10072                 :   {
   10073              14 :     if ( bUseExceptions ) {
   10074               0 :       CPLErrorReset();
   10075                 :     }
   10076                 :     OGRFeatureShadow_SetFieldStringList(arg1,arg2,arg3);
   10077              14 :     if ( bUseExceptions ) {
   10078               0 :       CPLErr eclass = CPLGetLastErrorType();
   10079               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10080               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10081                 :       }
   10082                 :     }
   10083                 :   }
   10084              14 :   resultobj = SWIG_Py_Void();
   10085                 :   {
   10086                 :     /* %typemap(freearg) char **options */
   10087              14 :     CSLDestroy( arg3 );
   10088                 :   }
   10089              14 :   return resultobj;
   10090                 : fail:
   10091                 :   {
   10092                 :     /* %typemap(freearg) char **options */
   10093               0 :     CSLDestroy( arg3 );
   10094                 :   }
   10095               0 :   return NULL;
   10096                 : }
   10097                 : 
   10098                 : 
   10099             227 : SWIGINTERN PyObject *_wrap_Feature_SetFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   10100             227 :   PyObject *resultobj = 0;
   10101             227 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10102             227 :   OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
   10103             227 :   int arg3 = (int) 1 ;
   10104             227 :   void *argp1 = 0 ;
   10105             227 :   int res1 = 0 ;
   10106             227 :   void *argp2 = 0 ;
   10107             227 :   int res2 = 0 ;
   10108                 :   int val3 ;
   10109             227 :   int ecode3 = 0 ;
   10110             227 :   PyObject * obj0 = 0 ;
   10111             227 :   PyObject * obj1 = 0 ;
   10112             227 :   PyObject * obj2 = 0 ;
   10113                 :   char *  kwnames[] = {
   10114                 :     (char *) "self",(char *) "other",(char *) "forgiving", NULL 
   10115             227 :   };
   10116                 :   OGRErr result;
   10117                 :   
   10118             227 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Feature_SetFrom",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   10119             227 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10120             227 :   if (!SWIG_IsOK(res1)) {
   10121               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFrom" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10122                 :   }
   10123             227 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10124             227 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10125             227 :   if (!SWIG_IsOK(res2)) {
   10126               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFrom" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
   10127                 :   }
   10128             227 :   arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
   10129             227 :   if (obj2) {
   10130               0 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   10131               0 :     if (!SWIG_IsOK(ecode3)) {
   10132               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFrom" "', argument " "3"" of type '" "int""'");
   10133                 :     } 
   10134               0 :     arg3 = static_cast< int >(val3);
   10135                 :   }
   10136                 :   {
   10137             227 :     if (!arg2) {
   10138               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10139                 :     }
   10140                 :   }
   10141                 :   {
   10142             227 :     if ( bUseExceptions ) {
   10143               0 :       CPLErrorReset();
   10144                 :     }
   10145             227 :     result = (OGRErr)OGRFeatureShadow_SetFrom(arg1,arg2,arg3);
   10146             227 :     if ( bUseExceptions ) {
   10147               0 :       CPLErr eclass = CPLGetLastErrorType();
   10148               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10149               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10150                 :       }
   10151                 :     }
   10152                 :   }
   10153                 :   {
   10154                 :     /* %typemap(out) OGRErr */
   10155             227 :     if ( result != 0 && bUseExceptions) {
   10156               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   10157               0 :       SWIG_fail;
   10158                 :     }
   10159                 :   }
   10160                 :   {
   10161                 :     /* %typemap(ret) OGRErr */
   10162             227 :     if (resultobj == Py_None ) {
   10163               0 :       Py_DECREF(resultobj);
   10164               0 :       resultobj = 0;
   10165                 :     }
   10166             227 :     if (resultobj == 0) {
   10167             227 :       resultobj = PyInt_FromLong( result );
   10168                 :     }
   10169                 :   }
   10170             227 :   return resultobj;
   10171                 : fail:
   10172               0 :   return NULL;
   10173                 : }
   10174                 : 
   10175                 : 
   10176             361 : SWIGINTERN PyObject *_wrap_Feature_SetFromWithMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10177             361 :   PyObject *resultobj = 0;
   10178             361 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10179             361 :   OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
   10180                 :   int arg3 ;
   10181                 :   int arg4 ;
   10182             361 :   int *arg5 = (int *) 0 ;
   10183             361 :   void *argp1 = 0 ;
   10184             361 :   int res1 = 0 ;
   10185             361 :   void *argp2 = 0 ;
   10186             361 :   int res2 = 0 ;
   10187                 :   int val3 ;
   10188             361 :   int ecode3 = 0 ;
   10189             361 :   PyObject * obj0 = 0 ;
   10190             361 :   PyObject * obj1 = 0 ;
   10191             361 :   PyObject * obj2 = 0 ;
   10192             361 :   PyObject * obj3 = 0 ;
   10193                 :   OGRErr result;
   10194                 :   
   10195             361 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:Feature_SetFromWithMap",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   10196             361 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10197             361 :   if (!SWIG_IsOK(res1)) {
   10198               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFromWithMap" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10199                 :   }
   10200             361 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10201             361 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10202             361 :   if (!SWIG_IsOK(res2)) {
   10203               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFromWithMap" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
   10204                 :   }
   10205             361 :   arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
   10206             361 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   10207             361 :   if (!SWIG_IsOK(ecode3)) {
   10208               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFromWithMap" "', argument " "3"" of type '" "int""'");
   10209                 :   } 
   10210             361 :   arg3 = static_cast< int >(val3);
   10211                 :   {
   10212                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   10213                 :     /* check if is List */
   10214             361 :     if ( !PySequence_Check(obj3) ) {
   10215               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   10216               0 :       SWIG_fail;
   10217                 :     }
   10218             361 :     arg4 = PySequence_Size(obj3);
   10219             361 :     arg5 = (int*) malloc(arg4*sizeof(int));
   10220            1423 :     for( int i = 0; i<arg4; i++ ) {
   10221            1062 :       PyObject *o = PySequence_GetItem(obj3,i);
   10222            1062 :       if ( !PyArg_Parse(o,"i",&arg5[i]) ) {
   10223               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
   10224               0 :         Py_DECREF(o);
   10225                 :         SWIG_fail;
   10226                 :       }
   10227            1062 :       Py_DECREF(o);
   10228                 :     }
   10229                 :   }
   10230                 :   {
   10231             361 :     if (!arg2) {
   10232               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10233                 :     }
   10234                 :   }
   10235                 :   {
   10236             361 :     if ( bUseExceptions ) {
   10237               0 :       CPLErrorReset();
   10238                 :     }
   10239             361 :     result = (OGRErr)OGRFeatureShadow_SetFromWithMap(arg1,arg2,arg3,arg4,arg5);
   10240             361 :     if ( bUseExceptions ) {
   10241               0 :       CPLErr eclass = CPLGetLastErrorType();
   10242               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10243               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10244                 :       }
   10245                 :     }
   10246                 :   }
   10247                 :   {
   10248                 :     /* %typemap(out) OGRErr */
   10249             361 :     if ( result != 0 && bUseExceptions) {
   10250               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   10251               0 :       SWIG_fail;
   10252                 :     }
   10253                 :   }
   10254                 :   {
   10255                 :     /* %typemap(freearg) (int nList, int* pList) */
   10256             361 :     if (arg5) {
   10257             361 :       free((void*) arg5);
   10258                 :     }
   10259                 :   }
   10260                 :   {
   10261                 :     /* %typemap(ret) OGRErr */
   10262             361 :     if (resultobj == Py_None ) {
   10263               0 :       Py_DECREF(resultobj);
   10264               0 :       resultobj = 0;
   10265                 :     }
   10266             361 :     if (resultobj == 0) {
   10267             361 :       resultobj = PyInt_FromLong( result );
   10268                 :     }
   10269                 :   }
   10270             361 :   return resultobj;
   10271                 : fail:
   10272                 :   {
   10273                 :     /* %typemap(freearg) (int nList, int* pList) */
   10274               0 :     if (arg5) {
   10275               0 :       free((void*) arg5);
   10276                 :     }
   10277                 :   }
   10278               0 :   return NULL;
   10279                 : }
   10280                 : 
   10281                 : 
   10282              78 : SWIGINTERN PyObject *_wrap_Feature_GetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10283              78 :   PyObject *resultobj = 0;
   10284              78 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10285              78 :   void *argp1 = 0 ;
   10286              78 :   int res1 = 0 ;
   10287              78 :   PyObject * obj0 = 0 ;
   10288              78 :   char *result = 0 ;
   10289                 :   
   10290              78 :   if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetStyleString",&obj0)) SWIG_fail;
   10291              78 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10292              78 :   if (!SWIG_IsOK(res1)) {
   10293               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10294                 :   }
   10295              78 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10296                 :   {
   10297              78 :     if ( bUseExceptions ) {
   10298               0 :       CPLErrorReset();
   10299                 :     }
   10300              78 :     result = (char *)OGRFeatureShadow_GetStyleString(arg1);
   10301              78 :     if ( bUseExceptions ) {
   10302               0 :       CPLErr eclass = CPLGetLastErrorType();
   10303               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10304               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10305                 :       }
   10306                 :     }
   10307                 :   }
   10308              78 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10309              78 :   return resultobj;
   10310                 : fail:
   10311               0 :   return NULL;
   10312                 : }
   10313                 : 
   10314                 : 
   10315               3 : SWIGINTERN PyObject *_wrap_Feature_SetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10316               3 :   PyObject *resultobj = 0;
   10317               3 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10318               3 :   char *arg2 = (char *) 0 ;
   10319               3 :   void *argp1 = 0 ;
   10320               3 :   int res1 = 0 ;
   10321                 :   int res2 ;
   10322               3 :   char *buf2 = 0 ;
   10323               3 :   int alloc2 = 0 ;
   10324               3 :   PyObject * obj0 = 0 ;
   10325               3 :   PyObject * obj1 = 0 ;
   10326                 :   
   10327               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetStyleString",&obj0,&obj1)) SWIG_fail;
   10328               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10329               3 :   if (!SWIG_IsOK(res1)) {
   10330               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10331                 :   }
   10332               3 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10333               3 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10334               3 :   if (!SWIG_IsOK(res2)) {
   10335               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetStyleString" "', argument " "2"" of type '" "char const *""'");
   10336                 :   }
   10337               3 :   arg2 = reinterpret_cast< char * >(buf2);
   10338                 :   {
   10339               3 :     if ( bUseExceptions ) {
   10340               0 :       CPLErrorReset();
   10341                 :     }
   10342                 :     OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2);
   10343               3 :     if ( bUseExceptions ) {
   10344               0 :       CPLErr eclass = CPLGetLastErrorType();
   10345               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10346               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10347                 :       }
   10348                 :     }
   10349                 :   }
   10350               3 :   resultobj = SWIG_Py_Void();
   10351               3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10352               3 :   return resultobj;
   10353                 : fail:
   10354               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10355               0 :   return NULL;
   10356                 : }
   10357                 : 
   10358                 : 
   10359            3709 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10360            3709 :   PyObject *resultobj = 0;
   10361            3709 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10362                 :   int arg2 ;
   10363            3709 :   void *argp1 = 0 ;
   10364            3709 :   int res1 = 0 ;
   10365                 :   int val2 ;
   10366            3709 :   int ecode2 = 0 ;
   10367            3709 :   PyObject * obj0 = 0 ;
   10368            3709 :   PyObject * obj1 = 0 ;
   10369                 :   OGRFieldType result;
   10370                 :   
   10371            3709 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldType",&obj0,&obj1)) SWIG_fail;
   10372            3709 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10373            3709 :   if (!SWIG_IsOK(res1)) {
   10374               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10375                 :   }
   10376            3709 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10377            3709 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   10378            3709 :   if (!SWIG_IsOK(ecode2)) {
   10379               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "int""'");
   10380                 :   } 
   10381            3709 :   arg2 = static_cast< int >(val2);
   10382                 :   {
   10383            3709 :     if ( bUseExceptions ) {
   10384               0 :       CPLErrorReset();
   10385                 :     }
   10386            3709 :     result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
   10387            3709 :     if ( bUseExceptions ) {
   10388               0 :       CPLErr eclass = CPLGetLastErrorType();
   10389               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10390               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10391                 :       }
   10392                 :     }
   10393                 :   }
   10394            7418 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10395            3709 :   return resultobj;
   10396                 : fail:
   10397               0 :   return NULL;
   10398                 : }
   10399                 : 
   10400                 : 
   10401               0 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10402               0 :   PyObject *resultobj = 0;
   10403               0 :   OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
   10404               0 :   char *arg2 = (char *) 0 ;
   10405               0 :   void *argp1 = 0 ;
   10406               0 :   int res1 = 0 ;
   10407                 :   int res2 ;
   10408               0 :   char *buf2 = 0 ;
   10409               0 :   int alloc2 = 0 ;
   10410               0 :   PyObject * obj0 = 0 ;
   10411               0 :   PyObject * obj1 = 0 ;
   10412                 :   OGRFieldType result;
   10413                 :   
   10414               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldType",&obj0,&obj1)) SWIG_fail;
   10415               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
   10416               0 :   if (!SWIG_IsOK(res1)) {
   10417               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
   10418                 :   }
   10419               0 :   arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
   10420               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10421               0 :   if (!SWIG_IsOK(res2)) {
   10422               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "char const *""'");
   10423                 :   }
   10424               0 :   arg2 = reinterpret_cast< char * >(buf2);
   10425                 :   {
   10426               0 :     if (!arg2) {
   10427               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10428                 :     }
   10429                 :   }
   10430                 :   {
   10431               0 :     if ( bUseExceptions ) {
   10432               0 :       CPLErrorReset();
   10433                 :     }
   10434               0 :     result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2);
   10435               0 :     if ( bUseExceptions ) {
   10436               0 :       CPLErr eclass = CPLGetLastErrorType();
   10437               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10438               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10439                 :       }
   10440                 :     }
   10441                 :   }
   10442               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10443               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10444               0 :   return resultobj;
   10445                 : fail:
   10446               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10447               0 :   return NULL;
   10448                 : }
   10449                 : 
   10450                 : 
   10451            3709 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType(PyObject *self, PyObject *args) {
   10452                 :   int argc;
   10453                 :   PyObject *argv[3];
   10454                 :   int ii;
   10455                 :   
   10456            3709 :   if (!PyTuple_Check(args)) SWIG_fail;
   10457            3709 :   argc = (int)PyObject_Length(args);
   10458           11127 :   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
   10459            7418 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
   10460                 :   }
   10461            3709 :   if (argc == 2) {
   10462                 :     int _v;
   10463            3709 :     void *vptr = 0;
   10464            3709 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   10465            3709 :     _v = SWIG_CheckState(res);
   10466            3709 :     if (_v) {
   10467                 :       {
   10468            3709 :         int res = SWIG_AsVal_int(argv[1], NULL);
   10469            3709 :         _v = SWIG_CheckState(res);
   10470                 :       }
   10471            3709 :       if (_v) {
   10472            3709 :         return _wrap_Feature_GetFieldType__SWIG_0(self, args);
   10473                 :       }
   10474                 :     }
   10475                 :   }
   10476               0 :   if (argc == 2) {
   10477                 :     int _v;
   10478               0 :     void *vptr = 0;
   10479               0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
   10480               0 :     _v = SWIG_CheckState(res);
   10481               0 :     if (_v) {
   10482               0 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   10483               0 :       _v = SWIG_CheckState(res);
   10484               0 :       if (_v) {
   10485               0 :         return _wrap_Feature_GetFieldType__SWIG_1(self, args);
   10486                 :       }
   10487                 :     }
   10488                 :   }
   10489                 :   
   10490                 : fail:
   10491                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldType'.\n"
   10492                 :     "  Possible C/C++ prototypes are:\n"
   10493                 :     "    GetFieldType(OGRFeatureShadow *,int)\n"
   10494               0 :     "    GetFieldType(OGRFeatureShadow *,char const *)\n");
   10495               0 :   return NULL;
   10496                 : }
   10497                 : 
   10498                 : 
   10499               1 : SWIGINTERN PyObject *Feature_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10500                 :   PyObject *obj;
   10501               1 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   10502               1 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureShadow, SWIG_NewClientData(obj));
   10503               1 :   return SWIG_Py_Void();
   10504                 : }
   10505                 : 
   10506              24 : SWIGINTERN PyObject *_wrap_delete_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10507              24 :   PyObject *resultobj = 0;
   10508              24 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10509              24 :   void *argp1 = 0 ;
   10510              24 :   int res1 = 0 ;
   10511              24 :   PyObject * obj0 = 0 ;
   10512                 :   
   10513              24 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_FeatureDefn",&obj0)) SWIG_fail;
   10514              24 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_DISOWN |  0 );
   10515              24 :   if (!SWIG_IsOK(res1)) {
   10516               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FeatureDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10517                 :   }
   10518              24 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10519                 :   {
   10520              24 :     if ( bUseExceptions ) {
   10521               0 :       CPLErrorReset();
   10522                 :     }
   10523                 :     delete_OGRFeatureDefnShadow(arg1);
   10524              24 :     if ( bUseExceptions ) {
   10525               0 :       CPLErr eclass = CPLGetLastErrorType();
   10526               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10527               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10528                 :       }
   10529                 :     }
   10530                 :   }
   10531              24 :   resultobj = SWIG_Py_Void();
   10532              24 :   return resultobj;
   10533                 : fail:
   10534               0 :   return NULL;
   10535                 : }
   10536                 : 
   10537                 : 
   10538              24 : SWIGINTERN PyObject *_wrap_new_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   10539              24 :   PyObject *resultobj = 0;
   10540              24 :   char *arg1 = (char *) NULL ;
   10541                 :   int res1 ;
   10542              24 :   char *buf1 = 0 ;
   10543              24 :   int alloc1 = 0 ;
   10544              24 :   PyObject * obj0 = 0 ;
   10545                 :   char *  kwnames[] = {
   10546                 :     (char *) "name_null_ok", NULL 
   10547              24 :   };
   10548              24 :   OGRFeatureDefnShadow *result = 0 ;
   10549                 :   
   10550              24 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_FeatureDefn",kwnames,&obj0)) SWIG_fail;
   10551              24 :   if (obj0) {
   10552              20 :     res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   10553              20 :     if (!SWIG_IsOK(res1)) {
   10554               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureDefn" "', argument " "1"" of type '" "char const *""'");
   10555                 :     }
   10556              20 :     arg1 = reinterpret_cast< char * >(buf1);
   10557                 :   }
   10558                 :   {
   10559              24 :     if ( bUseExceptions ) {
   10560               0 :       CPLErrorReset();
   10561                 :     }
   10562              24 :     result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow((char const *)arg1);
   10563              24 :     if ( bUseExceptions ) {
   10564               0 :       CPLErr eclass = CPLGetLastErrorType();
   10565               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10566               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10567                 :       }
   10568                 :     }
   10569                 :   }
   10570              24 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_NEW |  0 );
   10571              24 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10572              24 :   return resultobj;
   10573                 : fail:
   10574               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10575               0 :   return NULL;
   10576                 : }
   10577                 : 
   10578                 : 
   10579             112 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10580             112 :   PyObject *resultobj = 0;
   10581             112 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10582             112 :   void *argp1 = 0 ;
   10583             112 :   int res1 = 0 ;
   10584             112 :   PyObject * obj0 = 0 ;
   10585             112 :   char *result = 0 ;
   10586                 :   
   10587             112 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetName",&obj0)) SWIG_fail;
   10588             112 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   10589             112 :   if (!SWIG_IsOK(res1)) {
   10590               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetName" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10591                 :   }
   10592             112 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10593                 :   {
   10594             112 :     if ( bUseExceptions ) {
   10595               0 :       CPLErrorReset();
   10596                 :     }
   10597             112 :     result = (char *)OGRFeatureDefnShadow_GetName(arg1);
   10598             112 :     if ( bUseExceptions ) {
   10599               0 :       CPLErr eclass = CPLGetLastErrorType();
   10600               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10601               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10602                 :       }
   10603                 :     }
   10604                 :   }
   10605             112 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10606             112 :   return resultobj;
   10607                 : fail:
   10608               0 :   return NULL;
   10609                 : }
   10610                 : 
   10611                 : 
   10612             363 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10613             363 :   PyObject *resultobj = 0;
   10614             363 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10615             363 :   void *argp1 = 0 ;
   10616             363 :   int res1 = 0 ;
   10617             363 :   PyObject * obj0 = 0 ;
   10618                 :   int result;
   10619                 :   
   10620             363 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetFieldCount",&obj0)) SWIG_fail;
   10621             363 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   10622             363 :   if (!SWIG_IsOK(res1)) {
   10623               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10624                 :   }
   10625             363 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10626                 :   {
   10627             363 :     if ( bUseExceptions ) {
   10628               0 :       CPLErrorReset();
   10629                 :     }
   10630             363 :     result = (int)OGRFeatureDefnShadow_GetFieldCount(arg1);
   10631             363 :     if ( bUseExceptions ) {
   10632               0 :       CPLErr eclass = CPLGetLastErrorType();
   10633               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10634               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10635                 :       }
   10636                 :     }
   10637                 :   }
   10638             363 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10639             363 :   return resultobj;
   10640                 : fail:
   10641               0 :   return NULL;
   10642                 : }
   10643                 : 
   10644                 : 
   10645            1164 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10646            1164 :   PyObject *resultobj = 0;
   10647            1164 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10648                 :   int arg2 ;
   10649            1164 :   void *argp1 = 0 ;
   10650            1164 :   int res1 = 0 ;
   10651                 :   int val2 ;
   10652            1164 :   int ecode2 = 0 ;
   10653            1164 :   PyObject * obj0 = 0 ;
   10654            1164 :   PyObject * obj1 = 0 ;
   10655            1164 :   OGRFieldDefnShadow *result = 0 ;
   10656                 :   
   10657            1164 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_GetFieldDefn",&obj0,&obj1)) SWIG_fail;
   10658            1164 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   10659            1164 :   if (!SWIG_IsOK(res1)) {
   10660               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10661                 :   }
   10662            1164 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10663            1164 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   10664            1164 :   if (!SWIG_IsOK(ecode2)) {
   10665               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "2"" of type '" "int""'");
   10666                 :   } 
   10667            1164 :   arg2 = static_cast< int >(val2);
   10668                 :   {
   10669            1164 :     if ( bUseExceptions ) {
   10670               0 :       CPLErrorReset();
   10671                 :     }
   10672            1164 :     result = (OGRFieldDefnShadow *)OGRFeatureDefnShadow_GetFieldDefn(arg1,arg2);
   10673            1164 :     if ( bUseExceptions ) {
   10674               0 :       CPLErr eclass = CPLGetLastErrorType();
   10675               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10676               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10677                 :       }
   10678                 :     }
   10679                 :   }
   10680            1164 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   10681            1164 :   return resultobj;
   10682                 : fail:
   10683               0 :   return NULL;
   10684                 : }
   10685                 : 
   10686                 : 
   10687             776 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10688             776 :   PyObject *resultobj = 0;
   10689             776 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10690             776 :   char *arg2 = (char *) 0 ;
   10691             776 :   void *argp1 = 0 ;
   10692             776 :   int res1 = 0 ;
   10693                 :   int res2 ;
   10694             776 :   char *buf2 = 0 ;
   10695             776 :   int alloc2 = 0 ;
   10696             776 :   PyObject * obj0 = 0 ;
   10697             776 :   PyObject * obj1 = 0 ;
   10698                 :   int result;
   10699                 :   
   10700             776 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_GetFieldIndex",&obj0,&obj1)) SWIG_fail;
   10701             776 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   10702             776 :   if (!SWIG_IsOK(res1)) {
   10703               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10704                 :   }
   10705             776 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10706             776 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10707             776 :   if (!SWIG_IsOK(res2)) {
   10708               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "2"" of type '" "char const *""'");
   10709                 :   }
   10710             776 :   arg2 = reinterpret_cast< char * >(buf2);
   10711                 :   {
   10712             776 :     if (!arg2) {
   10713               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10714                 :     }
   10715                 :   }
   10716                 :   {
   10717             776 :     if ( bUseExceptions ) {
   10718               0 :       CPLErrorReset();
   10719                 :     }
   10720             776 :     result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
   10721             776 :     if ( bUseExceptions ) {
   10722               0 :       CPLErr eclass = CPLGetLastErrorType();
   10723               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10724               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10725                 :       }
   10726                 :     }
   10727                 :   }
   10728             776 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10729             776 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10730             776 :   return resultobj;
   10731                 : fail:
   10732               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10733               0 :   return NULL;
   10734                 : }
   10735                 : 
   10736                 : 
   10737             210 : SWIGINTERN PyObject *_wrap_FeatureDefn_AddFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10738             210 :   PyObject *resultobj = 0;
   10739             210 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10740             210 :   OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
   10741             210 :   void *argp1 = 0 ;
   10742             210 :   int res1 = 0 ;
   10743             210 :   void *argp2 = 0 ;
   10744             210 :   int res2 = 0 ;
   10745             210 :   PyObject * obj0 = 0 ;
   10746             210 :   PyObject * obj1 = 0 ;
   10747                 :   
   10748             210 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_AddFieldDefn",&obj0,&obj1)) SWIG_fail;
   10749             210 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   10750             210 :   if (!SWIG_IsOK(res1)) {
   10751               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10752                 :   }
   10753             210 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10754             210 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   10755             210 :   if (!SWIG_IsOK(res2)) {
   10756               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'"); 
   10757                 :   }
   10758             210 :   arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
   10759                 :   {
   10760             210 :     if (!arg2) {
   10761               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10762                 :     }
   10763                 :   }
   10764                 :   {
   10765             210 :     if ( bUseExceptions ) {
   10766               0 :       CPLErrorReset();
   10767                 :     }
   10768                 :     OGRFeatureDefnShadow_AddFieldDefn(arg1,arg2);
   10769             210 :     if ( bUseExceptions ) {
   10770               0 :       CPLErr eclass = CPLGetLastErrorType();
   10771               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10772               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10773                 :       }
   10774                 :     }
   10775                 :   }
   10776             210 :   resultobj = SWIG_Py_Void();
   10777             210 :   return resultobj;
   10778                 : fail:
   10779               0 :   return NULL;
   10780                 : }
   10781                 : 
   10782                 : 
   10783             133 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10784             133 :   PyObject *resultobj = 0;
   10785             133 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10786             133 :   void *argp1 = 0 ;
   10787             133 :   int res1 = 0 ;
   10788             133 :   PyObject * obj0 = 0 ;
   10789                 :   OGRwkbGeometryType result;
   10790                 :   
   10791             133 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetGeomType",&obj0)) SWIG_fail;
   10792             133 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   10793             133 :   if (!SWIG_IsOK(res1)) {
   10794               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10795                 :   }
   10796             133 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10797                 :   {
   10798             133 :     if ( bUseExceptions ) {
   10799               0 :       CPLErrorReset();
   10800                 :     }
   10801             133 :     result = (OGRwkbGeometryType)OGRFeatureDefnShadow_GetGeomType(arg1);
   10802             133 :     if ( bUseExceptions ) {
   10803               0 :       CPLErr eclass = CPLGetLastErrorType();
   10804               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10805               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10806                 :       }
   10807                 :     }
   10808                 :   }
   10809             266 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10810             133 :   return resultobj;
   10811                 : fail:
   10812               0 :   return NULL;
   10813                 : }
   10814                 : 
   10815                 : 
   10816               0 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10817               0 :   PyObject *resultobj = 0;
   10818               0 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10819                 :   OGRwkbGeometryType arg2 ;
   10820               0 :   void *argp1 = 0 ;
   10821               0 :   int res1 = 0 ;
   10822                 :   int val2 ;
   10823               0 :   int ecode2 = 0 ;
   10824               0 :   PyObject * obj0 = 0 ;
   10825               0 :   PyObject * obj1 = 0 ;
   10826                 :   
   10827               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetGeomType",&obj0,&obj1)) SWIG_fail;
   10828               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   10829               0 :   if (!SWIG_IsOK(res1)) {
   10830               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10831                 :   }
   10832               0 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10833               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   10834               0 :   if (!SWIG_IsOK(ecode2)) {
   10835               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeomType" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
   10836                 :   } 
   10837               0 :   arg2 = static_cast< OGRwkbGeometryType >(val2);
   10838                 :   {
   10839               0 :     if ( bUseExceptions ) {
   10840               0 :       CPLErrorReset();
   10841                 :     }
   10842                 :     OGRFeatureDefnShadow_SetGeomType(arg1,arg2);
   10843               0 :     if ( bUseExceptions ) {
   10844               0 :       CPLErr eclass = CPLGetLastErrorType();
   10845               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10846               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10847                 :       }
   10848                 :     }
   10849                 :   }
   10850               0 :   resultobj = SWIG_Py_Void();
   10851               0 :   return resultobj;
   10852                 : fail:
   10853               0 :   return NULL;
   10854                 : }
   10855                 : 
   10856                 : 
   10857               0 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetReferenceCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10858               0 :   PyObject *resultobj = 0;
   10859               0 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10860               0 :   void *argp1 = 0 ;
   10861               0 :   int res1 = 0 ;
   10862               0 :   PyObject * obj0 = 0 ;
   10863                 :   int result;
   10864                 :   
   10865               0 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetReferenceCount",&obj0)) SWIG_fail;
   10866               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   10867               0 :   if (!SWIG_IsOK(res1)) {
   10868               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetReferenceCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10869                 :   }
   10870               0 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10871                 :   {
   10872               0 :     if ( bUseExceptions ) {
   10873               0 :       CPLErrorReset();
   10874                 :     }
   10875               0 :     result = (int)OGRFeatureDefnShadow_GetReferenceCount(arg1);
   10876               0 :     if ( bUseExceptions ) {
   10877               0 :       CPLErr eclass = CPLGetLastErrorType();
   10878               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10879               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10880                 :       }
   10881                 :     }
   10882                 :   }
   10883               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10884               0 :   return resultobj;
   10885                 : fail:
   10886               0 :   return NULL;
   10887                 : }
   10888                 : 
   10889                 : 
   10890               4 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10891               4 :   PyObject *resultobj = 0;
   10892               4 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10893               4 :   void *argp1 = 0 ;
   10894               4 :   int res1 = 0 ;
   10895               4 :   PyObject * obj0 = 0 ;
   10896                 :   int result;
   10897                 :   
   10898               4 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_IsGeometryIgnored",&obj0)) SWIG_fail;
   10899               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   10900               4 :   if (!SWIG_IsOK(res1)) {
   10901               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10902                 :   }
   10903               4 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10904                 :   {
   10905               4 :     if ( bUseExceptions ) {
   10906               0 :       CPLErrorReset();
   10907                 :     }
   10908               4 :     result = (int)OGRFeatureDefnShadow_IsGeometryIgnored(arg1);
   10909               4 :     if ( bUseExceptions ) {
   10910               0 :       CPLErr eclass = CPLGetLastErrorType();
   10911               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10912               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10913                 :       }
   10914                 :     }
   10915                 :   }
   10916               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10917               4 :   return resultobj;
   10918                 : fail:
   10919               0 :   return NULL;
   10920                 : }
   10921                 : 
   10922                 : 
   10923               2 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10924               2 :   PyObject *resultobj = 0;
   10925               2 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10926                 :   int arg2 ;
   10927               2 :   void *argp1 = 0 ;
   10928               2 :   int res1 = 0 ;
   10929                 :   int val2 ;
   10930               2 :   int ecode2 = 0 ;
   10931               2 :   PyObject * obj0 = 0 ;
   10932               2 :   PyObject * obj1 = 0 ;
   10933                 :   
   10934               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetGeometryIgnored",&obj0,&obj1)) SWIG_fail;
   10935               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   10936               2 :   if (!SWIG_IsOK(res1)) {
   10937               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10938                 :   }
   10939               2 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10940               2 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   10941               2 :   if (!SWIG_IsOK(ecode2)) {
   10942               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "2"" of type '" "int""'");
   10943                 :   } 
   10944               2 :   arg2 = static_cast< int >(val2);
   10945                 :   {
   10946               2 :     if ( bUseExceptions ) {
   10947               0 :       CPLErrorReset();
   10948                 :     }
   10949                 :     OGRFeatureDefnShadow_SetGeometryIgnored(arg1,arg2);
   10950               2 :     if ( bUseExceptions ) {
   10951               0 :       CPLErr eclass = CPLGetLastErrorType();
   10952               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10953               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10954                 :       }
   10955                 :     }
   10956                 :   }
   10957               2 :   resultobj = SWIG_Py_Void();
   10958               2 :   return resultobj;
   10959                 : fail:
   10960               0 :   return NULL;
   10961                 : }
   10962                 : 
   10963                 : 
   10964               2 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10965               2 :   PyObject *resultobj = 0;
   10966               2 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   10967               2 :   void *argp1 = 0 ;
   10968               2 :   int res1 = 0 ;
   10969               2 :   PyObject * obj0 = 0 ;
   10970                 :   int result;
   10971                 :   
   10972               2 :   if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_IsStyleIgnored",&obj0)) SWIG_fail;
   10973               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   10974               2 :   if (!SWIG_IsOK(res1)) {
   10975               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   10976                 :   }
   10977               2 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   10978                 :   {
   10979               2 :     if ( bUseExceptions ) {
   10980               0 :       CPLErrorReset();
   10981                 :     }
   10982               2 :     result = (int)OGRFeatureDefnShadow_IsStyleIgnored(arg1);
   10983               2 :     if ( bUseExceptions ) {
   10984               0 :       CPLErr eclass = CPLGetLastErrorType();
   10985               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10986               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10987                 :       }
   10988                 :     }
   10989                 :   }
   10990               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10991               2 :   return resultobj;
   10992                 : fail:
   10993               0 :   return NULL;
   10994                 : }
   10995                 : 
   10996                 : 
   10997               0 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10998               0 :   PyObject *resultobj = 0;
   10999               0 :   OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
   11000                 :   int arg2 ;
   11001               0 :   void *argp1 = 0 ;
   11002               0 :   int res1 = 0 ;
   11003                 :   int val2 ;
   11004               0 :   int ecode2 = 0 ;
   11005               0 :   PyObject * obj0 = 0 ;
   11006               0 :   PyObject * obj1 = 0 ;
   11007                 :   
   11008               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetStyleIgnored",&obj0,&obj1)) SWIG_fail;
   11009               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
   11010               0 :   if (!SWIG_IsOK(res1)) {
   11011               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
   11012                 :   }
   11013               0 :   arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
   11014               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11015               0 :   if (!SWIG_IsOK(ecode2)) {
   11016               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "2"" of type '" "int""'");
   11017                 :   } 
   11018               0 :   arg2 = static_cast< int >(val2);
   11019                 :   {
   11020               0 :     if ( bUseExceptions ) {
   11021               0 :       CPLErrorReset();
   11022                 :     }
   11023                 :     OGRFeatureDefnShadow_SetStyleIgnored(arg1,arg2);
   11024               0 :     if ( bUseExceptions ) {
   11025               0 :       CPLErr eclass = CPLGetLastErrorType();
   11026               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11027               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11028                 :       }
   11029                 :     }
   11030                 :   }
   11031               0 :   resultobj = SWIG_Py_Void();
   11032               0 :   return resultobj;
   11033                 : fail:
   11034               0 :   return NULL;
   11035                 : }
   11036                 : 
   11037                 : 
   11038               1 : SWIGINTERN PyObject *FeatureDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11039                 :   PyObject *obj;
   11040               1 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   11041               1 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_NewClientData(obj));
   11042               1 :   return SWIG_Py_Void();
   11043                 : }
   11044                 : 
   11045            4565 : SWIGINTERN PyObject *_wrap_delete_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11046            4565 :   PyObject *resultobj = 0;
   11047            4565 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11048            4565 :   void *argp1 = 0 ;
   11049            4565 :   int res1 = 0 ;
   11050            4565 :   PyObject * obj0 = 0 ;
   11051                 :   
   11052            4565 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_FieldDefn",&obj0)) SWIG_fail;
   11053            4565 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_DISOWN |  0 );
   11054            4565 :   if (!SWIG_IsOK(res1)) {
   11055               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FieldDefn" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11056                 :   }
   11057            4565 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11058                 :   {
   11059            4565 :     if ( bUseExceptions ) {
   11060               0 :       CPLErrorReset();
   11061                 :     }
   11062                 :     delete_OGRFieldDefnShadow(arg1);
   11063            4565 :     if ( bUseExceptions ) {
   11064               0 :       CPLErr eclass = CPLGetLastErrorType();
   11065               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11066               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11067                 :       }
   11068                 :     }
   11069                 :   }
   11070            4565 :   resultobj = SWIG_Py_Void();
   11071            4565 :   return resultobj;
   11072                 : fail:
   11073               0 :   return NULL;
   11074                 : }
   11075                 : 
   11076                 : 
   11077            4565 : SWIGINTERN PyObject *_wrap_new_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11078            4565 :   PyObject *resultobj = 0;
   11079            4565 :   char *arg1 = (char *) "unnamed" ;
   11080            4565 :   OGRFieldType arg2 = (OGRFieldType) OFTString ;
   11081                 :   int res1 ;
   11082            4565 :   char *buf1 = 0 ;
   11083            4565 :   int alloc1 = 0 ;
   11084                 :   int val2 ;
   11085            4565 :   int ecode2 = 0 ;
   11086            4565 :   PyObject * obj0 = 0 ;
   11087            4565 :   PyObject * obj1 = 0 ;
   11088                 :   char *  kwnames[] = {
   11089                 :     (char *) "name_null_ok",(char *) "field_type", NULL 
   11090            4565 :   };
   11091            4565 :   OGRFieldDefnShadow *result = 0 ;
   11092                 :   
   11093            4565 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_FieldDefn",kwnames,&obj0,&obj1)) SWIG_fail;
   11094            4565 :   if (obj0) {
   11095            4564 :     res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   11096            4564 :     if (!SWIG_IsOK(res1)) {
   11097               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FieldDefn" "', argument " "1"" of type '" "char const *""'");
   11098                 :     }
   11099            4564 :     arg1 = reinterpret_cast< char * >(buf1);
   11100                 :   }
   11101            4565 :   if (obj1) {
   11102            4552 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   11103            4552 :     if (!SWIG_IsOK(ecode2)) {
   11104               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FieldDefn" "', argument " "2"" of type '" "OGRFieldType""'");
   11105                 :     } 
   11106            4552 :     arg2 = static_cast< OGRFieldType >(val2);
   11107                 :   }
   11108                 :   {
   11109            4565 :     if ( bUseExceptions ) {
   11110               0 :       CPLErrorReset();
   11111                 :     }
   11112            4565 :     result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow((char const *)arg1,arg2);
   11113            4565 :     if ( bUseExceptions ) {
   11114               0 :       CPLErr eclass = CPLGetLastErrorType();
   11115               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11116               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11117                 :       }
   11118                 :     }
   11119                 :   }
   11120            4565 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_NEW |  0 );
   11121            4565 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11122            4565 :   return resultobj;
   11123                 : fail:
   11124               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11125               0 :   return NULL;
   11126                 : }
   11127                 : 
   11128                 : 
   11129             247 : SWIGINTERN PyObject *_wrap_FieldDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11130             247 :   PyObject *resultobj = 0;
   11131             247 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11132             247 :   void *argp1 = 0 ;
   11133             247 :   int res1 = 0 ;
   11134             247 :   PyObject * obj0 = 0 ;
   11135             247 :   char *result = 0 ;
   11136                 :   
   11137             247 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetName",&obj0)) SWIG_fail;
   11138             247 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11139             247 :   if (!SWIG_IsOK(res1)) {
   11140               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11141                 :   }
   11142             247 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11143                 :   {
   11144             247 :     if ( bUseExceptions ) {
   11145               0 :       CPLErrorReset();
   11146                 :     }
   11147             247 :     result = (char *)OGRFieldDefnShadow_GetName(arg1);
   11148             247 :     if ( bUseExceptions ) {
   11149               0 :       CPLErr eclass = CPLGetLastErrorType();
   11150               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11151               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11152                 :       }
   11153                 :     }
   11154                 :   }
   11155             247 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11156             247 :   return resultobj;
   11157                 : fail:
   11158               0 :   return NULL;
   11159                 : }
   11160                 : 
   11161                 : 
   11162             510 : SWIGINTERN PyObject *_wrap_FieldDefn_GetNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11163             510 :   PyObject *resultobj = 0;
   11164             510 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11165             510 :   void *argp1 = 0 ;
   11166             510 :   int res1 = 0 ;
   11167             510 :   PyObject * obj0 = 0 ;
   11168             510 :   char *result = 0 ;
   11169                 :   
   11170             510 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetNameRef",&obj0)) SWIG_fail;
   11171             510 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11172             510 :   if (!SWIG_IsOK(res1)) {
   11173               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetNameRef" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11174                 :   }
   11175             510 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11176                 :   {
   11177             510 :     if ( bUseExceptions ) {
   11178               0 :       CPLErrorReset();
   11179                 :     }
   11180             510 :     result = (char *)OGRFieldDefnShadow_GetNameRef(arg1);
   11181             510 :     if ( bUseExceptions ) {
   11182               0 :       CPLErr eclass = CPLGetLastErrorType();
   11183               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11184               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11185                 :       }
   11186                 :     }
   11187                 :   }
   11188             510 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11189             510 :   return resultobj;
   11190                 : fail:
   11191               0 :   return NULL;
   11192                 : }
   11193                 : 
   11194                 : 
   11195               1 : SWIGINTERN PyObject *_wrap_FieldDefn_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11196               1 :   PyObject *resultobj = 0;
   11197               1 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11198               1 :   char *arg2 = (char *) 0 ;
   11199               1 :   void *argp1 = 0 ;
   11200               1 :   int res1 = 0 ;
   11201                 :   int res2 ;
   11202               1 :   char *buf2 = 0 ;
   11203               1 :   int alloc2 = 0 ;
   11204               1 :   PyObject * obj0 = 0 ;
   11205               1 :   PyObject * obj1 = 0 ;
   11206                 :   
   11207               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetName",&obj0,&obj1)) SWIG_fail;
   11208               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11209               1 :   if (!SWIG_IsOK(res1)) {
   11210               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11211                 :   }
   11212               1 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11213               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   11214               1 :   if (!SWIG_IsOK(res2)) {
   11215               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetName" "', argument " "2"" of type '" "char const *""'");
   11216                 :   }
   11217               1 :   arg2 = reinterpret_cast< char * >(buf2);
   11218                 :   {
   11219               1 :     if (!arg2) {
   11220               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11221                 :     }
   11222                 :   }
   11223                 :   {
   11224               1 :     if ( bUseExceptions ) {
   11225               0 :       CPLErrorReset();
   11226                 :     }
   11227                 :     OGRFieldDefnShadow_SetName(arg1,(char const *)arg2);
   11228               1 :     if ( bUseExceptions ) {
   11229               0 :       CPLErr eclass = CPLGetLastErrorType();
   11230               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11231               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11232                 :       }
   11233                 :     }
   11234                 :   }
   11235               1 :   resultobj = SWIG_Py_Void();
   11236               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11237               1 :   return resultobj;
   11238                 : fail:
   11239               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11240               0 :   return NULL;
   11241                 : }
   11242                 : 
   11243                 : 
   11244             492 : SWIGINTERN PyObject *_wrap_FieldDefn_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11245             492 :   PyObject *resultobj = 0;
   11246             492 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11247             492 :   void *argp1 = 0 ;
   11248             492 :   int res1 = 0 ;
   11249             492 :   PyObject * obj0 = 0 ;
   11250                 :   OGRFieldType result;
   11251                 :   
   11252             492 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetType",&obj0)) SWIG_fail;
   11253             492 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11254             492 :   if (!SWIG_IsOK(res1)) {
   11255               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11256                 :   }
   11257             492 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11258                 :   {
   11259             492 :     if ( bUseExceptions ) {
   11260               0 :       CPLErrorReset();
   11261                 :     }
   11262             492 :     result = (OGRFieldType)OGRFieldDefnShadow_GetType(arg1);
   11263             492 :     if ( bUseExceptions ) {
   11264               0 :       CPLErr eclass = CPLGetLastErrorType();
   11265               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11266               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11267                 :       }
   11268                 :     }
   11269                 :   }
   11270             984 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11271             492 :   return resultobj;
   11272                 : fail:
   11273               0 :   return NULL;
   11274                 : }
   11275                 : 
   11276                 : 
   11277               0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11278               0 :   PyObject *resultobj = 0;
   11279               0 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11280                 :   OGRFieldType arg2 ;
   11281               0 :   void *argp1 = 0 ;
   11282               0 :   int res1 = 0 ;
   11283                 :   int val2 ;
   11284               0 :   int ecode2 = 0 ;
   11285               0 :   PyObject * obj0 = 0 ;
   11286               0 :   PyObject * obj1 = 0 ;
   11287                 :   
   11288               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetType",&obj0,&obj1)) SWIG_fail;
   11289               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11290               0 :   if (!SWIG_IsOK(res1)) {
   11291               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11292                 :   }
   11293               0 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11294               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11295               0 :   if (!SWIG_IsOK(ecode2)) {
   11296               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetType" "', argument " "2"" of type '" "OGRFieldType""'");
   11297                 :   } 
   11298               0 :   arg2 = static_cast< OGRFieldType >(val2);
   11299                 :   {
   11300               0 :     if ( bUseExceptions ) {
   11301               0 :       CPLErrorReset();
   11302                 :     }
   11303                 :     OGRFieldDefnShadow_SetType(arg1,arg2);
   11304               0 :     if ( bUseExceptions ) {
   11305               0 :       CPLErr eclass = CPLGetLastErrorType();
   11306               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11307               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11308                 :       }
   11309                 :     }
   11310                 :   }
   11311               0 :   resultobj = SWIG_Py_Void();
   11312               0 :   return resultobj;
   11313                 : fail:
   11314               0 :   return NULL;
   11315                 : }
   11316                 : 
   11317                 : 
   11318               0 : SWIGINTERN PyObject *_wrap_FieldDefn_GetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11319               0 :   PyObject *resultobj = 0;
   11320               0 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11321               0 :   void *argp1 = 0 ;
   11322               0 :   int res1 = 0 ;
   11323               0 :   PyObject * obj0 = 0 ;
   11324                 :   OGRJustification result;
   11325                 :   
   11326               0 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetJustify",&obj0)) SWIG_fail;
   11327               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11328               0 :   if (!SWIG_IsOK(res1)) {
   11329               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11330                 :   }
   11331               0 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11332                 :   {
   11333               0 :     if ( bUseExceptions ) {
   11334               0 :       CPLErrorReset();
   11335                 :     }
   11336               0 :     result = (OGRJustification)OGRFieldDefnShadow_GetJustify(arg1);
   11337               0 :     if ( bUseExceptions ) {
   11338               0 :       CPLErr eclass = CPLGetLastErrorType();
   11339               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11340               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11341                 :       }
   11342                 :     }
   11343                 :   }
   11344               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11345               0 :   return resultobj;
   11346                 : fail:
   11347               0 :   return NULL;
   11348                 : }
   11349                 : 
   11350                 : 
   11351               0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11352               0 :   PyObject *resultobj = 0;
   11353               0 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11354                 :   OGRJustification arg2 ;
   11355               0 :   void *argp1 = 0 ;
   11356               0 :   int res1 = 0 ;
   11357                 :   int val2 ;
   11358               0 :   int ecode2 = 0 ;
   11359               0 :   PyObject * obj0 = 0 ;
   11360               0 :   PyObject * obj1 = 0 ;
   11361                 :   
   11362               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetJustify",&obj0,&obj1)) SWIG_fail;
   11363               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11364               0 :   if (!SWIG_IsOK(res1)) {
   11365               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11366                 :   }
   11367               0 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11368               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11369               0 :   if (!SWIG_IsOK(ecode2)) {
   11370               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetJustify" "', argument " "2"" of type '" "OGRJustification""'");
   11371                 :   } 
   11372               0 :   arg2 = static_cast< OGRJustification >(val2);
   11373                 :   {
   11374               0 :     if ( bUseExceptions ) {
   11375               0 :       CPLErrorReset();
   11376                 :     }
   11377                 :     OGRFieldDefnShadow_SetJustify(arg1,arg2);
   11378               0 :     if ( bUseExceptions ) {
   11379               0 :       CPLErr eclass = CPLGetLastErrorType();
   11380               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11381               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11382                 :       }
   11383                 :     }
   11384                 :   }
   11385               0 :   resultobj = SWIG_Py_Void();
   11386               0 :   return resultobj;
   11387                 : fail:
   11388               0 :   return NULL;
   11389                 : }
   11390                 : 
   11391                 : 
   11392             499 : SWIGINTERN PyObject *_wrap_FieldDefn_GetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11393             499 :   PyObject *resultobj = 0;
   11394             499 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11395             499 :   void *argp1 = 0 ;
   11396             499 :   int res1 = 0 ;
   11397             499 :   PyObject * obj0 = 0 ;
   11398                 :   int result;
   11399                 :   
   11400             499 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetWidth",&obj0)) SWIG_fail;
   11401             499 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11402             499 :   if (!SWIG_IsOK(res1)) {
   11403               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11404                 :   }
   11405             499 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11406                 :   {
   11407             499 :     if ( bUseExceptions ) {
   11408               0 :       CPLErrorReset();
   11409                 :     }
   11410             499 :     result = (int)OGRFieldDefnShadow_GetWidth(arg1);
   11411             499 :     if ( bUseExceptions ) {
   11412               0 :       CPLErr eclass = CPLGetLastErrorType();
   11413               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11414               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11415                 :       }
   11416                 :     }
   11417                 :   }
   11418             499 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11419             499 :   return resultobj;
   11420                 : fail:
   11421               0 :   return NULL;
   11422                 : }
   11423                 : 
   11424                 : 
   11425             182 : SWIGINTERN PyObject *_wrap_FieldDefn_SetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11426             182 :   PyObject *resultobj = 0;
   11427             182 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11428                 :   int arg2 ;
   11429             182 :   void *argp1 = 0 ;
   11430             182 :   int res1 = 0 ;
   11431                 :   int val2 ;
   11432             182 :   int ecode2 = 0 ;
   11433             182 :   PyObject * obj0 = 0 ;
   11434             182 :   PyObject * obj1 = 0 ;
   11435                 :   
   11436             182 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetWidth",&obj0,&obj1)) SWIG_fail;
   11437             182 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11438             182 :   if (!SWIG_IsOK(res1)) {
   11439               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11440                 :   }
   11441             182 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11442             182 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11443             182 :   if (!SWIG_IsOK(ecode2)) {
   11444               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetWidth" "', argument " "2"" of type '" "int""'");
   11445                 :   } 
   11446             182 :   arg2 = static_cast< int >(val2);
   11447                 :   {
   11448             182 :     if ( bUseExceptions ) {
   11449               0 :       CPLErrorReset();
   11450                 :     }
   11451                 :     OGRFieldDefnShadow_SetWidth(arg1,arg2);
   11452             182 :     if ( bUseExceptions ) {
   11453               0 :       CPLErr eclass = CPLGetLastErrorType();
   11454               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11455               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11456                 :       }
   11457                 :     }
   11458                 :   }
   11459             182 :   resultobj = SWIG_Py_Void();
   11460             182 :   return resultobj;
   11461                 : fail:
   11462               0 :   return NULL;
   11463                 : }
   11464                 : 
   11465                 : 
   11466             195 : SWIGINTERN PyObject *_wrap_FieldDefn_GetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11467             195 :   PyObject *resultobj = 0;
   11468             195 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11469             195 :   void *argp1 = 0 ;
   11470             195 :   int res1 = 0 ;
   11471             195 :   PyObject * obj0 = 0 ;
   11472                 :   int result;
   11473                 :   
   11474             195 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetPrecision",&obj0)) SWIG_fail;
   11475             195 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11476             195 :   if (!SWIG_IsOK(res1)) {
   11477               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11478                 :   }
   11479             195 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11480                 :   {
   11481             195 :     if ( bUseExceptions ) {
   11482               0 :       CPLErrorReset();
   11483                 :     }
   11484             195 :     result = (int)OGRFieldDefnShadow_GetPrecision(arg1);
   11485             195 :     if ( bUseExceptions ) {
   11486               0 :       CPLErr eclass = CPLGetLastErrorType();
   11487               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11488               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11489                 :       }
   11490                 :     }
   11491                 :   }
   11492             195 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11493             195 :   return resultobj;
   11494                 : fail:
   11495               0 :   return NULL;
   11496                 : }
   11497                 : 
   11498                 : 
   11499             120 : SWIGINTERN PyObject *_wrap_FieldDefn_SetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11500             120 :   PyObject *resultobj = 0;
   11501             120 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11502                 :   int arg2 ;
   11503             120 :   void *argp1 = 0 ;
   11504             120 :   int res1 = 0 ;
   11505                 :   int val2 ;
   11506             120 :   int ecode2 = 0 ;
   11507             120 :   PyObject * obj0 = 0 ;
   11508             120 :   PyObject * obj1 = 0 ;
   11509                 :   
   11510             120 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetPrecision",&obj0,&obj1)) SWIG_fail;
   11511             120 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11512             120 :   if (!SWIG_IsOK(res1)) {
   11513               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11514                 :   }
   11515             120 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11516             120 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11517             120 :   if (!SWIG_IsOK(ecode2)) {
   11518               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetPrecision" "', argument " "2"" of type '" "int""'");
   11519                 :   } 
   11520             120 :   arg2 = static_cast< int >(val2);
   11521                 :   {
   11522             120 :     if ( bUseExceptions ) {
   11523               0 :       CPLErrorReset();
   11524                 :     }
   11525                 :     OGRFieldDefnShadow_SetPrecision(arg1,arg2);
   11526             120 :     if ( bUseExceptions ) {
   11527               0 :       CPLErr eclass = CPLGetLastErrorType();
   11528               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11529               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11530                 :       }
   11531                 :     }
   11532                 :   }
   11533             120 :   resultobj = SWIG_Py_Void();
   11534             120 :   return resultobj;
   11535                 : fail:
   11536               0 :   return NULL;
   11537                 : }
   11538                 : 
   11539                 : 
   11540               0 : SWIGINTERN PyObject *_wrap_FieldDefn_GetTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11541               0 :   PyObject *resultobj = 0;
   11542               0 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11543               0 :   void *argp1 = 0 ;
   11544               0 :   int res1 = 0 ;
   11545               0 :   PyObject * obj0 = 0 ;
   11546               0 :   char *result = 0 ;
   11547                 :   
   11548               0 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetTypeName",&obj0)) SWIG_fail;
   11549               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11550               0 :   if (!SWIG_IsOK(res1)) {
   11551               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11552                 :   }
   11553               0 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11554                 :   {
   11555               0 :     if ( bUseExceptions ) {
   11556               0 :       CPLErrorReset();
   11557                 :     }
   11558               0 :     result = (char *)OGRFieldDefnShadow_GetTypeName(arg1);
   11559               0 :     if ( bUseExceptions ) {
   11560               0 :       CPLErr eclass = CPLGetLastErrorType();
   11561               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11562               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11563                 :       }
   11564                 :     }
   11565                 :   }
   11566               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11567               0 :   return resultobj;
   11568                 : fail:
   11569               0 :   return NULL;
   11570                 : }
   11571                 : 
   11572                 : 
   11573              32 : SWIGINTERN PyObject *_wrap_FieldDefn_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11574              32 :   PyObject *resultobj = 0;
   11575              32 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11576                 :   OGRFieldType arg2 ;
   11577              32 :   void *argp1 = 0 ;
   11578              32 :   int res1 = 0 ;
   11579                 :   int val2 ;
   11580              32 :   int ecode2 = 0 ;
   11581              32 :   PyObject * obj0 = 0 ;
   11582              32 :   PyObject * obj1 = 0 ;
   11583              32 :   char *result = 0 ;
   11584                 :   
   11585              32 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_GetFieldTypeName",&obj0,&obj1)) SWIG_fail;
   11586              32 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11587              32 :   if (!SWIG_IsOK(res1)) {
   11588               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11589                 :   }
   11590              32 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11591              32 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11592              32 :   if (!SWIG_IsOK(ecode2)) {
   11593               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "2"" of type '" "OGRFieldType""'");
   11594                 :   } 
   11595              32 :   arg2 = static_cast< OGRFieldType >(val2);
   11596                 :   {
   11597              32 :     if ( bUseExceptions ) {
   11598               0 :       CPLErrorReset();
   11599                 :     }
   11600              32 :     result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2);
   11601              32 :     if ( bUseExceptions ) {
   11602               0 :       CPLErr eclass = CPLGetLastErrorType();
   11603               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11604               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11605                 :       }
   11606                 :     }
   11607                 :   }
   11608              32 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11609              32 :   return resultobj;
   11610                 : fail:
   11611               0 :   return NULL;
   11612                 : }
   11613                 : 
   11614                 : 
   11615               4 : SWIGINTERN PyObject *_wrap_FieldDefn_IsIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11616               4 :   PyObject *resultobj = 0;
   11617               4 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11618               4 :   void *argp1 = 0 ;
   11619               4 :   int res1 = 0 ;
   11620               4 :   PyObject * obj0 = 0 ;
   11621                 :   int result;
   11622                 :   
   11623               4 :   if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_IsIgnored",&obj0)) SWIG_fail;
   11624               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11625               4 :   if (!SWIG_IsOK(res1)) {
   11626               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11627                 :   }
   11628               4 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11629                 :   {
   11630               4 :     if ( bUseExceptions ) {
   11631               0 :       CPLErrorReset();
   11632                 :     }
   11633               4 :     result = (int)OGRFieldDefnShadow_IsIgnored(arg1);
   11634               4 :     if ( bUseExceptions ) {
   11635               0 :       CPLErr eclass = CPLGetLastErrorType();
   11636               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11637               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11638                 :       }
   11639                 :     }
   11640                 :   }
   11641               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11642               4 :   return resultobj;
   11643                 : fail:
   11644               0 :   return NULL;
   11645                 : }
   11646                 : 
   11647                 : 
   11648               0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11649               0 :   PyObject *resultobj = 0;
   11650               0 :   OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
   11651                 :   int arg2 ;
   11652               0 :   void *argp1 = 0 ;
   11653               0 :   int res1 = 0 ;
   11654                 :   int val2 ;
   11655               0 :   int ecode2 = 0 ;
   11656               0 :   PyObject * obj0 = 0 ;
   11657               0 :   PyObject * obj1 = 0 ;
   11658                 :   
   11659               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetIgnored",&obj0,&obj1)) SWIG_fail;
   11660               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
   11661               0 :   if (!SWIG_IsOK(res1)) {
   11662               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
   11663                 :   }
   11664               0 :   arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
   11665               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11666               0 :   if (!SWIG_IsOK(ecode2)) {
   11667               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetIgnored" "', argument " "2"" of type '" "int""'");
   11668                 :   } 
   11669               0 :   arg2 = static_cast< int >(val2);
   11670                 :   {
   11671               0 :     if ( bUseExceptions ) {
   11672               0 :       CPLErrorReset();
   11673                 :     }
   11674                 :     OGRFieldDefnShadow_SetIgnored(arg1,arg2);
   11675               0 :     if ( bUseExceptions ) {
   11676               0 :       CPLErr eclass = CPLGetLastErrorType();
   11677               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11678               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11679                 :       }
   11680                 :     }
   11681                 :   }
   11682               0 :   resultobj = SWIG_Py_Void();
   11683               0 :   return resultobj;
   11684                 : fail:
   11685               0 :   return NULL;
   11686                 : }
   11687                 : 
   11688                 : 
   11689               1 : SWIGINTERN PyObject *FieldDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11690                 :   PyObject *obj;
   11691               1 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   11692               1 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRFieldDefnShadow, SWIG_NewClientData(obj));
   11693               1 :   return SWIG_Py_Void();
   11694                 : }
   11695                 : 
   11696              72 : SWIGINTERN PyObject *_wrap_CreateGeometryFromWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11697              72 :   PyObject *resultobj = 0;
   11698                 :   int arg1 ;
   11699              72 :   char *arg2 = (char *) 0 ;
   11700              72 :   OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
   11701              72 :   int alloc1 = 0 ;
   11702              72 :   void *argp3 = 0 ;
   11703              72 :   int res3 = 0 ;
   11704              72 :   PyObject * obj0 = 0 ;
   11705              72 :   PyObject * obj1 = 0 ;
   11706                 :   char *  kwnames[] = {
   11707                 :     (char *) "len",(char *) "reference", NULL 
   11708              72 :   };
   11709              72 :   OGRGeometryShadow *result = 0 ;
   11710                 :   
   11711              72 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CreateGeometryFromWkb",kwnames,&obj0,&obj1)) SWIG_fail;
   11712                 :   {
   11713                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   11714                 : #if PY_VERSION_HEX>=0x03000000
   11715                 :     if (PyUnicode_Check(obj0))
   11716                 :     {
   11717                 :       size_t safeLen = 0;
   11718                 :       int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
   11719                 :       if (!SWIG_IsOK(ret)) {
   11720                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
   11721                 :       }
   11722                 :       
   11723                 :       if (safeLen) safeLen--;
   11724                 :       arg1 = (int) safeLen;
   11725                 :     }
   11726                 :     else if (PyBytes_Check(obj0))
   11727                 :     {
   11728                 :       Py_ssize_t safeLen = 0;
   11729                 :       PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
   11730                 :       arg1 = (int) safeLen;
   11731                 :     }
   11732                 :     else
   11733                 :     {
   11734                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
   11735                 :       SWIG_fail;
   11736                 :     }
   11737                 : #else
   11738              72 :     if (PyString_Check(obj0))
   11739                 :     {
   11740              72 :       Py_ssize_t safeLen = 0;
   11741              72 :       PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
   11742              72 :       arg1 = (int) safeLen;
   11743                 :     }
   11744                 :     else
   11745                 :     {
   11746               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
   11747               0 :       SWIG_fail;
   11748                 :     }
   11749                 : #endif
   11750                 :   }
   11751              72 :   if (obj1) {
   11752               0 :     res3 = SWIG_ConvertPtr(obj1, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   11753               0 :     if (!SWIG_IsOK(res3)) {
   11754               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateGeometryFromWkb" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
   11755                 :     }
   11756               0 :     arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
   11757                 :   }
   11758                 :   {
   11759              72 :     if ( bUseExceptions ) {
   11760               0 :       CPLErrorReset();
   11761                 :     }
   11762              72 :     result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2,arg3);
   11763              72 :     if ( bUseExceptions ) {
   11764               0 :       CPLErr eclass = CPLGetLastErrorType();
   11765               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11766               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11767                 :       }
   11768                 :     }
   11769                 :   }
   11770              72 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   11771                 :   {
   11772                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   11773              72 :     if( alloc1 == SWIG_NEWOBJ ) {
   11774               0 :       delete[] arg2;
   11775                 :     }
   11776                 :   }
   11777              72 :   return resultobj;
   11778                 : fail:
   11779                 :   {
   11780                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   11781               0 :     if( alloc1 == SWIG_NEWOBJ ) {
   11782               0 :       delete[] arg2;
   11783                 :     }
   11784                 :   }
   11785               0 :   return NULL;
   11786                 : }
   11787                 : 
   11788                 : 
   11789           16497 : SWIGINTERN PyObject *_wrap_CreateGeometryFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11790           16497 :   PyObject *resultobj = 0;
   11791           16497 :   char **arg1 = (char **) 0 ;
   11792           16497 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ;
   11793                 :   char *val1 ;
   11794           16497 :   void *argp2 = 0 ;
   11795           16497 :   int res2 = 0 ;
   11796           16497 :   PyObject * obj0 = 0 ;
   11797           16497 :   PyObject * obj1 = 0 ;
   11798                 :   char *  kwnames[] = {
   11799                 :     (char *) "val",(char *) "reference", NULL 
   11800           16497 :   };
   11801           16497 :   OGRGeometryShadow *result = 0 ;
   11802                 :   
   11803           16497 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CreateGeometryFromWkt",kwnames,&obj0,&obj1)) SWIG_fail;
   11804                 :   {
   11805                 :     /* %typemap(in) (char **ignorechange) */
   11806           16497 :     PyArg_Parse( obj0, "s", &val1 );
   11807           16497 :     arg1 = &val1;
   11808                 :   }
   11809           16497 :   if (obj1) {
   11810               9 :     res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   11811               9 :     if (!SWIG_IsOK(res2)) {
   11812               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateGeometryFromWkt" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   11813                 :     }
   11814               9 :     arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   11815                 :   }
   11816                 :   {
   11817           16497 :     if ( bUseExceptions ) {
   11818               0 :       CPLErrorReset();
   11819                 :     }
   11820           16497 :     result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
   11821           16497 :     if ( bUseExceptions ) {
   11822               0 :       CPLErr eclass = CPLGetLastErrorType();
   11823               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11824               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11825                 :       }
   11826                 :     }
   11827                 :   }
   11828           16497 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   11829           16497 :   return resultobj;
   11830                 : fail:
   11831               0 :   return NULL;
   11832                 : }
   11833                 : 
   11834                 : 
   11835             153 : SWIGINTERN PyObject *_wrap_CreateGeometryFromGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11836             153 :   PyObject *resultobj = 0;
   11837             153 :   char *arg1 = (char *) 0 ;
   11838                 :   int res1 ;
   11839             153 :   char *buf1 = 0 ;
   11840             153 :   int alloc1 = 0 ;
   11841             153 :   PyObject * obj0 = 0 ;
   11842             153 :   OGRGeometryShadow *result = 0 ;
   11843                 :   
   11844             153 :   if (!PyArg_ParseTuple(args,(char *)"O:CreateGeometryFromGML",&obj0)) SWIG_fail;
   11845             153 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   11846             153 :   if (!SWIG_IsOK(res1)) {
   11847               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromGML" "', argument " "1"" of type '" "char const *""'");
   11848                 :   }
   11849             153 :   arg1 = reinterpret_cast< char * >(buf1);
   11850                 :   {
   11851             153 :     if ( bUseExceptions ) {
   11852               0 :       CPLErrorReset();
   11853                 :     }
   11854             153 :     result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1);
   11855             153 :     if ( bUseExceptions ) {
   11856               0 :       CPLErr eclass = CPLGetLastErrorType();
   11857               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11858               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11859                 :       }
   11860                 :     }
   11861                 :   }
   11862             153 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   11863             153 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11864             153 :   return resultobj;
   11865                 : fail:
   11866               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11867               0 :   return NULL;
   11868                 : }
   11869                 : 
   11870                 : 
   11871               0 : SWIGINTERN PyObject *_wrap_CreateGeometryFromJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11872               0 :   PyObject *resultobj = 0;
   11873               0 :   char *arg1 = (char *) 0 ;
   11874                 :   int res1 ;
   11875               0 :   char *buf1 = 0 ;
   11876               0 :   int alloc1 = 0 ;
   11877               0 :   PyObject * obj0 = 0 ;
   11878               0 :   OGRGeometryShadow *result = 0 ;
   11879                 :   
   11880               0 :   if (!PyArg_ParseTuple(args,(char *)"O:CreateGeometryFromJson",&obj0)) SWIG_fail;
   11881               0 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   11882               0 :   if (!SWIG_IsOK(res1)) {
   11883               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromJson" "', argument " "1"" of type '" "char const *""'");
   11884                 :   }
   11885               0 :   arg1 = reinterpret_cast< char * >(buf1);
   11886                 :   {
   11887               0 :     if ( bUseExceptions ) {
   11888               0 :       CPLErrorReset();
   11889                 :     }
   11890               0 :     result = (OGRGeometryShadow *)CreateGeometryFromJson((char const *)arg1);
   11891               0 :     if ( bUseExceptions ) {
   11892               0 :       CPLErr eclass = CPLGetLastErrorType();
   11893               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11894               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11895                 :       }
   11896                 :     }
   11897                 :   }
   11898               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   11899               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11900               0 :   return resultobj;
   11901                 : fail:
   11902               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11903               0 :   return NULL;
   11904                 : }
   11905                 : 
   11906                 : 
   11907               5 : SWIGINTERN PyObject *_wrap_BuildPolygonFromEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11908               5 :   PyObject *resultobj = 0;
   11909               5 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   11910               5 :   int arg2 = (int) 0 ;
   11911               5 :   int arg3 = (int) 0 ;
   11912               5 :   double arg4 = (double) 0 ;
   11913               5 :   void *argp1 = 0 ;
   11914               5 :   int res1 = 0 ;
   11915                 :   int val2 ;
   11916               5 :   int ecode2 = 0 ;
   11917                 :   int val3 ;
   11918               5 :   int ecode3 = 0 ;
   11919                 :   double val4 ;
   11920               5 :   int ecode4 = 0 ;
   11921               5 :   PyObject * obj0 = 0 ;
   11922               5 :   PyObject * obj1 = 0 ;
   11923               5 :   PyObject * obj2 = 0 ;
   11924               5 :   PyObject * obj3 = 0 ;
   11925                 :   char *  kwnames[] = {
   11926                 :     (char *) "hLineCollection",(char *) "bBestEffort",(char *) "bAutoClose",(char *) "dfTolerance", NULL 
   11927               5 :   };
   11928               5 :   OGRGeometryShadow *result = 0 ;
   11929                 :   
   11930               5 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:BuildPolygonFromEdges",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   11931               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   11932               5 :   if (!SWIG_IsOK(res1)) {
   11933               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BuildPolygonFromEdges" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   11934                 :   }
   11935               5 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   11936               5 :   if (obj1) {
   11937               0 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   11938               0 :     if (!SWIG_IsOK(ecode2)) {
   11939               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BuildPolygonFromEdges" "', argument " "2"" of type '" "int""'");
   11940                 :     } 
   11941               0 :     arg2 = static_cast< int >(val2);
   11942                 :   }
   11943               5 :   if (obj2) {
   11944               0 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   11945               0 :     if (!SWIG_IsOK(ecode3)) {
   11946               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BuildPolygonFromEdges" "', argument " "3"" of type '" "int""'");
   11947                 :     } 
   11948               0 :     arg3 = static_cast< int >(val3);
   11949                 :   }
   11950               5 :   if (obj3) {
   11951               0 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
   11952               0 :     if (!SWIG_IsOK(ecode4)) {
   11953               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BuildPolygonFromEdges" "', argument " "4"" of type '" "double""'");
   11954                 :     } 
   11955               0 :     arg4 = static_cast< double >(val4);
   11956                 :   }
   11957                 :   {
   11958               5 :     if ( bUseExceptions ) {
   11959               0 :       CPLErrorReset();
   11960                 :     }
   11961               5 :     result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3,arg4);
   11962               5 :     if ( bUseExceptions ) {
   11963               0 :       CPLErr eclass = CPLGetLastErrorType();
   11964               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11965               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11966                 :       }
   11967                 :     }
   11968                 :   }
   11969               5 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   11970               5 :   return resultobj;
   11971                 : fail:
   11972               0 :   return NULL;
   11973                 : }
   11974                 : 
   11975                 : 
   11976               1 : SWIGINTERN PyObject *_wrap_ApproximateArcAngles(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11977               1 :   PyObject *resultobj = 0;
   11978                 :   double arg1 ;
   11979                 :   double arg2 ;
   11980                 :   double arg3 ;
   11981                 :   double arg4 ;
   11982                 :   double arg5 ;
   11983                 :   double arg6 ;
   11984                 :   double arg7 ;
   11985                 :   double arg8 ;
   11986                 :   double arg9 ;
   11987                 :   double val1 ;
   11988               1 :   int ecode1 = 0 ;
   11989                 :   double val2 ;
   11990               1 :   int ecode2 = 0 ;
   11991                 :   double val3 ;
   11992               1 :   int ecode3 = 0 ;
   11993                 :   double val4 ;
   11994               1 :   int ecode4 = 0 ;
   11995                 :   double val5 ;
   11996               1 :   int ecode5 = 0 ;
   11997                 :   double val6 ;
   11998               1 :   int ecode6 = 0 ;
   11999                 :   double val7 ;
   12000               1 :   int ecode7 = 0 ;
   12001                 :   double val8 ;
   12002               1 :   int ecode8 = 0 ;
   12003                 :   double val9 ;
   12004               1 :   int ecode9 = 0 ;
   12005               1 :   PyObject * obj0 = 0 ;
   12006               1 :   PyObject * obj1 = 0 ;
   12007               1 :   PyObject * obj2 = 0 ;
   12008               1 :   PyObject * obj3 = 0 ;
   12009               1 :   PyObject * obj4 = 0 ;
   12010               1 :   PyObject * obj5 = 0 ;
   12011               1 :   PyObject * obj6 = 0 ;
   12012               1 :   PyObject * obj7 = 0 ;
   12013               1 :   PyObject * obj8 = 0 ;
   12014                 :   char *  kwnames[] = {
   12015                 :     (char *) "dfCenterX",(char *) "dfCenterY",(char *) "dfZ",(char *) "dfPrimaryRadius",(char *) "dfSecondaryAxis",(char *) "dfRotation",(char *) "dfStartAngle",(char *) "dfEndAngle",(char *) "dfMaxAngleStepSizeDegrees", NULL 
   12016               1 :   };
   12017               1 :   OGRGeometryShadow *result = 0 ;
   12018                 :   
   12019               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOO:ApproximateArcAngles",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
   12020               1 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   12021               1 :   if (!SWIG_IsOK(ecode1)) {
   12022               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ApproximateArcAngles" "', argument " "1"" of type '" "double""'");
   12023                 :   } 
   12024               1 :   arg1 = static_cast< double >(val1);
   12025               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   12026               1 :   if (!SWIG_IsOK(ecode2)) {
   12027               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApproximateArcAngles" "', argument " "2"" of type '" "double""'");
   12028                 :   } 
   12029               1 :   arg2 = static_cast< double >(val2);
   12030               1 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   12031               1 :   if (!SWIG_IsOK(ecode3)) {
   12032               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApproximateArcAngles" "', argument " "3"" of type '" "double""'");
   12033                 :   } 
   12034               1 :   arg3 = static_cast< double >(val3);
   12035               1 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   12036               1 :   if (!SWIG_IsOK(ecode4)) {
   12037               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ApproximateArcAngles" "', argument " "4"" of type '" "double""'");
   12038                 :   } 
   12039               1 :   arg4 = static_cast< double >(val4);
   12040               1 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   12041               1 :   if (!SWIG_IsOK(ecode5)) {
   12042               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ApproximateArcAngles" "', argument " "5"" of type '" "double""'");
   12043                 :   } 
   12044               1 :   arg5 = static_cast< double >(val5);
   12045               1 :   ecode6 = SWIG_AsVal_double(obj5, &val6);
   12046               1 :   if (!SWIG_IsOK(ecode6)) {
   12047               0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ApproximateArcAngles" "', argument " "6"" of type '" "double""'");
   12048                 :   } 
   12049               1 :   arg6 = static_cast< double >(val6);
   12050               1 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   12051               1 :   if (!SWIG_IsOK(ecode7)) {
   12052               0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ApproximateArcAngles" "', argument " "7"" of type '" "double""'");
   12053                 :   } 
   12054               1 :   arg7 = static_cast< double >(val7);
   12055               1 :   ecode8 = SWIG_AsVal_double(obj7, &val8);
   12056               1 :   if (!SWIG_IsOK(ecode8)) {
   12057               0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ApproximateArcAngles" "', argument " "8"" of type '" "double""'");
   12058                 :   } 
   12059               1 :   arg8 = static_cast< double >(val8);
   12060               1 :   ecode9 = SWIG_AsVal_double(obj8, &val9);
   12061               1 :   if (!SWIG_IsOK(ecode9)) {
   12062               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ApproximateArcAngles" "', argument " "9"" of type '" "double""'");
   12063                 :   } 
   12064               1 :   arg9 = static_cast< double >(val9);
   12065                 :   {
   12066               1 :     if ( bUseExceptions ) {
   12067               0 :       CPLErrorReset();
   12068                 :     }
   12069               1 :     result = (OGRGeometryShadow *)ApproximateArcAngles(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   12070               1 :     if ( bUseExceptions ) {
   12071               0 :       CPLErr eclass = CPLGetLastErrorType();
   12072               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12073               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12074                 :       }
   12075                 :     }
   12076                 :   }
   12077               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   12078               1 :   return resultobj;
   12079                 : fail:
   12080               0 :   return NULL;
   12081                 : }
   12082                 : 
   12083                 : 
   12084              36 : SWIGINTERN PyObject *_wrap_ForceToPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12085              36 :   PyObject *resultobj = 0;
   12086              36 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12087              36 :   void *argp1 = 0 ;
   12088              36 :   int res1 = 0 ;
   12089              36 :   PyObject * obj0 = 0 ;
   12090              36 :   OGRGeometryShadow *result = 0 ;
   12091                 :   
   12092              36 :   if (!PyArg_ParseTuple(args,(char *)"O:ForceToPolygon",&obj0)) SWIG_fail;
   12093              36 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12094              36 :   if (!SWIG_IsOK(res1)) {
   12095               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12096                 :   }
   12097              36 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12098                 :   {
   12099              36 :     if ( bUseExceptions ) {
   12100               0 :       CPLErrorReset();
   12101                 :     }
   12102              36 :     result = (OGRGeometryShadow *)ForceToPolygon(arg1);
   12103              36 :     if ( bUseExceptions ) {
   12104               0 :       CPLErr eclass = CPLGetLastErrorType();
   12105               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12106               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12107                 :       }
   12108                 :     }
   12109                 :   }
   12110              36 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   12111              36 :   return resultobj;
   12112                 : fail:
   12113               0 :   return NULL;
   12114                 : }
   12115                 : 
   12116                 : 
   12117              31 : SWIGINTERN PyObject *_wrap_ForceToMultiPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12118              31 :   PyObject *resultobj = 0;
   12119              31 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12120              31 :   void *argp1 = 0 ;
   12121              31 :   int res1 = 0 ;
   12122              31 :   PyObject * obj0 = 0 ;
   12123              31 :   OGRGeometryShadow *result = 0 ;
   12124                 :   
   12125              31 :   if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiPolygon",&obj0)) SWIG_fail;
   12126              31 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12127              31 :   if (!SWIG_IsOK(res1)) {
   12128               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12129                 :   }
   12130              31 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12131                 :   {
   12132              31 :     if ( bUseExceptions ) {
   12133               0 :       CPLErrorReset();
   12134                 :     }
   12135              31 :     result = (OGRGeometryShadow *)ForceToMultiPolygon(arg1);
   12136              31 :     if ( bUseExceptions ) {
   12137               0 :       CPLErr eclass = CPLGetLastErrorType();
   12138               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12139               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12140                 :       }
   12141                 :     }
   12142                 :   }
   12143              31 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   12144              31 :   return resultobj;
   12145                 : fail:
   12146               0 :   return NULL;
   12147                 : }
   12148                 : 
   12149                 : 
   12150              27 : SWIGINTERN PyObject *_wrap_ForceToMultiPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12151              27 :   PyObject *resultobj = 0;
   12152              27 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12153              27 :   void *argp1 = 0 ;
   12154              27 :   int res1 = 0 ;
   12155              27 :   PyObject * obj0 = 0 ;
   12156              27 :   OGRGeometryShadow *result = 0 ;
   12157                 :   
   12158              27 :   if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiPoint",&obj0)) SWIG_fail;
   12159              27 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12160              27 :   if (!SWIG_IsOK(res1)) {
   12161               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12162                 :   }
   12163              27 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12164                 :   {
   12165              27 :     if ( bUseExceptions ) {
   12166               0 :       CPLErrorReset();
   12167                 :     }
   12168              27 :     result = (OGRGeometryShadow *)ForceToMultiPoint(arg1);
   12169              27 :     if ( bUseExceptions ) {
   12170               0 :       CPLErr eclass = CPLGetLastErrorType();
   12171               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12172               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12173                 :       }
   12174                 :     }
   12175                 :   }
   12176              27 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   12177              27 :   return resultobj;
   12178                 : fail:
   12179               0 :   return NULL;
   12180                 : }
   12181                 : 
   12182                 : 
   12183              29 : SWIGINTERN PyObject *_wrap_ForceToMultiLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12184              29 :   PyObject *resultobj = 0;
   12185              29 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12186              29 :   void *argp1 = 0 ;
   12187              29 :   int res1 = 0 ;
   12188              29 :   PyObject * obj0 = 0 ;
   12189              29 :   OGRGeometryShadow *result = 0 ;
   12190                 :   
   12191              29 :   if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiLineString",&obj0)) SWIG_fail;
   12192              29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12193              29 :   if (!SWIG_IsOK(res1)) {
   12194               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiLineString" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12195                 :   }
   12196              29 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12197                 :   {
   12198              29 :     if ( bUseExceptions ) {
   12199               0 :       CPLErrorReset();
   12200                 :     }
   12201              29 :     result = (OGRGeometryShadow *)ForceToMultiLineString(arg1);
   12202              29 :     if ( bUseExceptions ) {
   12203               0 :       CPLErr eclass = CPLGetLastErrorType();
   12204               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12205               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12206                 :       }
   12207                 :     }
   12208                 :   }
   12209              29 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   12210              29 :   return resultobj;
   12211                 : fail:
   12212               0 :   return NULL;
   12213                 : }
   12214                 : 
   12215                 : 
   12216           17461 : SWIGINTERN PyObject *_wrap_delete_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12217           17461 :   PyObject *resultobj = 0;
   12218           17461 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12219           17461 :   void *argp1 = 0 ;
   12220           17461 :   int res1 = 0 ;
   12221           17461 :   PyObject * obj0 = 0 ;
   12222                 :   
   12223           17461 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_Geometry",&obj0)) SWIG_fail;
   12224           17461 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
   12225           17461 :   if (!SWIG_IsOK(res1)) {
   12226               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Geometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12227                 :   }
   12228           17461 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12229                 :   {
   12230           17461 :     if ( bUseExceptions ) {
   12231               0 :       CPLErrorReset();
   12232                 :     }
   12233                 :     delete_OGRGeometryShadow(arg1);
   12234           17461 :     if ( bUseExceptions ) {
   12235               0 :       CPLErr eclass = CPLGetLastErrorType();
   12236               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12237               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12238                 :       }
   12239                 :     }
   12240                 :   }
   12241           17461 :   resultobj = SWIG_Py_Void();
   12242           17461 :   return resultobj;
   12243                 : fail:
   12244               0 :   return NULL;
   12245                 : }
   12246                 : 
   12247                 : 
   12248              51 : SWIGINTERN PyObject *_wrap_new_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12249              51 :   PyObject *resultobj = 0;
   12250              51 :   OGRwkbGeometryType arg1 = (OGRwkbGeometryType) wkbUnknown ;
   12251              51 :   char *arg2 = (char *) 0 ;
   12252              51 :   int arg3 = (int) 0 ;
   12253              51 :   char *arg4 = (char *) 0 ;
   12254              51 :   char *arg5 = (char *) 0 ;
   12255                 :   int val1 ;
   12256              51 :   int ecode1 = 0 ;
   12257                 :   int res2 ;
   12258              51 :   char *buf2 = 0 ;
   12259              51 :   int alloc2 = 0 ;
   12260              51 :   int alloc3 = 0 ;
   12261                 :   int res5 ;
   12262              51 :   char *buf5 = 0 ;
   12263              51 :   int alloc5 = 0 ;
   12264              51 :   PyObject * obj0 = 0 ;
   12265              51 :   PyObject * obj1 = 0 ;
   12266              51 :   PyObject * obj2 = 0 ;
   12267              51 :   PyObject * obj3 = 0 ;
   12268                 :   char *  kwnames[] = {
   12269                 :     (char *) "type",(char *) "wkt",(char *) "wkb",(char *) "gml", NULL 
   12270              51 :   };
   12271              51 :   OGRGeometryShadow *result = 0 ;
   12272                 :   
   12273              51 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_Geometry",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   12274              51 :   if (obj0) {
   12275              36 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
   12276              36 :     if (!SWIG_IsOK(ecode1)) {
   12277               0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Geometry" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
   12278                 :     } 
   12279              36 :     arg1 = static_cast< OGRwkbGeometryType >(val1);
   12280                 :   }
   12281              51 :   if (obj1) {
   12282              14 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   12283              14 :     if (!SWIG_IsOK(res2)) {
   12284               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "char *""'");
   12285                 :     }
   12286              14 :     arg2 = reinterpret_cast< char * >(buf2);
   12287                 :   }
   12288              51 :   if (obj2) {
   12289                 :     {
   12290                 :       /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   12291                 : #if PY_VERSION_HEX>=0x03000000
   12292                 :       if (PyUnicode_Check(obj2))
   12293                 :       {
   12294                 :         size_t safeLen = 0;
   12295                 :         int ret = SWIG_AsCharPtrAndSize(obj2, (char**) &arg4, &safeLen, &alloc3);
   12296                 :         if (!SWIG_IsOK(ret)) {
   12297                 :           SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
   12298                 :         }
   12299                 :         
   12300                 :         if (safeLen) safeLen--;
   12301                 :         arg3 = (int) safeLen;
   12302                 :       }
   12303                 :       else if (PyBytes_Check(obj2))
   12304                 :       {
   12305                 :         Py_ssize_t safeLen = 0;
   12306                 :         PyBytes_AsStringAndSize(obj2, (char**) &arg4, &safeLen);
   12307                 :         arg3 = (int) safeLen;
   12308                 :       }
   12309                 :       else
   12310                 :       {
   12311                 :         PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
   12312                 :         SWIG_fail;
   12313                 :       }
   12314                 : #else
   12315               0 :       if (PyString_Check(obj2))
   12316                 :       {
   12317               0 :         Py_ssize_t safeLen = 0;
   12318               0 :         PyString_AsStringAndSize(obj2, (char**) &arg4, &safeLen);
   12319               0 :         arg3 = (int) safeLen;
   12320                 :       }
   12321                 :       else
   12322                 :       {
   12323               0 :         PyErr_SetString(PyExc_TypeError, "not a string");
   12324               0 :         SWIG_fail;
   12325                 :       }
   12326                 : #endif
   12327                 :     }
   12328                 :   }
   12329              51 :   if (obj3) {
   12330               0 :     res5 = SWIG_AsCharPtrAndSize(obj3, &buf5, NULL, &alloc5);
   12331               0 :     if (!SWIG_IsOK(res5)) {
   12332               0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Geometry" "', argument " "5"" of type '" "char *""'");
   12333                 :     }
   12334               0 :     arg5 = reinterpret_cast< char * >(buf5);
   12335                 :   }
   12336                 :   {
   12337              51 :     if ( bUseExceptions ) {
   12338               0 :       CPLErrorReset();
   12339                 :     }
   12340             102 :     result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
   12341              51 :     if ( bUseExceptions ) {
   12342               0 :       CPLErr eclass = CPLGetLastErrorType();
   12343               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12344               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12345                 :       }
   12346                 :     }
   12347                 :   }
   12348              51 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_NEW |  0 );
   12349              51 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12350                 :   {
   12351                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12352              51 :     if( alloc3 == SWIG_NEWOBJ ) {
   12353               0 :       delete[] arg4;
   12354                 :     }
   12355                 :   }
   12356              51 :   if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
   12357              51 :   return resultobj;
   12358                 : fail:
   12359               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12360                 :   {
   12361                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12362               0 :     if( alloc3 == SWIG_NEWOBJ ) {
   12363               0 :       delete[] arg4;
   12364                 :     }
   12365                 :   }
   12366               0 :   if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
   12367               0 :   return NULL;
   12368                 : }
   12369                 : 
   12370                 : 
   12371            1116 : SWIGINTERN PyObject *_wrap_Geometry_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12372            1116 :   PyObject *resultobj = 0;
   12373            1116 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12374            1116 :   char **arg2 = (char **) 0 ;
   12375            1116 :   void *argp1 = 0 ;
   12376            1116 :   int res1 = 0 ;
   12377            1116 :   char *argout2 = 0 ;
   12378            1116 :   PyObject * obj0 = 0 ;
   12379                 :   OGRErr result;
   12380                 :   
   12381                 :   {
   12382                 :     /* %typemap(in,numinputs=0) (char **argout2) */
   12383            1116 :     arg2 = &argout2;
   12384                 :   }
   12385            1116 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_ExportToWkt",&obj0)) SWIG_fail;
   12386            1116 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12387            1116 :   if (!SWIG_IsOK(res1)) {
   12388               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkt" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12389                 :   }
   12390            1116 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12391                 :   {
   12392            1116 :     if ( bUseExceptions ) {
   12393               0 :       CPLErrorReset();
   12394                 :     }
   12395            1116 :     result = (OGRErr)OGRGeometryShadow_ExportToWkt(arg1,arg2);
   12396            1116 :     if ( bUseExceptions ) {
   12397               0 :       CPLErr eclass = CPLGetLastErrorType();
   12398               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12399               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12400                 :       }
   12401                 :     }
   12402                 :   }
   12403                 :   {
   12404                 :     /* %typemap(out) OGRErr */
   12405            1116 :     if ( result != 0 && bUseExceptions) {
   12406               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   12407               0 :       SWIG_fail;
   12408                 :     }
   12409                 :   }
   12410                 :   {
   12411                 :     /* %typemap(argout) (char **argout) */
   12412                 :     PyObject *o;
   12413            2232 :     if ( arg2 != NULL && *arg2 != NULL) {
   12414            1116 :       o = GDALPythonObjectFromCStr( *arg2 );
   12415                 :     }
   12416                 :     else {
   12417               0 :       o = Py_None;
   12418               0 :       Py_INCREF( o );
   12419                 :     }
   12420            1116 :     resultobj = t_output_helper(resultobj, o);
   12421                 :   }
   12422                 :   {
   12423                 :     /* %typemap(freearg) (char **argout) */
   12424            1116 :     if ( *arg2 )
   12425            1116 :     CPLFree( *arg2 );
   12426                 :   }
   12427                 :   {
   12428                 :     /* %typemap(ret) OGRErr */
   12429            1116 :     if (resultobj == Py_None ) {
   12430               0 :       Py_DECREF(resultobj);
   12431               0 :       resultobj = 0;
   12432                 :     }
   12433            1116 :     if (resultobj == 0) {
   12434               0 :       resultobj = PyInt_FromLong( result );
   12435                 :     }
   12436                 :   }
   12437            1116 :   return resultobj;
   12438                 : fail:
   12439                 :   {
   12440                 :     /* %typemap(freearg) (char **argout) */
   12441               0 :     if ( *arg2 )
   12442               0 :     CPLFree( *arg2 );
   12443                 :   }
   12444               0 :   return NULL;
   12445                 : }
   12446                 : 
   12447                 : 
   12448              57 : SWIGINTERN PyObject *_wrap_Geometry_ExportToWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12449              57 :   PyObject *resultobj = 0;
   12450              57 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12451              57 :   int *arg2 = (int *) 0 ;
   12452              57 :   char **arg3 = (char **) 0 ;
   12453              57 :   OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbXDR ;
   12454              57 :   void *argp1 = 0 ;
   12455              57 :   int res1 = 0 ;
   12456              57 :   int nLen2 = 0 ;
   12457              57 :   char *pBuf2 = 0 ;
   12458                 :   int val4 ;
   12459              57 :   int ecode4 = 0 ;
   12460              57 :   PyObject * obj0 = 0 ;
   12461              57 :   PyObject * obj1 = 0 ;
   12462                 :   char *  kwnames[] = {
   12463                 :     (char *) "self",(char *) "byte_order", NULL 
   12464              57 :   };
   12465                 :   OGRErr result;
   12466                 :   
   12467                 :   {
   12468                 :     /* %typemap(in,numinputs=0) (int *nLen2, char **pBuf2 ) */
   12469              57 :     arg2 = &nLen2;
   12470              57 :     arg3 = &pBuf2;
   12471                 :   }
   12472              57 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToWkb",kwnames,&obj0,&obj1)) SWIG_fail;
   12473              57 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12474              57 :   if (!SWIG_IsOK(res1)) {
   12475               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkb" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12476                 :   }
   12477              57 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12478              57 :   if (obj1) {
   12479              36 :     ecode4 = SWIG_AsVal_int(obj1, &val4);
   12480              36 :     if (!SWIG_IsOK(ecode4)) {
   12481               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_ExportToWkb" "', argument " "4"" of type '" "OGRwkbByteOrder""'");
   12482                 :     } 
   12483              36 :     arg4 = static_cast< OGRwkbByteOrder >(val4);
   12484                 :   }
   12485                 :   {
   12486              57 :     if ( bUseExceptions ) {
   12487               0 :       CPLErrorReset();
   12488                 :     }
   12489              57 :     result = (OGRErr)OGRGeometryShadow_ExportToWkb(arg1,arg2,arg3,arg4);
   12490              57 :     if ( bUseExceptions ) {
   12491               0 :       CPLErr eclass = CPLGetLastErrorType();
   12492               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12493               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12494                 :       }
   12495                 :     }
   12496                 :   }
   12497                 :   {
   12498                 :     /* %typemap(out) OGRErr */
   12499              57 :     if ( result != 0 && bUseExceptions) {
   12500               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   12501               0 :       SWIG_fail;
   12502                 :     }
   12503                 :   }
   12504                 :   {
   12505                 :     /* %typemap(argout) (int *nLen, char **pBuf ) */
   12506              57 :     Py_XDECREF(resultobj);
   12507                 : #if PY_VERSION_HEX >= 0x03000000
   12508                 :     resultobj = PyBytes_FromStringAndSize( *arg3, *arg2 );
   12509                 : #else
   12510              57 :     resultobj = PyString_FromStringAndSize( *arg3, *arg2 );
   12511                 : #endif
   12512                 :   }
   12513                 :   {
   12514                 :     /* %typemap(freearg) (int *nLen, char **pBuf ) */
   12515              57 :     if( *arg2 ) {
   12516              57 :       free( *arg3 );
   12517                 :     }
   12518                 :   }
   12519                 :   {
   12520                 :     /* %typemap(ret) OGRErr */
   12521              57 :     if (resultobj == Py_None ) {
   12522               0 :       Py_DECREF(resultobj);
   12523               0 :       resultobj = 0;
   12524                 :     }
   12525              57 :     if (resultobj == 0) {
   12526               0 :       resultobj = PyInt_FromLong( result );
   12527                 :     }
   12528                 :   }
   12529              57 :   return resultobj;
   12530                 : fail:
   12531                 :   {
   12532                 :     /* %typemap(freearg) (int *nLen, char **pBuf ) */
   12533               0 :     if( *arg2 ) {
   12534               0 :       free( *arg3 );
   12535                 :     }
   12536                 :   }
   12537               0 :   return NULL;
   12538                 : }
   12539                 : 
   12540                 : 
   12541              41 : SWIGINTERN PyObject *_wrap_Geometry_ExportToGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12542              41 :   PyObject *resultobj = 0;
   12543              41 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12544              41 :   char **arg2 = (char **) 0 ;
   12545              41 :   void *argp1 = 0 ;
   12546              41 :   int res1 = 0 ;
   12547              41 :   PyObject * obj0 = 0 ;
   12548              41 :   PyObject * obj1 = 0 ;
   12549                 :   char *  kwnames[] = {
   12550                 :     (char *) "self",(char *) "options", NULL 
   12551              41 :   };
   12552              41 :   retStringAndCPLFree *result = 0 ;
   12553                 :   
   12554              41 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToGML",kwnames,&obj0,&obj1)) SWIG_fail;
   12555              41 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12556              41 :   if (!SWIG_IsOK(res1)) {
   12557               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToGML" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12558                 :   }
   12559              41 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12560              41 :   if (obj1) {
   12561                 :     {
   12562                 :       /* %typemap(in) char **options */
   12563                 :       /* Check if is a list */
   12564              17 :       if ( ! PySequence_Check(obj1)) {
   12565               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   12566               0 :         SWIG_fail;
   12567                 :       }
   12568                 :       
   12569              17 :       int size = PySequence_Size(obj1);
   12570              38 :       for (int i = 0; i < size; i++) {
   12571              21 :         PyObject* pyObj = PySequence_GetItem(obj1,i);
   12572              21 :         if (PyUnicode_Check(pyObj))
   12573                 :         {
   12574                 :           char *pszStr;
   12575                 :           Py_ssize_t nLen;
   12576               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   12577                 : #if PY_VERSION_HEX >= 0x03000000
   12578                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12579                 : #else
   12580               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12581                 : #endif
   12582               0 :           arg2 = CSLAddString( arg2, pszStr );
   12583               0 :           Py_XDECREF(pyUTF8Str);
   12584                 :         }
   12585                 : #if PY_VERSION_HEX >= 0x03000000
   12586                 :         else if (PyBytes_Check(pyObj))
   12587                 :         arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   12588                 : #else
   12589              21 :         else if (PyString_Check(pyObj))
   12590              21 :         arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   12591                 : #endif
   12592                 :         else
   12593                 :         {
   12594               0 :           Py_DECREF(pyObj);
   12595               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   12596               0 :           SWIG_fail;
   12597                 :         }
   12598              21 :         Py_DECREF(pyObj);
   12599                 :       }
   12600                 :     }
   12601                 :   }
   12602                 :   {
   12603              41 :     if ( bUseExceptions ) {
   12604               0 :       CPLErrorReset();
   12605                 :     }
   12606              41 :     result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML(arg1,arg2);
   12607              41 :     if ( bUseExceptions ) {
   12608               0 :       CPLErr eclass = CPLGetLastErrorType();
   12609               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12610               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12611                 :       }
   12612                 :     }
   12613                 :   }
   12614                 :   {
   12615                 :     /* %typemap(out) (retStringAndCPLFree*) */
   12616              41 :     if(result)
   12617                 :     {
   12618              41 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   12619              41 :       CPLFree(result);
   12620                 :     }
   12621                 :   }
   12622                 :   {
   12623                 :     /* %typemap(freearg) char **options */
   12624              41 :     CSLDestroy( arg2 );
   12625                 :   }
   12626              41 :   return resultobj;
   12627                 : fail:
   12628                 :   {
   12629                 :     /* %typemap(freearg) char **options */
   12630               0 :     CSLDestroy( arg2 );
   12631                 :   }
   12632               0 :   return NULL;
   12633                 : }
   12634                 : 
   12635                 : 
   12636               0 : SWIGINTERN PyObject *_wrap_Geometry_ExportToKML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12637               0 :   PyObject *resultobj = 0;
   12638               0 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12639               0 :   char *arg2 = (char *) NULL ;
   12640               0 :   void *argp1 = 0 ;
   12641               0 :   int res1 = 0 ;
   12642                 :   int res2 ;
   12643               0 :   char *buf2 = 0 ;
   12644               0 :   int alloc2 = 0 ;
   12645               0 :   PyObject * obj0 = 0 ;
   12646               0 :   PyObject * obj1 = 0 ;
   12647               0 :   retStringAndCPLFree *result = 0 ;
   12648                 :   
   12649               0 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_ExportToKML",&obj0,&obj1)) SWIG_fail;
   12650               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12651               0 :   if (!SWIG_IsOK(res1)) {
   12652               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToKML" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12653                 :   }
   12654               0 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12655               0 :   if (obj1) {
   12656               0 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   12657               0 :     if (!SWIG_IsOK(res2)) {
   12658               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_ExportToKML" "', argument " "2"" of type '" "char const *""'");
   12659                 :     }
   12660               0 :     arg2 = reinterpret_cast< char * >(buf2);
   12661                 :   }
   12662                 :   {
   12663               0 :     if ( bUseExceptions ) {
   12664               0 :       CPLErrorReset();
   12665                 :     }
   12666               0 :     result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToKML(arg1,(char const *)arg2);
   12667               0 :     if ( bUseExceptions ) {
   12668               0 :       CPLErr eclass = CPLGetLastErrorType();
   12669               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12670               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12671                 :       }
   12672                 :     }
   12673                 :   }
   12674                 :   {
   12675                 :     /* %typemap(out) (retStringAndCPLFree*) */
   12676               0 :     if(result)
   12677                 :     {
   12678               0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   12679               0 :       CPLFree(result);
   12680                 :     }
   12681                 :   }
   12682               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12683               0 :   return resultobj;
   12684                 : fail:
   12685               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12686               0 :   return NULL;
   12687                 : }
   12688                 : 
   12689                 : 
   12690               2 : SWIGINTERN PyObject *_wrap_Geometry_ExportToJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12691               2 :   PyObject *resultobj = 0;
   12692               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12693               2 :   char **arg2 = (char **) 0 ;
   12694               2 :   void *argp1 = 0 ;
   12695               2 :   int res1 = 0 ;
   12696               2 :   PyObject * obj0 = 0 ;
   12697               2 :   PyObject * obj1 = 0 ;
   12698                 :   char *  kwnames[] = {
   12699                 :     (char *) "self",(char *) "options", NULL 
   12700               2 :   };
   12701               2 :   retStringAndCPLFree *result = 0 ;
   12702                 :   
   12703               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToJson",kwnames,&obj0,&obj1)) SWIG_fail;
   12704               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12705               2 :   if (!SWIG_IsOK(res1)) {
   12706               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToJson" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12707                 :   }
   12708               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12709               2 :   if (obj1) {
   12710                 :     {
   12711                 :       /* %typemap(in) char **options */
   12712                 :       /* Check if is a list */
   12713               2 :       if ( ! PySequence_Check(obj1)) {
   12714               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   12715               0 :         SWIG_fail;
   12716                 :       }
   12717                 :       
   12718               2 :       int size = PySequence_Size(obj1);
   12719               2 :       for (int i = 0; i < size; i++) {
   12720               0 :         PyObject* pyObj = PySequence_GetItem(obj1,i);
   12721               0 :         if (PyUnicode_Check(pyObj))
   12722                 :         {
   12723                 :           char *pszStr;
   12724                 :           Py_ssize_t nLen;
   12725               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   12726                 : #if PY_VERSION_HEX >= 0x03000000
   12727                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12728                 : #else
   12729               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12730                 : #endif
   12731               0 :           arg2 = CSLAddString( arg2, pszStr );
   12732               0 :           Py_XDECREF(pyUTF8Str);
   12733                 :         }
   12734                 : #if PY_VERSION_HEX >= 0x03000000
   12735                 :         else if (PyBytes_Check(pyObj))
   12736                 :         arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   12737                 : #else
   12738               0 :         else if (PyString_Check(pyObj))
   12739               0 :         arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   12740                 : #endif
   12741                 :         else
   12742                 :         {
   12743               0 :           Py_DECREF(pyObj);
   12744               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   12745               0 :           SWIG_fail;
   12746                 :         }
   12747               0 :         Py_DECREF(pyObj);
   12748                 :       }
   12749                 :     }
   12750                 :   }
   12751                 :   {
   12752               2 :     if ( bUseExceptions ) {
   12753               0 :       CPLErrorReset();
   12754                 :     }
   12755               2 :     result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson(arg1,arg2);
   12756               2 :     if ( bUseExceptions ) {
   12757               0 :       CPLErr eclass = CPLGetLastErrorType();
   12758               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12759               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12760                 :       }
   12761                 :     }
   12762                 :   }
   12763                 :   {
   12764                 :     /* %typemap(out) (retStringAndCPLFree*) */
   12765               2 :     if(result)
   12766                 :     {
   12767               2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   12768               2 :       CPLFree(result);
   12769                 :     }
   12770                 :   }
   12771                 :   {
   12772                 :     /* %typemap(freearg) char **options */
   12773               2 :     CSLDestroy( arg2 );
   12774                 :   }
   12775               2 :   return resultobj;
   12776                 : fail:
   12777                 :   {
   12778                 :     /* %typemap(freearg) char **options */
   12779               0 :     CSLDestroy( arg2 );
   12780                 :   }
   12781               0 :   return NULL;
   12782                 : }
   12783                 : 
   12784                 : 
   12785              10 : SWIGINTERN PyObject *_wrap_Geometry_AddPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12786              10 :   PyObject *resultobj = 0;
   12787              10 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12788                 :   double arg2 ;
   12789                 :   double arg3 ;
   12790              10 :   double arg4 = (double) 0 ;
   12791              10 :   void *argp1 = 0 ;
   12792              10 :   int res1 = 0 ;
   12793                 :   double val2 ;
   12794              10 :   int ecode2 = 0 ;
   12795                 :   double val3 ;
   12796              10 :   int ecode3 = 0 ;
   12797                 :   double val4 ;
   12798              10 :   int ecode4 = 0 ;
   12799              10 :   PyObject * obj0 = 0 ;
   12800              10 :   PyObject * obj1 = 0 ;
   12801              10 :   PyObject * obj2 = 0 ;
   12802              10 :   PyObject * obj3 = 0 ;
   12803                 :   char *  kwnames[] = {
   12804                 :     (char *) "self",(char *) "x",(char *) "y",(char *) "z", NULL 
   12805              10 :   };
   12806                 :   
   12807              10 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Geometry_AddPoint",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   12808              10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12809              10 :   if (!SWIG_IsOK(res1)) {
   12810               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12811                 :   }
   12812              10 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12813              10 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   12814              10 :   if (!SWIG_IsOK(ecode2)) {
   12815               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint" "', argument " "2"" of type '" "double""'");
   12816                 :   } 
   12817              10 :   arg2 = static_cast< double >(val2);
   12818              10 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   12819              10 :   if (!SWIG_IsOK(ecode3)) {
   12820               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint" "', argument " "3"" of type '" "double""'");
   12821                 :   } 
   12822              10 :   arg3 = static_cast< double >(val3);
   12823              10 :   if (obj3) {
   12824               0 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
   12825               0 :     if (!SWIG_IsOK(ecode4)) {
   12826               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPoint" "', argument " "4"" of type '" "double""'");
   12827                 :     } 
   12828               0 :     arg4 = static_cast< double >(val4);
   12829                 :   }
   12830                 :   {
   12831              10 :     if ( bUseExceptions ) {
   12832               0 :       CPLErrorReset();
   12833                 :     }
   12834                 :     OGRGeometryShadow_AddPoint(arg1,arg2,arg3,arg4);
   12835              10 :     if ( bUseExceptions ) {
   12836               0 :       CPLErr eclass = CPLGetLastErrorType();
   12837               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12838               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12839                 :       }
   12840                 :     }
   12841                 :   }
   12842              10 :   resultobj = SWIG_Py_Void();
   12843              10 :   return resultobj;
   12844                 : fail:
   12845               0 :   return NULL;
   12846                 : }
   12847                 : 
   12848                 : 
   12849              30 : SWIGINTERN PyObject *_wrap_Geometry_AddPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12850              30 :   PyObject *resultobj = 0;
   12851              30 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12852                 :   double arg2 ;
   12853                 :   double arg3 ;
   12854              30 :   void *argp1 = 0 ;
   12855              30 :   int res1 = 0 ;
   12856                 :   double val2 ;
   12857              30 :   int ecode2 = 0 ;
   12858                 :   double val3 ;
   12859              30 :   int ecode3 = 0 ;
   12860              30 :   PyObject * obj0 = 0 ;
   12861              30 :   PyObject * obj1 = 0 ;
   12862              30 :   PyObject * obj2 = 0 ;
   12863                 :   
   12864              30 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Geometry_AddPoint_2D",&obj0,&obj1,&obj2)) SWIG_fail;
   12865              30 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12866              30 :   if (!SWIG_IsOK(res1)) {
   12867               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12868                 :   }
   12869              30 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12870              30 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   12871              30 :   if (!SWIG_IsOK(ecode2)) {
   12872               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint_2D" "', argument " "2"" of type '" "double""'");
   12873                 :   } 
   12874              30 :   arg2 = static_cast< double >(val2);
   12875              30 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   12876              30 :   if (!SWIG_IsOK(ecode3)) {
   12877               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint_2D" "', argument " "3"" of type '" "double""'");
   12878                 :   } 
   12879              30 :   arg3 = static_cast< double >(val3);
   12880                 :   {
   12881              30 :     if ( bUseExceptions ) {
   12882               0 :       CPLErrorReset();
   12883                 :     }
   12884                 :     OGRGeometryShadow_AddPoint_2D(arg1,arg2,arg3);
   12885              30 :     if ( bUseExceptions ) {
   12886               0 :       CPLErr eclass = CPLGetLastErrorType();
   12887               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12888               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12889                 :       }
   12890                 :     }
   12891                 :   }
   12892              30 :   resultobj = SWIG_Py_Void();
   12893              30 :   return resultobj;
   12894                 : fail:
   12895               0 :   return NULL;
   12896                 : }
   12897                 : 
   12898                 : 
   12899               1 : SWIGINTERN PyObject *_wrap_Geometry_AddGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12900               1 :   PyObject *resultobj = 0;
   12901               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12902               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   12903               1 :   void *argp1 = 0 ;
   12904               1 :   int res1 = 0 ;
   12905               1 :   int res2 = 0 ;
   12906               1 :   PyObject * obj0 = 0 ;
   12907               1 :   PyObject * obj1 = 0 ;
   12908                 :   OGRErr result;
   12909                 :   
   12910               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AddGeometryDirectly",&obj0,&obj1)) SWIG_fail;
   12911               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12912               1 :   if (!SWIG_IsOK(res1)) {
   12913               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometryDirectly" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12914                 :   }
   12915               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12916               1 :   res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
   12917               1 :   if (!SWIG_IsOK(res2)) {
   12918               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
   12919                 :   }
   12920                 :   {
   12921               1 :     if (!arg2) {
   12922               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12923                 :     }
   12924                 :   }
   12925                 :   {
   12926               1 :     if ( bUseExceptions ) {
   12927               0 :       CPLErrorReset();
   12928                 :     }
   12929               2 :     result = (OGRErr)OGRGeometryShadow_AddGeometryDirectly(arg1,arg2);
   12930               1 :     if ( bUseExceptions ) {
   12931               0 :       CPLErr eclass = CPLGetLastErrorType();
   12932               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12933               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12934                 :       }
   12935                 :     }
   12936                 :   }
   12937                 :   {
   12938                 :     /* %typemap(out) OGRErr */
   12939               1 :     if ( result != 0 && bUseExceptions) {
   12940               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   12941               0 :       SWIG_fail;
   12942                 :     }
   12943                 :   }
   12944                 :   {
   12945                 :     /* %typemap(ret) OGRErr */
   12946               1 :     if (resultobj == Py_None ) {
   12947               0 :       Py_DECREF(resultobj);
   12948               0 :       resultobj = 0;
   12949                 :     }
   12950               1 :     if (resultobj == 0) {
   12951               1 :       resultobj = PyInt_FromLong( result );
   12952                 :     }
   12953                 :   }
   12954               1 :   return resultobj;
   12955                 : fail:
   12956               0 :   return NULL;
   12957                 : }
   12958                 : 
   12959                 : 
   12960              47 : SWIGINTERN PyObject *_wrap_Geometry_AddGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12961              47 :   PyObject *resultobj = 0;
   12962              47 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   12963              47 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   12964              47 :   void *argp1 = 0 ;
   12965              47 :   int res1 = 0 ;
   12966              47 :   void *argp2 = 0 ;
   12967              47 :   int res2 = 0 ;
   12968              47 :   PyObject * obj0 = 0 ;
   12969              47 :   PyObject * obj1 = 0 ;
   12970                 :   OGRErr result;
   12971                 :   
   12972              47 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AddGeometry",&obj0,&obj1)) SWIG_fail;
   12973              47 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12974              47 :   if (!SWIG_IsOK(res1)) {
   12975               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   12976                 :   }
   12977              47 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   12978              47 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   12979              47 :   if (!SWIG_IsOK(res2)) {
   12980               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   12981                 :   }
   12982              47 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   12983                 :   {
   12984              47 :     if (!arg2) {
   12985               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12986                 :     }
   12987                 :   }
   12988                 :   {
   12989              47 :     if ( bUseExceptions ) {
   12990               0 :       CPLErrorReset();
   12991                 :     }
   12992              47 :     result = (OGRErr)OGRGeometryShadow_AddGeometry(arg1,arg2);
   12993              47 :     if ( bUseExceptions ) {
   12994               0 :       CPLErr eclass = CPLGetLastErrorType();
   12995               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12996               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12997                 :       }
   12998                 :     }
   12999                 :   }
   13000                 :   {
   13001                 :     /* %typemap(out) OGRErr */
   13002              47 :     if ( result != 0 && bUseExceptions) {
   13003               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   13004               0 :       SWIG_fail;
   13005                 :     }
   13006                 :   }
   13007                 :   {
   13008                 :     /* %typemap(ret) OGRErr */
   13009              47 :     if (resultobj == Py_None ) {
   13010               0 :       Py_DECREF(resultobj);
   13011               0 :       resultobj = 0;
   13012                 :     }
   13013              47 :     if (resultobj == 0) {
   13014              47 :       resultobj = PyInt_FromLong( result );
   13015                 :     }
   13016                 :   }
   13017              47 :   return resultobj;
   13018                 : fail:
   13019               0 :   return NULL;
   13020                 : }
   13021                 : 
   13022                 : 
   13023             959 : SWIGINTERN PyObject *_wrap_Geometry_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13024             959 :   PyObject *resultobj = 0;
   13025             959 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13026             959 :   void *argp1 = 0 ;
   13027             959 :   int res1 = 0 ;
   13028             959 :   PyObject * obj0 = 0 ;
   13029             959 :   OGRGeometryShadow *result = 0 ;
   13030                 :   
   13031             959 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Clone",&obj0)) SWIG_fail;
   13032             959 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13033             959 :   if (!SWIG_IsOK(res1)) {
   13034               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Clone" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13035                 :   }
   13036             959 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13037                 :   {
   13038             959 :     if ( bUseExceptions ) {
   13039               0 :       CPLErrorReset();
   13040                 :     }
   13041             959 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Clone(arg1);
   13042             959 :     if ( bUseExceptions ) {
   13043               0 :       CPLErr eclass = CPLGetLastErrorType();
   13044               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13045               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13046                 :       }
   13047                 :     }
   13048                 :   }
   13049             959 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13050             959 :   return resultobj;
   13051                 : fail:
   13052               0 :   return NULL;
   13053                 : }
   13054                 : 
   13055                 : 
   13056             182 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13057             182 :   PyObject *resultobj = 0;
   13058             182 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13059             182 :   void *argp1 = 0 ;
   13060             182 :   int res1 = 0 ;
   13061             182 :   PyObject * obj0 = 0 ;
   13062                 :   OGRwkbGeometryType result;
   13063                 :   
   13064             182 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryType",&obj0)) SWIG_fail;
   13065             182 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13066             182 :   if (!SWIG_IsOK(res1)) {
   13067               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryType" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13068                 :   }
   13069             182 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13070                 :   {
   13071             182 :     if ( bUseExceptions ) {
   13072               0 :       CPLErrorReset();
   13073                 :     }
   13074             182 :     result = (OGRwkbGeometryType)OGRGeometryShadow_GetGeometryType(arg1);
   13075             182 :     if ( bUseExceptions ) {
   13076               0 :       CPLErr eclass = CPLGetLastErrorType();
   13077               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13078               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13079                 :       }
   13080                 :     }
   13081                 :   }
   13082             364 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13083             182 :   return resultobj;
   13084                 : fail:
   13085               0 :   return NULL;
   13086                 : }
   13087                 : 
   13088                 : 
   13089            2352 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13090            2352 :   PyObject *resultobj = 0;
   13091            2352 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13092            2352 :   void *argp1 = 0 ;
   13093            2352 :   int res1 = 0 ;
   13094            2352 :   PyObject * obj0 = 0 ;
   13095            2352 :   char *result = 0 ;
   13096                 :   
   13097            2352 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryName",&obj0)) SWIG_fail;
   13098            2352 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13099            2352 :   if (!SWIG_IsOK(res1)) {
   13100               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryName" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13101                 :   }
   13102            2352 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13103                 :   {
   13104            2352 :     if ( bUseExceptions ) {
   13105               0 :       CPLErrorReset();
   13106                 :     }
   13107            2352 :     result = (char *)OGRGeometryShadow_GetGeometryName(arg1);
   13108            2352 :     if ( bUseExceptions ) {
   13109               0 :       CPLErr eclass = CPLGetLastErrorType();
   13110               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13111               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13112                 :       }
   13113                 :     }
   13114                 :   }
   13115            2352 :   resultobj = SWIG_FromCharPtr((const char *)result);
   13116            2352 :   return resultobj;
   13117                 : fail:
   13118               0 :   return NULL;
   13119                 : }
   13120                 : 
   13121                 : 
   13122               6 : SWIGINTERN PyObject *_wrap_Geometry_Length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13123               6 :   PyObject *resultobj = 0;
   13124               6 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13125               6 :   void *argp1 = 0 ;
   13126               6 :   int res1 = 0 ;
   13127               6 :   PyObject * obj0 = 0 ;
   13128                 :   double result;
   13129                 :   
   13130               6 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Length",&obj0)) SWIG_fail;
   13131               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13132               6 :   if (!SWIG_IsOK(res1)) {
   13133               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Length" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13134                 :   }
   13135               6 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13136                 :   {
   13137               6 :     if ( bUseExceptions ) {
   13138               0 :       CPLErrorReset();
   13139                 :     }
   13140               6 :     result = (double)OGRGeometryShadow_Length(arg1);
   13141               6 :     if ( bUseExceptions ) {
   13142               0 :       CPLErr eclass = CPLGetLastErrorType();
   13143               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13144               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13145                 :       }
   13146                 :     }
   13147                 :   }
   13148               6 :   resultobj = SWIG_From_double(static_cast< double >(result));
   13149               6 :   return resultobj;
   13150                 : fail:
   13151               0 :   return NULL;
   13152                 : }
   13153                 : 
   13154                 : 
   13155               3 : SWIGINTERN PyObject *_wrap_Geometry_Area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13156               3 :   PyObject *resultobj = 0;
   13157               3 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13158               3 :   void *argp1 = 0 ;
   13159               3 :   int res1 = 0 ;
   13160               3 :   PyObject * obj0 = 0 ;
   13161                 :   double result;
   13162                 :   
   13163               3 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Area",&obj0)) SWIG_fail;
   13164               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13165               3 :   if (!SWIG_IsOK(res1)) {
   13166               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Area" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13167                 :   }
   13168               3 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13169                 :   {
   13170               3 :     if ( bUseExceptions ) {
   13171               0 :       CPLErrorReset();
   13172                 :     }
   13173               3 :     result = (double)OGRGeometryShadow_Area(arg1);
   13174               3 :     if ( bUseExceptions ) {
   13175               0 :       CPLErr eclass = CPLGetLastErrorType();
   13176               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13177               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13178                 :       }
   13179                 :     }
   13180                 :   }
   13181               3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   13182               3 :   return resultobj;
   13183                 : fail:
   13184               0 :   return NULL;
   13185                 : }
   13186                 : 
   13187                 : 
   13188               4 : SWIGINTERN PyObject *_wrap_Geometry_GetArea(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13189               4 :   PyObject *resultobj = 0;
   13190               4 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13191               4 :   void *argp1 = 0 ;
   13192               4 :   int res1 = 0 ;
   13193               4 :   PyObject * obj0 = 0 ;
   13194                 :   double result;
   13195                 :   
   13196               4 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetArea",&obj0)) SWIG_fail;
   13197               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13198               4 :   if (!SWIG_IsOK(res1)) {
   13199               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetArea" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13200                 :   }
   13201               4 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13202                 :   {
   13203               4 :     if ( bUseExceptions ) {
   13204               0 :       CPLErrorReset();
   13205                 :     }
   13206               4 :     result = (double)OGRGeometryShadow_GetArea(arg1);
   13207               4 :     if ( bUseExceptions ) {
   13208               0 :       CPLErr eclass = CPLGetLastErrorType();
   13209               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13210               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13211                 :       }
   13212                 :     }
   13213                 :   }
   13214               4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   13215               4 :   return resultobj;
   13216                 : fail:
   13217               0 :   return NULL;
   13218                 : }
   13219                 : 
   13220                 : 
   13221            3032 : SWIGINTERN PyObject *_wrap_Geometry_GetPointCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13222            3032 :   PyObject *resultobj = 0;
   13223            3032 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13224            3032 :   void *argp1 = 0 ;
   13225            3032 :   int res1 = 0 ;
   13226            3032 :   PyObject * obj0 = 0 ;
   13227                 :   int result;
   13228                 :   
   13229            3032 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetPointCount",&obj0)) SWIG_fail;
   13230            3032 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13231            3032 :   if (!SWIG_IsOK(res1)) {
   13232               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPointCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13233                 :   }
   13234            3032 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13235                 :   {
   13236            3032 :     if ( bUseExceptions ) {
   13237               0 :       CPLErrorReset();
   13238                 :     }
   13239            3032 :     result = (int)OGRGeometryShadow_GetPointCount(arg1);
   13240            3032 :     if ( bUseExceptions ) {
   13241               0 :       CPLErr eclass = CPLGetLastErrorType();
   13242               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13243               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13244                 :       }
   13245                 :     }
   13246                 :   }
   13247            3032 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13248            3032 :   return resultobj;
   13249                 : fail:
   13250               0 :   return NULL;
   13251                 : }
   13252                 : 
   13253                 : 
   13254               8 : SWIGINTERN PyObject *_wrap_Geometry_GetPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13255               8 :   PyObject *resultobj = 0;
   13256               8 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13257               8 :   int *arg2 = (int *) 0 ;
   13258               8 :   double **arg3 = (double **) 0 ;
   13259               8 :   double **arg4 = (double **) 0 ;
   13260               8 :   int arg5 = (int) 0 ;
   13261               8 :   void *argp1 = 0 ;
   13262               8 :   int res1 = 0 ;
   13263               8 :   int nPoints2 = 0 ;
   13264               8 :   double *padfXY2 = NULL ;
   13265               8 :   double *padfZ2 = NULL ;
   13266                 :   int val5 ;
   13267               8 :   int ecode5 = 0 ;
   13268               8 :   PyObject * obj0 = 0 ;
   13269               8 :   PyObject * obj1 = 0 ;
   13270                 :   char *  kwnames[] = {
   13271                 :     (char *) "self",(char *) "nCoordDimension", NULL 
   13272               8 :   };
   13273                 :   
   13274                 :   {
   13275                 :     /* %typemap(in,numinputs=0) (int* pnCount, double** ppadfXY, double** ppadfZ) */
   13276               8 :     arg2 = &nPoints2;
   13277               8 :     arg3 = &padfXY2;
   13278               8 :     arg4 = &padfZ2;
   13279                 :   }
   13280               8 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetPoints",kwnames,&obj0,&obj1)) SWIG_fail;
   13281               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13282               8 :   if (!SWIG_IsOK(res1)) {
   13283               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoints" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13284                 :   }
   13285               8 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13286               8 :   if (obj1) {
   13287               4 :     ecode5 = SWIG_AsVal_int(obj1, &val5);
   13288               4 :     if (!SWIG_IsOK(ecode5)) {
   13289               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_GetPoints" "', argument " "5"" of type '" "int""'");
   13290                 :     } 
   13291               4 :     arg5 = static_cast< int >(val5);
   13292                 :   }
   13293                 :   {
   13294               8 :     if ( bUseExceptions ) {
   13295               0 :       CPLErrorReset();
   13296                 :     }
   13297               8 :     OGRGeometryShadow_GetPoints(arg1,arg2,arg3,arg4,arg5);
   13298               8 :     if ( bUseExceptions ) {
   13299               0 :       CPLErr eclass = CPLGetLastErrorType();
   13300               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13301               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13302                 :       }
   13303                 :     }
   13304                 :   }
   13305               8 :   resultobj = SWIG_Py_Void();
   13306                 :   {
   13307                 :     /* %typemap(argout)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
   13308               8 :     Py_DECREF(resultobj);
   13309               8 :     int nPointCount = *(arg2);
   13310               8 :     if (nPointCount == 0)
   13311                 :     {
   13312               0 :       resultobj = Py_None;
   13313                 :     }
   13314                 :     else
   13315                 :     {
   13316               8 :       PyObject *xyz = PyList_New( nPointCount );
   13317               8 :       int nDimensions = (*arg4 != NULL) ? 3 : 2;
   13318              20 :       for( int i=0; i< nPointCount; i++ ) {
   13319              12 :         PyObject *tuple = PyTuple_New( nDimensions );
   13320              12 :         PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (*arg3)[2*i] ) );
   13321              12 :         PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (*arg3)[2*i+1] ) );
   13322              12 :         if (nDimensions == 3)
   13323               6 :         PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (*arg4)[i] ) );
   13324              12 :         PyList_SetItem( xyz, i, tuple );
   13325                 :       }
   13326               8 :       resultobj = xyz;
   13327                 :     }
   13328                 :   }
   13329                 :   {
   13330                 :     /* %typemap(freearg)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
   13331               8 :     VSIFree(*arg3);
   13332               8 :     VSIFree(*arg4);
   13333                 :   }
   13334               8 :   return resultobj;
   13335                 : fail:
   13336                 :   {
   13337                 :     /* %typemap(freearg)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
   13338               0 :     VSIFree(*arg3);
   13339               0 :     VSIFree(*arg4);
   13340                 :   }
   13341               0 :   return NULL;
   13342                 : }
   13343                 : 
   13344                 : 
   13345           15108 : SWIGINTERN PyObject *_wrap_Geometry_GetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13346           15108 :   PyObject *resultobj = 0;
   13347           15108 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13348           15108 :   int arg2 = (int) 0 ;
   13349           15108 :   void *argp1 = 0 ;
   13350           15108 :   int res1 = 0 ;
   13351                 :   int val2 ;
   13352           15108 :   int ecode2 = 0 ;
   13353           15108 :   PyObject * obj0 = 0 ;
   13354           15108 :   PyObject * obj1 = 0 ;
   13355                 :   char *  kwnames[] = {
   13356                 :     (char *) "self",(char *) "point", NULL 
   13357           15108 :   };
   13358                 :   double result;
   13359                 :   
   13360           15108 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetX",kwnames,&obj0,&obj1)) SWIG_fail;
   13361           15108 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13362           15108 :   if (!SWIG_IsOK(res1)) {
   13363               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetX" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13364                 :   }
   13365           15108 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13366           15108 :   if (obj1) {
   13367           15106 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   13368           15106 :     if (!SWIG_IsOK(ecode2)) {
   13369               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetX" "', argument " "2"" of type '" "int""'");
   13370                 :     } 
   13371           15106 :     arg2 = static_cast< int >(val2);
   13372                 :   }
   13373                 :   {
   13374           15108 :     if ( bUseExceptions ) {
   13375               0 :       CPLErrorReset();
   13376                 :     }
   13377           15108 :     result = (double)OGRGeometryShadow_GetX(arg1,arg2);
   13378           15108 :     if ( bUseExceptions ) {
   13379               0 :       CPLErr eclass = CPLGetLastErrorType();
   13380               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13381               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13382                 :       }
   13383                 :     }
   13384                 :   }
   13385           15108 :   resultobj = SWIG_From_double(static_cast< double >(result));
   13386           15108 :   return resultobj;
   13387                 : fail:
   13388               0 :   return NULL;
   13389                 : }
   13390                 : 
   13391                 : 
   13392           15108 : SWIGINTERN PyObject *_wrap_Geometry_GetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13393           15108 :   PyObject *resultobj = 0;
   13394           15108 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13395           15108 :   int arg2 = (int) 0 ;
   13396           15108 :   void *argp1 = 0 ;
   13397           15108 :   int res1 = 0 ;
   13398                 :   int val2 ;
   13399           15108 :   int ecode2 = 0 ;
   13400           15108 :   PyObject * obj0 = 0 ;
   13401           15108 :   PyObject * obj1 = 0 ;
   13402                 :   char *  kwnames[] = {
   13403                 :     (char *) "self",(char *) "point", NULL 
   13404           15108 :   };
   13405                 :   double result;
   13406                 :   
   13407           15108 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetY",kwnames,&obj0,&obj1)) SWIG_fail;
   13408           15108 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13409           15108 :   if (!SWIG_IsOK(res1)) {
   13410               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetY" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13411                 :   }
   13412           15108 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13413           15108 :   if (obj1) {
   13414           15106 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   13415           15106 :     if (!SWIG_IsOK(ecode2)) {
   13416               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetY" "', argument " "2"" of type '" "int""'");
   13417                 :     } 
   13418           15106 :     arg2 = static_cast< int >(val2);
   13419                 :   }
   13420                 :   {
   13421           15108 :     if ( bUseExceptions ) {
   13422               0 :       CPLErrorReset();
   13423                 :     }
   13424           15108 :     result = (double)OGRGeometryShadow_GetY(arg1,arg2);
   13425           15108 :     if ( bUseExceptions ) {
   13426               0 :       CPLErr eclass = CPLGetLastErrorType();
   13427               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13428               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13429                 :       }
   13430                 :     }
   13431                 :   }
   13432           15108 :   resultobj = SWIG_From_double(static_cast< double >(result));
   13433           15108 :   return resultobj;
   13434                 : fail:
   13435               0 :   return NULL;
   13436                 : }
   13437                 : 
   13438                 : 
   13439           14862 : SWIGINTERN PyObject *_wrap_Geometry_GetZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13440           14862 :   PyObject *resultobj = 0;
   13441           14862 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13442           14862 :   int arg2 = (int) 0 ;
   13443           14862 :   void *argp1 = 0 ;
   13444           14862 :   int res1 = 0 ;
   13445                 :   int val2 ;
   13446           14862 :   int ecode2 = 0 ;
   13447           14862 :   PyObject * obj0 = 0 ;
   13448           14862 :   PyObject * obj1 = 0 ;
   13449                 :   char *  kwnames[] = {
   13450                 :     (char *) "self",(char *) "point", NULL 
   13451           14862 :   };
   13452                 :   double result;
   13453                 :   
   13454           14862 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetZ",kwnames,&obj0,&obj1)) SWIG_fail;
   13455           14862 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13456           14862 :   if (!SWIG_IsOK(res1)) {
   13457               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetZ" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13458                 :   }
   13459           14862 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13460           14862 :   if (obj1) {
   13461           14862 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   13462           14862 :     if (!SWIG_IsOK(ecode2)) {
   13463               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetZ" "', argument " "2"" of type '" "int""'");
   13464                 :     } 
   13465           14862 :     arg2 = static_cast< int >(val2);
   13466                 :   }
   13467                 :   {
   13468           14862 :     if ( bUseExceptions ) {
   13469               0 :       CPLErrorReset();
   13470                 :     }
   13471           14862 :     result = (double)OGRGeometryShadow_GetZ(arg1,arg2);
   13472           14862 :     if ( bUseExceptions ) {
   13473               0 :       CPLErr eclass = CPLGetLastErrorType();
   13474               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13475               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13476                 :       }
   13477                 :     }
   13478                 :   }
   13479           14862 :   resultobj = SWIG_From_double(static_cast< double >(result));
   13480           14862 :   return resultobj;
   13481                 : fail:
   13482               0 :   return NULL;
   13483                 : }
   13484                 : 
   13485                 : 
   13486               2 : SWIGINTERN PyObject *_wrap_Geometry_GetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13487               2 :   PyObject *resultobj = 0;
   13488               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13489               2 :   int arg2 = (int) 0 ;
   13490               2 :   double *arg3 = (double *) (double *)NULL ;
   13491               2 :   void *argp1 = 0 ;
   13492               2 :   int res1 = 0 ;
   13493                 :   int val2 ;
   13494               2 :   int ecode2 = 0 ;
   13495                 :   double argout3[3] ;
   13496               2 :   PyObject * obj0 = 0 ;
   13497               2 :   PyObject * obj1 = 0 ;
   13498                 :   
   13499                 :   {
   13500                 :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   13501               2 :     arg3 = argout3;
   13502                 :   }
   13503               2 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_GetPoint",&obj0,&obj1)) SWIG_fail;
   13504               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13505               2 :   if (!SWIG_IsOK(res1)) {
   13506               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13507                 :   }
   13508               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13509               2 :   if (obj1) {
   13510               2 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   13511               2 :     if (!SWIG_IsOK(ecode2)) {
   13512               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint" "', argument " "2"" of type '" "int""'");
   13513                 :     } 
   13514               2 :     arg2 = static_cast< int >(val2);
   13515                 :   }
   13516                 :   {
   13517               2 :     if ( bUseExceptions ) {
   13518               0 :       CPLErrorReset();
   13519                 :     }
   13520                 :     OGRGeometryShadow_GetPoint(arg1,arg2,arg3);
   13521               2 :     if ( bUseExceptions ) {
   13522               0 :       CPLErr eclass = CPLGetLastErrorType();
   13523               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13524               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13525                 :       }
   13526                 :     }
   13527                 :   }
   13528               2 :   resultobj = SWIG_Py_Void();
   13529                 :   {
   13530                 :     /* %typemap(argout) (double argout[ANY]) */
   13531               2 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
   13532               2 :     resultobj = t_output_helper(resultobj,out);
   13533                 :   }
   13534               2 :   return resultobj;
   13535                 : fail:
   13536               0 :   return NULL;
   13537                 : }
   13538                 : 
   13539                 : 
   13540               2 : SWIGINTERN PyObject *_wrap_Geometry_GetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13541               2 :   PyObject *resultobj = 0;
   13542               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13543               2 :   int arg2 = (int) 0 ;
   13544               2 :   double *arg3 = (double *) (double *)NULL ;
   13545               2 :   void *argp1 = 0 ;
   13546               2 :   int res1 = 0 ;
   13547                 :   int val2 ;
   13548               2 :   int ecode2 = 0 ;
   13549                 :   double argout3[2] ;
   13550               2 :   PyObject * obj0 = 0 ;
   13551               2 :   PyObject * obj1 = 0 ;
   13552                 :   
   13553                 :   {
   13554                 :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   13555               2 :     arg3 = argout3;
   13556                 :   }
   13557               2 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_GetPoint_2D",&obj0,&obj1)) SWIG_fail;
   13558               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13559               2 :   if (!SWIG_IsOK(res1)) {
   13560               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13561                 :   }
   13562               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13563               2 :   if (obj1) {
   13564               2 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   13565               2 :     if (!SWIG_IsOK(ecode2)) {
   13566               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint_2D" "', argument " "2"" of type '" "int""'");
   13567                 :     } 
   13568               2 :     arg2 = static_cast< int >(val2);
   13569                 :   }
   13570                 :   {
   13571               2 :     if ( bUseExceptions ) {
   13572               0 :       CPLErrorReset();
   13573                 :     }
   13574                 :     OGRGeometryShadow_GetPoint_2D(arg1,arg2,arg3);
   13575               2 :     if ( bUseExceptions ) {
   13576               0 :       CPLErr eclass = CPLGetLastErrorType();
   13577               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13578               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13579                 :       }
   13580                 :     }
   13581                 :   }
   13582               2 :   resultobj = SWIG_Py_Void();
   13583                 :   {
   13584                 :     /* %typemap(argout) (double argout[ANY]) */
   13585               2 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 2 );
   13586               2 :     resultobj = t_output_helper(resultobj,out);
   13587                 :   }
   13588               2 :   return resultobj;
   13589                 : fail:
   13590               0 :   return NULL;
   13591                 : }
   13592                 : 
   13593                 : 
   13594            3857 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13595            3857 :   PyObject *resultobj = 0;
   13596            3857 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13597            3857 :   void *argp1 = 0 ;
   13598            3857 :   int res1 = 0 ;
   13599            3857 :   PyObject * obj0 = 0 ;
   13600                 :   int result;
   13601                 :   
   13602            3857 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryCount",&obj0)) SWIG_fail;
   13603            3857 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13604            3857 :   if (!SWIG_IsOK(res1)) {
   13605               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13606                 :   }
   13607            3857 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13608                 :   {
   13609            3857 :     if ( bUseExceptions ) {
   13610               0 :       CPLErrorReset();
   13611                 :     }
   13612            3857 :     result = (int)OGRGeometryShadow_GetGeometryCount(arg1);
   13613            3857 :     if ( bUseExceptions ) {
   13614               0 :       CPLErr eclass = CPLGetLastErrorType();
   13615               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13616               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13617                 :       }
   13618                 :     }
   13619                 :   }
   13620            3857 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13621            3857 :   return resultobj;
   13622                 : fail:
   13623               0 :   return NULL;
   13624                 : }
   13625                 : 
   13626                 : 
   13627             250 : SWIGINTERN PyObject *_wrap_Geometry_SetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13628             250 :   PyObject *resultobj = 0;
   13629             250 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13630                 :   int arg2 ;
   13631                 :   double arg3 ;
   13632                 :   double arg4 ;
   13633             250 :   double arg5 = (double) 0 ;
   13634             250 :   void *argp1 = 0 ;
   13635             250 :   int res1 = 0 ;
   13636                 :   int val2 ;
   13637             250 :   int ecode2 = 0 ;
   13638                 :   double val3 ;
   13639             250 :   int ecode3 = 0 ;
   13640                 :   double val4 ;
   13641             250 :   int ecode4 = 0 ;
   13642                 :   double val5 ;
   13643             250 :   int ecode5 = 0 ;
   13644             250 :   PyObject * obj0 = 0 ;
   13645             250 :   PyObject * obj1 = 0 ;
   13646             250 :   PyObject * obj2 = 0 ;
   13647             250 :   PyObject * obj3 = 0 ;
   13648             250 :   PyObject * obj4 = 0 ;
   13649                 :   char *  kwnames[] = {
   13650                 :     (char *) "self",(char *) "point",(char *) "x",(char *) "y",(char *) "z", NULL 
   13651             250 :   };
   13652                 :   
   13653             250 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:Geometry_SetPoint",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   13654             250 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13655             250 :   if (!SWIG_IsOK(res1)) {
   13656               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13657                 :   }
   13658             250 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13659             250 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13660             250 :   if (!SWIG_IsOK(ecode2)) {
   13661               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint" "', argument " "2"" of type '" "int""'");
   13662                 :   } 
   13663             250 :   arg2 = static_cast< int >(val2);
   13664             250 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   13665             250 :   if (!SWIG_IsOK(ecode3)) {
   13666               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint" "', argument " "3"" of type '" "double""'");
   13667                 :   } 
   13668             250 :   arg3 = static_cast< double >(val3);
   13669             250 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   13670             250 :   if (!SWIG_IsOK(ecode4)) {
   13671               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint" "', argument " "4"" of type '" "double""'");
   13672                 :   } 
   13673             250 :   arg4 = static_cast< double >(val4);
   13674             250 :   if (obj4) {
   13675             248 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
   13676             248 :     if (!SWIG_IsOK(ecode5)) {
   13677               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPoint" "', argument " "5"" of type '" "double""'");
   13678                 :     } 
   13679             248 :     arg5 = static_cast< double >(val5);
   13680                 :   }
   13681                 :   {
   13682             250 :     if ( bUseExceptions ) {
   13683               0 :       CPLErrorReset();
   13684                 :     }
   13685                 :     OGRGeometryShadow_SetPoint(arg1,arg2,arg3,arg4,arg5);
   13686             250 :     if ( bUseExceptions ) {
   13687               0 :       CPLErr eclass = CPLGetLastErrorType();
   13688               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13689               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13690                 :       }
   13691                 :     }
   13692                 :   }
   13693             250 :   resultobj = SWIG_Py_Void();
   13694             250 :   return resultobj;
   13695                 : fail:
   13696               0 :   return NULL;
   13697                 : }
   13698                 : 
   13699                 : 
   13700               1 : SWIGINTERN PyObject *_wrap_Geometry_SetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13701               1 :   PyObject *resultobj = 0;
   13702               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13703                 :   int arg2 ;
   13704                 :   double arg3 ;
   13705                 :   double arg4 ;
   13706               1 :   void *argp1 = 0 ;
   13707               1 :   int res1 = 0 ;
   13708                 :   int val2 ;
   13709               1 :   int ecode2 = 0 ;
   13710                 :   double val3 ;
   13711               1 :   int ecode3 = 0 ;
   13712                 :   double val4 ;
   13713               1 :   int ecode4 = 0 ;
   13714               1 :   PyObject * obj0 = 0 ;
   13715               1 :   PyObject * obj1 = 0 ;
   13716               1 :   PyObject * obj2 = 0 ;
   13717               1 :   PyObject * obj3 = 0 ;
   13718                 :   char *  kwnames[] = {
   13719                 :     (char *) "self",(char *) "point",(char *) "x",(char *) "y", NULL 
   13720               1 :   };
   13721                 :   
   13722               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Geometry_SetPoint_2D",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   13723               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13724               1 :   if (!SWIG_IsOK(res1)) {
   13725               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13726                 :   }
   13727               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13728               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13729               1 :   if (!SWIG_IsOK(ecode2)) {
   13730               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint_2D" "', argument " "2"" of type '" "int""'");
   13731                 :   } 
   13732               1 :   arg2 = static_cast< int >(val2);
   13733               1 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   13734               1 :   if (!SWIG_IsOK(ecode3)) {
   13735               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint_2D" "', argument " "3"" of type '" "double""'");
   13736                 :   } 
   13737               1 :   arg3 = static_cast< double >(val3);
   13738               1 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   13739               1 :   if (!SWIG_IsOK(ecode4)) {
   13740               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint_2D" "', argument " "4"" of type '" "double""'");
   13741                 :   } 
   13742               1 :   arg4 = static_cast< double >(val4);
   13743                 :   {
   13744               1 :     if ( bUseExceptions ) {
   13745               0 :       CPLErrorReset();
   13746                 :     }
   13747                 :     OGRGeometryShadow_SetPoint_2D(arg1,arg2,arg3,arg4);
   13748               1 :     if ( bUseExceptions ) {
   13749               0 :       CPLErr eclass = CPLGetLastErrorType();
   13750               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13751               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13752                 :       }
   13753                 :     }
   13754                 :   }
   13755               1 :   resultobj = SWIG_Py_Void();
   13756               1 :   return resultobj;
   13757                 : fail:
   13758               0 :   return NULL;
   13759                 : }
   13760                 : 
   13761                 : 
   13762            2042 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13763            2042 :   PyObject *resultobj = 0;
   13764            2042 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13765                 :   int arg2 ;
   13766            2042 :   void *argp1 = 0 ;
   13767            2042 :   int res1 = 0 ;
   13768                 :   int val2 ;
   13769            2042 :   int ecode2 = 0 ;
   13770            2042 :   PyObject * obj0 = 0 ;
   13771            2042 :   PyObject * obj1 = 0 ;
   13772            2042 :   OGRGeometryShadow *result = 0 ;
   13773                 :   
   13774            2042 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_GetGeometryRef",&obj0,&obj1)) SWIG_fail;
   13775            1342 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13776            1342 :   if (!SWIG_IsOK(res1)) {
   13777               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryRef" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13778                 :   }
   13779            1342 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13780            1342 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13781            1342 :   if (!SWIG_IsOK(ecode2)) {
   13782               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetGeometryRef" "', argument " "2"" of type '" "int""'");
   13783                 :   } 
   13784            1342 :   arg2 = static_cast< int >(val2);
   13785                 :   {
   13786            1342 :     if ( bUseExceptions ) {
   13787               0 :       CPLErrorReset();
   13788                 :     }
   13789            1342 :     result = (OGRGeometryShadow *)OGRGeometryShadow_GetGeometryRef(arg1,arg2);
   13790            1342 :     if ( bUseExceptions ) {
   13791               0 :       CPLErr eclass = CPLGetLastErrorType();
   13792               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13793               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13794                 :       }
   13795                 :     }
   13796                 :   }
   13797            1342 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13798            1342 :   return resultobj;
   13799                 : fail:
   13800             700 :   return NULL;
   13801                 : }
   13802                 : 
   13803                 : 
   13804               1 : SWIGINTERN PyObject *_wrap_Geometry_Simplify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13805               1 :   PyObject *resultobj = 0;
   13806               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13807                 :   double arg2 ;
   13808               1 :   void *argp1 = 0 ;
   13809               1 :   int res1 = 0 ;
   13810                 :   double val2 ;
   13811               1 :   int ecode2 = 0 ;
   13812               1 :   PyObject * obj0 = 0 ;
   13813               1 :   PyObject * obj1 = 0 ;
   13814               1 :   OGRGeometryShadow *result = 0 ;
   13815                 :   
   13816               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Simplify",&obj0,&obj1)) SWIG_fail;
   13817               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13818               1 :   if (!SWIG_IsOK(res1)) {
   13819               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Simplify" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13820                 :   }
   13821               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13822               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   13823               1 :   if (!SWIG_IsOK(ecode2)) {
   13824               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Simplify" "', argument " "2"" of type '" "double""'");
   13825                 :   } 
   13826               1 :   arg2 = static_cast< double >(val2);
   13827                 :   {
   13828               1 :     if ( bUseExceptions ) {
   13829               0 :       CPLErrorReset();
   13830                 :     }
   13831               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
   13832               1 :     if ( bUseExceptions ) {
   13833               0 :       CPLErr eclass = CPLGetLastErrorType();
   13834               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13835               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13836                 :       }
   13837                 :     }
   13838                 :   }
   13839               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13840               1 :   return resultobj;
   13841                 : fail:
   13842               0 :   return NULL;
   13843                 : }
   13844                 : 
   13845                 : 
   13846               1 : SWIGINTERN PyObject *_wrap_Geometry_SimplifyPreserveTopology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13847               1 :   PyObject *resultobj = 0;
   13848               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13849                 :   double arg2 ;
   13850               1 :   void *argp1 = 0 ;
   13851               1 :   int res1 = 0 ;
   13852                 :   double val2 ;
   13853               1 :   int ecode2 = 0 ;
   13854               1 :   PyObject * obj0 = 0 ;
   13855               1 :   PyObject * obj1 = 0 ;
   13856               1 :   OGRGeometryShadow *result = 0 ;
   13857                 :   
   13858               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SimplifyPreserveTopology",&obj0,&obj1)) SWIG_fail;
   13859               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13860               1 :   if (!SWIG_IsOK(res1)) {
   13861               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13862                 :   }
   13863               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13864               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   13865               1 :   if (!SWIG_IsOK(ecode2)) {
   13866               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "2"" of type '" "double""'");
   13867                 :   } 
   13868               1 :   arg2 = static_cast< double >(val2);
   13869                 :   {
   13870               1 :     if ( bUseExceptions ) {
   13871               0 :       CPLErrorReset();
   13872                 :     }
   13873               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_SimplifyPreserveTopology(arg1,arg2);
   13874               1 :     if ( bUseExceptions ) {
   13875               0 :       CPLErr eclass = CPLGetLastErrorType();
   13876               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13877               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13878                 :       }
   13879                 :     }
   13880                 :   }
   13881               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13882               1 :   return resultobj;
   13883                 : fail:
   13884               0 :   return NULL;
   13885                 : }
   13886                 : 
   13887                 : 
   13888               1 : SWIGINTERN PyObject *_wrap_Geometry_Boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13889               1 :   PyObject *resultobj = 0;
   13890               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13891               1 :   void *argp1 = 0 ;
   13892               1 :   int res1 = 0 ;
   13893               1 :   PyObject * obj0 = 0 ;
   13894               1 :   OGRGeometryShadow *result = 0 ;
   13895                 :   
   13896               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Boundary",&obj0)) SWIG_fail;
   13897               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13898               1 :   if (!SWIG_IsOK(res1)) {
   13899               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Boundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13900                 :   }
   13901               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13902                 :   {
   13903               1 :     if ( bUseExceptions ) {
   13904               0 :       CPLErrorReset();
   13905                 :     }
   13906               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
   13907               1 :     if ( bUseExceptions ) {
   13908               0 :       CPLErr eclass = CPLGetLastErrorType();
   13909               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13910               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13911                 :       }
   13912                 :     }
   13913                 :   }
   13914               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13915               1 :   return resultobj;
   13916                 : fail:
   13917               0 :   return NULL;
   13918                 : }
   13919                 : 
   13920                 : 
   13921               5 : SWIGINTERN PyObject *_wrap_Geometry_GetBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13922               5 :   PyObject *resultobj = 0;
   13923               5 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13924               5 :   void *argp1 = 0 ;
   13925               5 :   int res1 = 0 ;
   13926               5 :   PyObject * obj0 = 0 ;
   13927               5 :   OGRGeometryShadow *result = 0 ;
   13928                 :   
   13929               5 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetBoundary",&obj0)) SWIG_fail;
   13930               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13931               5 :   if (!SWIG_IsOK(res1)) {
   13932               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetBoundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13933                 :   }
   13934               5 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13935                 :   {
   13936               5 :     if ( bUseExceptions ) {
   13937               0 :       CPLErrorReset();
   13938                 :     }
   13939               5 :     result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
   13940               5 :     if ( bUseExceptions ) {
   13941               0 :       CPLErr eclass = CPLGetLastErrorType();
   13942               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13943               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13944                 :       }
   13945                 :     }
   13946                 :   }
   13947               5 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13948               5 :   return resultobj;
   13949                 : fail:
   13950               0 :   return NULL;
   13951                 : }
   13952                 : 
   13953                 : 
   13954               1 : SWIGINTERN PyObject *_wrap_Geometry_ConvexHull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13955               1 :   PyObject *resultobj = 0;
   13956               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13957               1 :   void *argp1 = 0 ;
   13958               1 :   int res1 = 0 ;
   13959               1 :   PyObject * obj0 = 0 ;
   13960               1 :   OGRGeometryShadow *result = 0 ;
   13961                 :   
   13962               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_ConvexHull",&obj0)) SWIG_fail;
   13963               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   13964               1 :   if (!SWIG_IsOK(res1)) {
   13965               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ConvexHull" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   13966                 :   }
   13967               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   13968                 :   {
   13969               1 :     if ( bUseExceptions ) {
   13970               0 :       CPLErrorReset();
   13971                 :     }
   13972               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
   13973               1 :     if ( bUseExceptions ) {
   13974               0 :       CPLErr eclass = CPLGetLastErrorType();
   13975               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13976               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13977                 :       }
   13978                 :     }
   13979                 :   }
   13980               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   13981               1 :   return resultobj;
   13982                 : fail:
   13983               0 :   return NULL;
   13984                 : }
   13985                 : 
   13986                 : 
   13987               1 : SWIGINTERN PyObject *_wrap_Geometry_Buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13988               1 :   PyObject *resultobj = 0;
   13989               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   13990                 :   double arg2 ;
   13991               1 :   int arg3 = (int) 30 ;
   13992               1 :   void *argp1 = 0 ;
   13993               1 :   int res1 = 0 ;
   13994                 :   double val2 ;
   13995               1 :   int ecode2 = 0 ;
   13996                 :   int val3 ;
   13997               1 :   int ecode3 = 0 ;
   13998               1 :   PyObject * obj0 = 0 ;
   13999               1 :   PyObject * obj1 = 0 ;
   14000               1 :   PyObject * obj2 = 0 ;
   14001                 :   char *  kwnames[] = {
   14002                 :     (char *) "self",(char *) "distance",(char *) "quadsecs", NULL 
   14003               1 :   };
   14004               1 :   OGRGeometryShadow *result = 0 ;
   14005                 :   
   14006               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Geometry_Buffer",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   14007               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14008               1 :   if (!SWIG_IsOK(res1)) {
   14009               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Buffer" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14010                 :   }
   14011               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14012               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   14013               1 :   if (!SWIG_IsOK(ecode2)) {
   14014               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Buffer" "', argument " "2"" of type '" "double""'");
   14015                 :   } 
   14016               1 :   arg2 = static_cast< double >(val2);
   14017               1 :   if (obj2) {
   14018               1 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   14019               1 :     if (!SWIG_IsOK(ecode3)) {
   14020               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_Buffer" "', argument " "3"" of type '" "int""'");
   14021                 :     } 
   14022               1 :     arg3 = static_cast< int >(val3);
   14023                 :   }
   14024                 :   {
   14025               1 :     if ( bUseExceptions ) {
   14026               0 :       CPLErrorReset();
   14027                 :     }
   14028               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer(arg1,arg2,arg3);
   14029               1 :     if ( bUseExceptions ) {
   14030               0 :       CPLErr eclass = CPLGetLastErrorType();
   14031               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14032               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14033                 :       }
   14034                 :     }
   14035                 :   }
   14036               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   14037               1 :   return resultobj;
   14038                 : fail:
   14039               0 :   return NULL;
   14040                 : }
   14041                 : 
   14042                 : 
   14043              45 : SWIGINTERN PyObject *_wrap_Geometry_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14044              45 :   PyObject *resultobj = 0;
   14045              45 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14046              45 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14047              45 :   void *argp1 = 0 ;
   14048              45 :   int res1 = 0 ;
   14049              45 :   void *argp2 = 0 ;
   14050              45 :   int res2 = 0 ;
   14051              45 :   PyObject * obj0 = 0 ;
   14052              45 :   PyObject * obj1 = 0 ;
   14053              45 :   OGRGeometryShadow *result = 0 ;
   14054                 :   
   14055              45 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersection",&obj0,&obj1)) SWIG_fail;
   14056              45 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14057              45 :   if (!SWIG_IsOK(res1)) {
   14058               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersection" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14059                 :   }
   14060              45 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14061              45 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14062              45 :   if (!SWIG_IsOK(res2)) {
   14063               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersection" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14064                 :   }
   14065              45 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14066                 :   {
   14067              45 :     if (!arg2) {
   14068               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14069                 :     }
   14070                 :   }
   14071                 :   {
   14072              45 :     if ( bUseExceptions ) {
   14073               0 :       CPLErrorReset();
   14074                 :     }
   14075              45 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
   14076              45 :     if ( bUseExceptions ) {
   14077               0 :       CPLErr eclass = CPLGetLastErrorType();
   14078               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14079               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14080                 :       }
   14081                 :     }
   14082                 :   }
   14083              45 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   14084              45 :   return resultobj;
   14085                 : fail:
   14086               0 :   return NULL;
   14087                 : }
   14088                 : 
   14089                 : 
   14090               3 : SWIGINTERN PyObject *_wrap_Geometry_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14091               3 :   PyObject *resultobj = 0;
   14092               3 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14093               3 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14094               3 :   void *argp1 = 0 ;
   14095               3 :   int res1 = 0 ;
   14096               3 :   void *argp2 = 0 ;
   14097               3 :   int res2 = 0 ;
   14098               3 :   PyObject * obj0 = 0 ;
   14099               3 :   PyObject * obj1 = 0 ;
   14100               3 :   OGRGeometryShadow *result = 0 ;
   14101                 :   
   14102               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Union",&obj0,&obj1)) SWIG_fail;
   14103               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14104               3 :   if (!SWIG_IsOK(res1)) {
   14105               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Union" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14106                 :   }
   14107               3 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14108               3 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14109               3 :   if (!SWIG_IsOK(res2)) {
   14110               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Union" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14111                 :   }
   14112               3 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14113                 :   {
   14114               3 :     if (!arg2) {
   14115               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14116                 :     }
   14117                 :   }
   14118                 :   {
   14119               3 :     if ( bUseExceptions ) {
   14120               0 :       CPLErrorReset();
   14121                 :     }
   14122               3 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
   14123               3 :     if ( bUseExceptions ) {
   14124               0 :       CPLErr eclass = CPLGetLastErrorType();
   14125               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14126               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14127                 :       }
   14128                 :     }
   14129                 :   }
   14130               3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   14131               3 :   return resultobj;
   14132                 : fail:
   14133               0 :   return NULL;
   14134                 : }
   14135                 : 
   14136                 : 
   14137               1 : SWIGINTERN PyObject *_wrap_Geometry_UnionCascaded(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14138               1 :   PyObject *resultobj = 0;
   14139               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14140               1 :   void *argp1 = 0 ;
   14141               1 :   int res1 = 0 ;
   14142               1 :   PyObject * obj0 = 0 ;
   14143               1 :   OGRGeometryShadow *result = 0 ;
   14144                 :   
   14145               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_UnionCascaded",&obj0)) SWIG_fail;
   14146               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14147               1 :   if (!SWIG_IsOK(res1)) {
   14148               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_UnionCascaded" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14149                 :   }
   14150               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14151                 :   {
   14152               1 :     if ( bUseExceptions ) {
   14153               0 :       CPLErrorReset();
   14154                 :     }
   14155               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
   14156               1 :     if ( bUseExceptions ) {
   14157               0 :       CPLErr eclass = CPLGetLastErrorType();
   14158               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14159               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14160                 :       }
   14161                 :     }
   14162                 :   }
   14163               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   14164               1 :   return resultobj;
   14165                 : fail:
   14166               0 :   return NULL;
   14167                 : }
   14168                 : 
   14169                 : 
   14170               1 : SWIGINTERN PyObject *_wrap_Geometry_Difference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14171               1 :   PyObject *resultobj = 0;
   14172               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14173               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14174               1 :   void *argp1 = 0 ;
   14175               1 :   int res1 = 0 ;
   14176               1 :   void *argp2 = 0 ;
   14177               1 :   int res2 = 0 ;
   14178               1 :   PyObject * obj0 = 0 ;
   14179               1 :   PyObject * obj1 = 0 ;
   14180               1 :   OGRGeometryShadow *result = 0 ;
   14181                 :   
   14182               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Difference",&obj0,&obj1)) SWIG_fail;
   14183               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14184               1 :   if (!SWIG_IsOK(res1)) {
   14185               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Difference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14186                 :   }
   14187               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14188               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14189               1 :   if (!SWIG_IsOK(res2)) {
   14190               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Difference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14191                 :   }
   14192               1 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14193                 :   {
   14194               1 :     if (!arg2) {
   14195               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14196                 :     }
   14197                 :   }
   14198                 :   {
   14199               1 :     if ( bUseExceptions ) {
   14200               0 :       CPLErrorReset();
   14201                 :     }
   14202               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
   14203               1 :     if ( bUseExceptions ) {
   14204               0 :       CPLErr eclass = CPLGetLastErrorType();
   14205               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14206               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14207                 :       }
   14208                 :     }
   14209                 :   }
   14210               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   14211               1 :   return resultobj;
   14212                 : fail:
   14213               0 :   return NULL;
   14214                 : }
   14215                 : 
   14216                 : 
   14217               1 : SWIGINTERN PyObject *_wrap_Geometry_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14218               1 :   PyObject *resultobj = 0;
   14219               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14220               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14221               1 :   void *argp1 = 0 ;
   14222               1 :   int res1 = 0 ;
   14223               1 :   void *argp2 = 0 ;
   14224               1 :   int res2 = 0 ;
   14225               1 :   PyObject * obj0 = 0 ;
   14226               1 :   PyObject * obj1 = 0 ;
   14227               1 :   OGRGeometryShadow *result = 0 ;
   14228                 :   
   14229               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SymDifference",&obj0,&obj1)) SWIG_fail;
   14230               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14231               1 :   if (!SWIG_IsOK(res1)) {
   14232               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14233                 :   }
   14234               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14235               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14236               1 :   if (!SWIG_IsOK(res2)) {
   14237               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14238                 :   }
   14239               1 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14240                 :   {
   14241               1 :     if (!arg2) {
   14242               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14243                 :     }
   14244                 :   }
   14245                 :   {
   14246               1 :     if ( bUseExceptions ) {
   14247               0 :       CPLErrorReset();
   14248                 :     }
   14249               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
   14250               1 :     if ( bUseExceptions ) {
   14251               0 :       CPLErr eclass = CPLGetLastErrorType();
   14252               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14253               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14254                 :       }
   14255                 :     }
   14256                 :   }
   14257               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   14258               1 :   return resultobj;
   14259                 : fail:
   14260               0 :   return NULL;
   14261                 : }
   14262                 : 
   14263                 : 
   14264               1 : SWIGINTERN PyObject *_wrap_Geometry_SymmetricDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14265               1 :   PyObject *resultobj = 0;
   14266               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14267               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14268               1 :   void *argp1 = 0 ;
   14269               1 :   int res1 = 0 ;
   14270               1 :   void *argp2 = 0 ;
   14271               1 :   int res2 = 0 ;
   14272               1 :   PyObject * obj0 = 0 ;
   14273               1 :   PyObject * obj1 = 0 ;
   14274               1 :   OGRGeometryShadow *result = 0 ;
   14275                 :   
   14276               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SymmetricDifference",&obj0,&obj1)) SWIG_fail;
   14277               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14278               1 :   if (!SWIG_IsOK(res1)) {
   14279               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymmetricDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14280                 :   }
   14281               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14282               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14283               1 :   if (!SWIG_IsOK(res2)) {
   14284               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymmetricDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14285                 :   }
   14286               1 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14287                 :   {
   14288               1 :     if (!arg2) {
   14289               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14290                 :     }
   14291                 :   }
   14292                 :   {
   14293               1 :     if ( bUseExceptions ) {
   14294               0 :       CPLErrorReset();
   14295                 :     }
   14296               1 :     result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
   14297               1 :     if ( bUseExceptions ) {
   14298               0 :       CPLErr eclass = CPLGetLastErrorType();
   14299               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14300               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14301                 :       }
   14302                 :     }
   14303                 :   }
   14304               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   14305               1 :   return resultobj;
   14306                 : fail:
   14307               0 :   return NULL;
   14308                 : }
   14309                 : 
   14310                 : 
   14311               1 : SWIGINTERN PyObject *_wrap_Geometry_Distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14312               1 :   PyObject *resultobj = 0;
   14313               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14314               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14315               1 :   void *argp1 = 0 ;
   14316               1 :   int res1 = 0 ;
   14317               1 :   void *argp2 = 0 ;
   14318               1 :   int res2 = 0 ;
   14319               1 :   PyObject * obj0 = 0 ;
   14320               1 :   PyObject * obj1 = 0 ;
   14321                 :   double result;
   14322                 :   
   14323               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Distance",&obj0,&obj1)) SWIG_fail;
   14324               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14325               1 :   if (!SWIG_IsOK(res1)) {
   14326               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14327                 :   }
   14328               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14329               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14330               1 :   if (!SWIG_IsOK(res2)) {
   14331               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14332                 :   }
   14333               1 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14334                 :   {
   14335               1 :     if (!arg2) {
   14336               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14337                 :     }
   14338                 :   }
   14339                 :   {
   14340               1 :     if ( bUseExceptions ) {
   14341               0 :       CPLErrorReset();
   14342                 :     }
   14343               1 :     result = (double)OGRGeometryShadow_Distance(arg1,arg2);
   14344               1 :     if ( bUseExceptions ) {
   14345               0 :       CPLErr eclass = CPLGetLastErrorType();
   14346               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14347               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14348                 :       }
   14349                 :     }
   14350                 :   }
   14351               1 :   resultobj = SWIG_From_double(static_cast< double >(result));
   14352               1 :   return resultobj;
   14353                 : fail:
   14354               0 :   return NULL;
   14355                 : }
   14356                 : 
   14357                 : 
   14358               2 : SWIGINTERN PyObject *_wrap_Geometry_Empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14359               2 :   PyObject *resultobj = 0;
   14360               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14361               2 :   void *argp1 = 0 ;
   14362               2 :   int res1 = 0 ;
   14363               2 :   PyObject * obj0 = 0 ;
   14364                 :   
   14365               2 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Empty",&obj0)) SWIG_fail;
   14366               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14367               2 :   if (!SWIG_IsOK(res1)) {
   14368               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Empty" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14369                 :   }
   14370               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14371                 :   {
   14372               2 :     if ( bUseExceptions ) {
   14373               0 :       CPLErrorReset();
   14374                 :     }
   14375                 :     OGRGeometryShadow_Empty(arg1);
   14376               2 :     if ( bUseExceptions ) {
   14377               0 :       CPLErr eclass = CPLGetLastErrorType();
   14378               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14379               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14380                 :       }
   14381                 :     }
   14382                 :   }
   14383               2 :   resultobj = SWIG_Py_Void();
   14384               2 :   return resultobj;
   14385                 : fail:
   14386               0 :   return NULL;
   14387                 : }
   14388                 : 
   14389                 : 
   14390              58 : SWIGINTERN PyObject *_wrap_Geometry_IsEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14391              58 :   PyObject *resultobj = 0;
   14392              58 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14393              58 :   void *argp1 = 0 ;
   14394              58 :   int res1 = 0 ;
   14395              58 :   PyObject * obj0 = 0 ;
   14396                 :   bool result;
   14397                 :   
   14398              58 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsEmpty",&obj0)) SWIG_fail;
   14399              58 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14400              58 :   if (!SWIG_IsOK(res1)) {
   14401               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsEmpty" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14402                 :   }
   14403              58 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14404                 :   {
   14405              58 :     if ( bUseExceptions ) {
   14406               0 :       CPLErrorReset();
   14407                 :     }
   14408              58 :     result = (bool)OGRGeometryShadow_IsEmpty(arg1);
   14409              58 :     if ( bUseExceptions ) {
   14410               0 :       CPLErr eclass = CPLGetLastErrorType();
   14411               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14412               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14413                 :       }
   14414                 :     }
   14415                 :   }
   14416              58 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14417              58 :   return resultobj;
   14418                 : fail:
   14419               0 :   return NULL;
   14420                 : }
   14421                 : 
   14422                 : 
   14423               2 : SWIGINTERN PyObject *_wrap_Geometry_IsValid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14424               2 :   PyObject *resultobj = 0;
   14425               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14426               2 :   void *argp1 = 0 ;
   14427               2 :   int res1 = 0 ;
   14428               2 :   PyObject * obj0 = 0 ;
   14429                 :   bool result;
   14430                 :   
   14431               2 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsValid",&obj0)) SWIG_fail;
   14432               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14433               2 :   if (!SWIG_IsOK(res1)) {
   14434               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14435                 :   }
   14436               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14437                 :   {
   14438               2 :     if ( bUseExceptions ) {
   14439               0 :       CPLErrorReset();
   14440                 :     }
   14441               2 :     result = (bool)OGRGeometryShadow_IsValid(arg1);
   14442               2 :     if ( bUseExceptions ) {
   14443               0 :       CPLErr eclass = CPLGetLastErrorType();
   14444               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14445               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14446                 :       }
   14447                 :     }
   14448                 :   }
   14449               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14450               2 :   return resultobj;
   14451                 : fail:
   14452               0 :   return NULL;
   14453                 : }
   14454                 : 
   14455                 : 
   14456               2 : SWIGINTERN PyObject *_wrap_Geometry_IsSimple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14457               2 :   PyObject *resultobj = 0;
   14458               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14459               2 :   void *argp1 = 0 ;
   14460               2 :   int res1 = 0 ;
   14461               2 :   PyObject * obj0 = 0 ;
   14462                 :   bool result;
   14463                 :   
   14464               2 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsSimple",&obj0)) SWIG_fail;
   14465               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14466               2 :   if (!SWIG_IsOK(res1)) {
   14467               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsSimple" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14468                 :   }
   14469               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14470                 :   {
   14471               2 :     if ( bUseExceptions ) {
   14472               0 :       CPLErrorReset();
   14473                 :     }
   14474               2 :     result = (bool)OGRGeometryShadow_IsSimple(arg1);
   14475               2 :     if ( bUseExceptions ) {
   14476               0 :       CPLErr eclass = CPLGetLastErrorType();
   14477               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14478               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14479                 :       }
   14480                 :     }
   14481                 :   }
   14482               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14483               2 :   return resultobj;
   14484                 : fail:
   14485               0 :   return NULL;
   14486                 : }
   14487                 : 
   14488                 : 
   14489               1 : SWIGINTERN PyObject *_wrap_Geometry_IsRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14490               1 :   PyObject *resultobj = 0;
   14491               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14492               1 :   void *argp1 = 0 ;
   14493               1 :   int res1 = 0 ;
   14494               1 :   PyObject * obj0 = 0 ;
   14495                 :   bool result;
   14496                 :   
   14497               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsRing",&obj0)) SWIG_fail;
   14498               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14499               1 :   if (!SWIG_IsOK(res1)) {
   14500               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsRing" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14501                 :   }
   14502               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14503                 :   {
   14504               1 :     if ( bUseExceptions ) {
   14505               0 :       CPLErrorReset();
   14506                 :     }
   14507               1 :     result = (bool)OGRGeometryShadow_IsRing(arg1);
   14508               1 :     if ( bUseExceptions ) {
   14509               0 :       CPLErr eclass = CPLGetLastErrorType();
   14510               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14511               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14512                 :       }
   14513                 :     }
   14514                 :   }
   14515               1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14516               1 :   return resultobj;
   14517                 : fail:
   14518               0 :   return NULL;
   14519                 : }
   14520                 : 
   14521                 : 
   14522               0 : SWIGINTERN PyObject *_wrap_Geometry_Intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14523               0 :   PyObject *resultobj = 0;
   14524               0 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14525               0 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14526               0 :   void *argp1 = 0 ;
   14527               0 :   int res1 = 0 ;
   14528               0 :   void *argp2 = 0 ;
   14529               0 :   int res2 = 0 ;
   14530               0 :   PyObject * obj0 = 0 ;
   14531               0 :   PyObject * obj1 = 0 ;
   14532                 :   bool result;
   14533                 :   
   14534               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersects",&obj0,&obj1)) SWIG_fail;
   14535               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14536               0 :   if (!SWIG_IsOK(res1)) {
   14537               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersects" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14538                 :   }
   14539               0 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14540               0 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14541               0 :   if (!SWIG_IsOK(res2)) {
   14542               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14543                 :   }
   14544               0 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14545                 :   {
   14546               0 :     if (!arg2) {
   14547               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14548                 :     }
   14549                 :   }
   14550                 :   {
   14551               0 :     if ( bUseExceptions ) {
   14552               0 :       CPLErrorReset();
   14553                 :     }
   14554               0 :     result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
   14555               0 :     if ( bUseExceptions ) {
   14556               0 :       CPLErr eclass = CPLGetLastErrorType();
   14557               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14558               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14559                 :       }
   14560                 :     }
   14561                 :   }
   14562               0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14563               0 :   return resultobj;
   14564                 : fail:
   14565               0 :   return NULL;
   14566                 : }
   14567                 : 
   14568                 : 
   14569               2 : SWIGINTERN PyObject *_wrap_Geometry_Intersect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14570               2 :   PyObject *resultobj = 0;
   14571               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14572               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14573               2 :   void *argp1 = 0 ;
   14574               2 :   int res1 = 0 ;
   14575               2 :   void *argp2 = 0 ;
   14576               2 :   int res2 = 0 ;
   14577               2 :   PyObject * obj0 = 0 ;
   14578               2 :   PyObject * obj1 = 0 ;
   14579                 :   bool result;
   14580                 :   
   14581               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersect",&obj0,&obj1)) SWIG_fail;
   14582               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14583               2 :   if (!SWIG_IsOK(res1)) {
   14584               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersect" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14585                 :   }
   14586               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14587               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14588               2 :   if (!SWIG_IsOK(res2)) {
   14589               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersect" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14590                 :   }
   14591               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14592                 :   {
   14593               2 :     if (!arg2) {
   14594               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14595                 :     }
   14596                 :   }
   14597                 :   {
   14598               2 :     if ( bUseExceptions ) {
   14599               0 :       CPLErrorReset();
   14600                 :     }
   14601               2 :     result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
   14602               2 :     if ( bUseExceptions ) {
   14603               0 :       CPLErr eclass = CPLGetLastErrorType();
   14604               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14605               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14606                 :       }
   14607                 :     }
   14608                 :   }
   14609               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14610               2 :   return resultobj;
   14611                 : fail:
   14612               0 :   return NULL;
   14613                 : }
   14614                 : 
   14615                 : 
   14616               0 : SWIGINTERN PyObject *_wrap_Geometry_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14617               0 :   PyObject *resultobj = 0;
   14618               0 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14619               0 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14620               0 :   void *argp1 = 0 ;
   14621               0 :   int res1 = 0 ;
   14622               0 :   void *argp2 = 0 ;
   14623               0 :   int res2 = 0 ;
   14624               0 :   PyObject * obj0 = 0 ;
   14625               0 :   PyObject * obj1 = 0 ;
   14626                 :   bool result;
   14627                 :   
   14628               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Equals",&obj0,&obj1)) SWIG_fail;
   14629               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14630               0 :   if (!SWIG_IsOK(res1)) {
   14631               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equals" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14632                 :   }
   14633               0 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14634               0 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14635               0 :   if (!SWIG_IsOK(res2)) {
   14636               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equals" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14637                 :   }
   14638               0 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14639                 :   {
   14640               0 :     if (!arg2) {
   14641               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14642                 :     }
   14643                 :   }
   14644                 :   {
   14645               0 :     if ( bUseExceptions ) {
   14646               0 :       CPLErrorReset();
   14647                 :     }
   14648               0 :     result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
   14649               0 :     if ( bUseExceptions ) {
   14650               0 :       CPLErr eclass = CPLGetLastErrorType();
   14651               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14652               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14653                 :       }
   14654                 :     }
   14655                 :   }
   14656               0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14657               0 :   return resultobj;
   14658                 : fail:
   14659               0 :   return NULL;
   14660                 : }
   14661                 : 
   14662                 : 
   14663               1 : SWIGINTERN PyObject *_wrap_Geometry_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14664               1 :   PyObject *resultobj = 0;
   14665               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14666               1 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14667               1 :   void *argp1 = 0 ;
   14668               1 :   int res1 = 0 ;
   14669               1 :   void *argp2 = 0 ;
   14670               1 :   int res2 = 0 ;
   14671               1 :   PyObject * obj0 = 0 ;
   14672               1 :   PyObject * obj1 = 0 ;
   14673                 :   bool result;
   14674                 :   
   14675               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Equal",&obj0,&obj1)) SWIG_fail;
   14676               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14677               1 :   if (!SWIG_IsOK(res1)) {
   14678               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equal" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14679                 :   }
   14680               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14681               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14682               1 :   if (!SWIG_IsOK(res2)) {
   14683               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equal" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14684                 :   }
   14685               1 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14686                 :   {
   14687               1 :     if (!arg2) {
   14688               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14689                 :     }
   14690                 :   }
   14691                 :   {
   14692               1 :     if ( bUseExceptions ) {
   14693               0 :       CPLErrorReset();
   14694                 :     }
   14695               1 :     result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
   14696               1 :     if ( bUseExceptions ) {
   14697               0 :       CPLErr eclass = CPLGetLastErrorType();
   14698               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14699               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14700                 :       }
   14701                 :     }
   14702                 :   }
   14703               1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14704               1 :   return resultobj;
   14705                 : fail:
   14706               0 :   return NULL;
   14707                 : }
   14708                 : 
   14709                 : 
   14710               2 : SWIGINTERN PyObject *_wrap_Geometry_Disjoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14711               2 :   PyObject *resultobj = 0;
   14712               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14713               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14714               2 :   void *argp1 = 0 ;
   14715               2 :   int res1 = 0 ;
   14716               2 :   void *argp2 = 0 ;
   14717               2 :   int res2 = 0 ;
   14718               2 :   PyObject * obj0 = 0 ;
   14719               2 :   PyObject * obj1 = 0 ;
   14720                 :   bool result;
   14721                 :   
   14722               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Disjoint",&obj0,&obj1)) SWIG_fail;
   14723               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14724               2 :   if (!SWIG_IsOK(res1)) {
   14725               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Disjoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14726                 :   }
   14727               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14728               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14729               2 :   if (!SWIG_IsOK(res2)) {
   14730               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Disjoint" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14731                 :   }
   14732               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14733                 :   {
   14734               2 :     if (!arg2) {
   14735               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14736                 :     }
   14737                 :   }
   14738                 :   {
   14739               2 :     if ( bUseExceptions ) {
   14740               0 :       CPLErrorReset();
   14741                 :     }
   14742               2 :     result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
   14743               2 :     if ( bUseExceptions ) {
   14744               0 :       CPLErr eclass = CPLGetLastErrorType();
   14745               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14746               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14747                 :       }
   14748                 :     }
   14749                 :   }
   14750               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14751               2 :   return resultobj;
   14752                 : fail:
   14753               0 :   return NULL;
   14754                 : }
   14755                 : 
   14756                 : 
   14757               2 : SWIGINTERN PyObject *_wrap_Geometry_Touches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14758               2 :   PyObject *resultobj = 0;
   14759               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14760               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14761               2 :   void *argp1 = 0 ;
   14762               2 :   int res1 = 0 ;
   14763               2 :   void *argp2 = 0 ;
   14764               2 :   int res2 = 0 ;
   14765               2 :   PyObject * obj0 = 0 ;
   14766               2 :   PyObject * obj1 = 0 ;
   14767                 :   bool result;
   14768                 :   
   14769               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Touches",&obj0,&obj1)) SWIG_fail;
   14770               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14771               2 :   if (!SWIG_IsOK(res1)) {
   14772               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Touches" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14773                 :   }
   14774               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14775               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14776               2 :   if (!SWIG_IsOK(res2)) {
   14777               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Touches" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14778                 :   }
   14779               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14780                 :   {
   14781               2 :     if (!arg2) {
   14782               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14783                 :     }
   14784                 :   }
   14785                 :   {
   14786               2 :     if ( bUseExceptions ) {
   14787               0 :       CPLErrorReset();
   14788                 :     }
   14789               2 :     result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
   14790               2 :     if ( bUseExceptions ) {
   14791               0 :       CPLErr eclass = CPLGetLastErrorType();
   14792               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14793               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14794                 :       }
   14795                 :     }
   14796                 :   }
   14797               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14798               2 :   return resultobj;
   14799                 : fail:
   14800               0 :   return NULL;
   14801                 : }
   14802                 : 
   14803                 : 
   14804               2 : SWIGINTERN PyObject *_wrap_Geometry_Crosses(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14805               2 :   PyObject *resultobj = 0;
   14806               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14807               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14808               2 :   void *argp1 = 0 ;
   14809               2 :   int res1 = 0 ;
   14810               2 :   void *argp2 = 0 ;
   14811               2 :   int res2 = 0 ;
   14812               2 :   PyObject * obj0 = 0 ;
   14813               2 :   PyObject * obj1 = 0 ;
   14814                 :   bool result;
   14815                 :   
   14816               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Crosses",&obj0,&obj1)) SWIG_fail;
   14817               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14818               2 :   if (!SWIG_IsOK(res1)) {
   14819               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Crosses" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14820                 :   }
   14821               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14822               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14823               2 :   if (!SWIG_IsOK(res2)) {
   14824               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Crosses" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14825                 :   }
   14826               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14827                 :   {
   14828               2 :     if (!arg2) {
   14829               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14830                 :     }
   14831                 :   }
   14832                 :   {
   14833               2 :     if ( bUseExceptions ) {
   14834               0 :       CPLErrorReset();
   14835                 :     }
   14836               2 :     result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
   14837               2 :     if ( bUseExceptions ) {
   14838               0 :       CPLErr eclass = CPLGetLastErrorType();
   14839               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14840               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14841                 :       }
   14842                 :     }
   14843                 :   }
   14844               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14845               2 :   return resultobj;
   14846                 : fail:
   14847               0 :   return NULL;
   14848                 : }
   14849                 : 
   14850                 : 
   14851               2 : SWIGINTERN PyObject *_wrap_Geometry_Within(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14852               2 :   PyObject *resultobj = 0;
   14853               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14854               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14855               2 :   void *argp1 = 0 ;
   14856               2 :   int res1 = 0 ;
   14857               2 :   void *argp2 = 0 ;
   14858               2 :   int res2 = 0 ;
   14859               2 :   PyObject * obj0 = 0 ;
   14860               2 :   PyObject * obj1 = 0 ;
   14861                 :   bool result;
   14862                 :   
   14863               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Within",&obj0,&obj1)) SWIG_fail;
   14864               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14865               2 :   if (!SWIG_IsOK(res1)) {
   14866               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Within" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14867                 :   }
   14868               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14869               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14870               2 :   if (!SWIG_IsOK(res2)) {
   14871               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Within" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14872                 :   }
   14873               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14874                 :   {
   14875               2 :     if (!arg2) {
   14876               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14877                 :     }
   14878                 :   }
   14879                 :   {
   14880               2 :     if ( bUseExceptions ) {
   14881               0 :       CPLErrorReset();
   14882                 :     }
   14883               2 :     result = (bool)OGRGeometryShadow_Within(arg1,arg2);
   14884               2 :     if ( bUseExceptions ) {
   14885               0 :       CPLErr eclass = CPLGetLastErrorType();
   14886               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14887               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14888                 :       }
   14889                 :     }
   14890                 :   }
   14891               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14892               2 :   return resultobj;
   14893                 : fail:
   14894               0 :   return NULL;
   14895                 : }
   14896                 : 
   14897                 : 
   14898               2 : SWIGINTERN PyObject *_wrap_Geometry_Contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14899               2 :   PyObject *resultobj = 0;
   14900               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14901               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14902               2 :   void *argp1 = 0 ;
   14903               2 :   int res1 = 0 ;
   14904               2 :   void *argp2 = 0 ;
   14905               2 :   int res2 = 0 ;
   14906               2 :   PyObject * obj0 = 0 ;
   14907               2 :   PyObject * obj1 = 0 ;
   14908                 :   bool result;
   14909                 :   
   14910               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Contains",&obj0,&obj1)) SWIG_fail;
   14911               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14912               2 :   if (!SWIG_IsOK(res1)) {
   14913               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Contains" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14914                 :   }
   14915               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14916               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14917               2 :   if (!SWIG_IsOK(res2)) {
   14918               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14919                 :   }
   14920               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14921                 :   {
   14922               2 :     if (!arg2) {
   14923               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14924                 :     }
   14925                 :   }
   14926                 :   {
   14927               2 :     if ( bUseExceptions ) {
   14928               0 :       CPLErrorReset();
   14929                 :     }
   14930               2 :     result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
   14931               2 :     if ( bUseExceptions ) {
   14932               0 :       CPLErr eclass = CPLGetLastErrorType();
   14933               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14934               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14935                 :       }
   14936                 :     }
   14937                 :   }
   14938               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14939               2 :   return resultobj;
   14940                 : fail:
   14941               0 :   return NULL;
   14942                 : }
   14943                 : 
   14944                 : 
   14945               2 : SWIGINTERN PyObject *_wrap_Geometry_Overlaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14946               2 :   PyObject *resultobj = 0;
   14947               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14948               2 :   OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
   14949               2 :   void *argp1 = 0 ;
   14950               2 :   int res1 = 0 ;
   14951               2 :   void *argp2 = 0 ;
   14952               2 :   int res2 = 0 ;
   14953               2 :   PyObject * obj0 = 0 ;
   14954               2 :   PyObject * obj1 = 0 ;
   14955                 :   bool result;
   14956                 :   
   14957               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Overlaps",&obj0,&obj1)) SWIG_fail;
   14958               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14959               2 :   if (!SWIG_IsOK(res1)) {
   14960               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Overlaps" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   14961                 :   }
   14962               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   14963               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   14964               2 :   if (!SWIG_IsOK(res2)) {
   14965               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Overlaps" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
   14966                 :   }
   14967               2 :   arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
   14968                 :   {
   14969               2 :     if (!arg2) {
   14970               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14971                 :     }
   14972                 :   }
   14973                 :   {
   14974               2 :     if ( bUseExceptions ) {
   14975               0 :       CPLErrorReset();
   14976                 :     }
   14977               2 :     result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
   14978               2 :     if ( bUseExceptions ) {
   14979               0 :       CPLErr eclass = CPLGetLastErrorType();
   14980               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14981               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14982                 :       }
   14983                 :     }
   14984                 :   }
   14985               2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14986               2 :   return resultobj;
   14987                 : fail:
   14988               0 :   return NULL;
   14989                 : }
   14990                 : 
   14991                 : 
   14992               1 : SWIGINTERN PyObject *_wrap_Geometry_TransformTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14993               1 :   PyObject *resultobj = 0;
   14994               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   14995               1 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   14996               1 :   void *argp1 = 0 ;
   14997               1 :   int res1 = 0 ;
   14998               1 :   void *argp2 = 0 ;
   14999               1 :   int res2 = 0 ;
   15000               1 :   PyObject * obj0 = 0 ;
   15001               1 :   PyObject * obj1 = 0 ;
   15002                 :   OGRErr result;
   15003                 :   
   15004               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_TransformTo",&obj0,&obj1)) SWIG_fail;
   15005               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15006               1 :   if (!SWIG_IsOK(res1)) {
   15007               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_TransformTo" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15008                 :   }
   15009               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15010               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   15011               1 :   if (!SWIG_IsOK(res2)) {
   15012               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_TransformTo" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   15013                 :   }
   15014               1 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   15015                 :   {
   15016               1 :     if (!arg2) {
   15017               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15018                 :     }
   15019                 :   }
   15020                 :   {
   15021               1 :     if ( bUseExceptions ) {
   15022               0 :       CPLErrorReset();
   15023                 :     }
   15024               1 :     result = (OGRErr)OGRGeometryShadow_TransformTo(arg1,arg2);
   15025               1 :     if ( bUseExceptions ) {
   15026               0 :       CPLErr eclass = CPLGetLastErrorType();
   15027               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15028               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15029                 :       }
   15030                 :     }
   15031                 :   }
   15032                 :   {
   15033                 :     /* %typemap(out) OGRErr */
   15034               1 :     if ( result != 0 && bUseExceptions) {
   15035               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   15036               0 :       SWIG_fail;
   15037                 :     }
   15038                 :   }
   15039                 :   {
   15040                 :     /* %typemap(ret) OGRErr */
   15041               1 :     if (resultobj == Py_None ) {
   15042               0 :       Py_DECREF(resultobj);
   15043               0 :       resultobj = 0;
   15044                 :     }
   15045               1 :     if (resultobj == 0) {
   15046               1 :       resultobj = PyInt_FromLong( result );
   15047                 :     }
   15048                 :   }
   15049               1 :   return resultobj;
   15050                 : fail:
   15051               0 :   return NULL;
   15052                 : }
   15053                 : 
   15054                 : 
   15055              12 : SWIGINTERN PyObject *_wrap_Geometry_Transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15056              12 :   PyObject *resultobj = 0;
   15057              12 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15058              12 :   OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
   15059              12 :   void *argp1 = 0 ;
   15060              12 :   int res1 = 0 ;
   15061              12 :   void *argp2 = 0 ;
   15062              12 :   int res2 = 0 ;
   15063              12 :   PyObject * obj0 = 0 ;
   15064              12 :   PyObject * obj1 = 0 ;
   15065                 :   OGRErr result;
   15066                 :   
   15067              12 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Transform",&obj0,&obj1)) SWIG_fail;
   15068              12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15069              12 :   if (!SWIG_IsOK(res1)) {
   15070               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Transform" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15071                 :   }
   15072              12 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15073              12 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
   15074              12 :   if (!SWIG_IsOK(res2)) {
   15075               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OSRCoordinateTransformationShadow *""'"); 
   15076                 :   }
   15077              12 :   arg2 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp2);
   15078                 :   {
   15079              12 :     if (!arg2) {
   15080               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15081                 :     }
   15082                 :   }
   15083                 :   {
   15084              12 :     if ( bUseExceptions ) {
   15085               0 :       CPLErrorReset();
   15086                 :     }
   15087              12 :     result = (OGRErr)OGRGeometryShadow_Transform(arg1,arg2);
   15088              12 :     if ( bUseExceptions ) {
   15089               0 :       CPLErr eclass = CPLGetLastErrorType();
   15090               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15091               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15092                 :       }
   15093                 :     }
   15094                 :   }
   15095                 :   {
   15096                 :     /* %typemap(out) OGRErr */
   15097              12 :     if ( result != 0 && bUseExceptions) {
   15098               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   15099               0 :       SWIG_fail;
   15100                 :     }
   15101                 :   }
   15102                 :   {
   15103                 :     /* %typemap(ret) OGRErr */
   15104              12 :     if (resultobj == Py_None ) {
   15105               0 :       Py_DECREF(resultobj);
   15106               0 :       resultobj = 0;
   15107                 :     }
   15108              12 :     if (resultobj == 0) {
   15109              12 :       resultobj = PyInt_FromLong( result );
   15110                 :     }
   15111                 :   }
   15112              12 :   return resultobj;
   15113                 : fail:
   15114               0 :   return NULL;
   15115                 : }
   15116                 : 
   15117                 : 
   15118               2 : SWIGINTERN PyObject *_wrap_Geometry_GetSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15119               2 :   PyObject *resultobj = 0;
   15120               2 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15121               2 :   void *argp1 = 0 ;
   15122               2 :   int res1 = 0 ;
   15123               2 :   PyObject * obj0 = 0 ;
   15124               2 :   OSRSpatialReferenceShadow *result = 0 ;
   15125                 :   
   15126               2 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetSpatialReference",&obj0)) SWIG_fail;
   15127               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15128               2 :   if (!SWIG_IsOK(res1)) {
   15129               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15130                 :   }
   15131               2 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15132                 :   {
   15133               2 :     if ( bUseExceptions ) {
   15134               0 :       CPLErrorReset();
   15135                 :     }
   15136               2 :     result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
   15137               2 :     if ( bUseExceptions ) {
   15138               0 :       CPLErr eclass = CPLGetLastErrorType();
   15139               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15140               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15141                 :       }
   15142                 :     }
   15143                 :   }
   15144               2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   15145               2 :   return resultobj;
   15146                 : fail:
   15147               0 :   return NULL;
   15148                 : }
   15149                 : 
   15150                 : 
   15151             312 : SWIGINTERN PyObject *_wrap_Geometry_AssignSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15152             312 :   PyObject *resultobj = 0;
   15153             312 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15154             312 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   15155             312 :   void *argp1 = 0 ;
   15156             312 :   int res1 = 0 ;
   15157             312 :   void *argp2 = 0 ;
   15158             312 :   int res2 = 0 ;
   15159             312 :   PyObject * obj0 = 0 ;
   15160             312 :   PyObject * obj1 = 0 ;
   15161                 :   
   15162             312 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AssignSpatialReference",&obj0,&obj1)) SWIG_fail;
   15163             312 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15164             312 :   if (!SWIG_IsOK(res1)) {
   15165               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AssignSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15166                 :   }
   15167             312 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15168             312 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   15169             312 :   if (!SWIG_IsOK(res2)) {
   15170               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AssignSpatialReference" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   15171                 :   }
   15172             312 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   15173                 :   {
   15174             312 :     if ( bUseExceptions ) {
   15175               0 :       CPLErrorReset();
   15176                 :     }
   15177                 :     OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
   15178             312 :     if ( bUseExceptions ) {
   15179               0 :       CPLErr eclass = CPLGetLastErrorType();
   15180               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15181               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15182                 :       }
   15183                 :     }
   15184                 :   }
   15185             312 :   resultobj = SWIG_Py_Void();
   15186             312 :   return resultobj;
   15187                 : fail:
   15188               0 :   return NULL;
   15189                 : }
   15190                 : 
   15191                 : 
   15192               4 : SWIGINTERN PyObject *_wrap_Geometry_CloseRings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15193               4 :   PyObject *resultobj = 0;
   15194               4 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15195               4 :   void *argp1 = 0 ;
   15196               4 :   int res1 = 0 ;
   15197               4 :   PyObject * obj0 = 0 ;
   15198                 :   
   15199               4 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_CloseRings",&obj0)) SWIG_fail;
   15200               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15201               4 :   if (!SWIG_IsOK(res1)) {
   15202               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CloseRings" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15203                 :   }
   15204               4 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15205                 :   {
   15206               4 :     if ( bUseExceptions ) {
   15207               0 :       CPLErrorReset();
   15208                 :     }
   15209                 :     OGRGeometryShadow_CloseRings(arg1);
   15210               4 :     if ( bUseExceptions ) {
   15211               0 :       CPLErr eclass = CPLGetLastErrorType();
   15212               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15213               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15214                 :       }
   15215                 :     }
   15216                 :   }
   15217               4 :   resultobj = SWIG_Py_Void();
   15218               4 :   return resultobj;
   15219                 : fail:
   15220               0 :   return NULL;
   15221                 : }
   15222                 : 
   15223                 : 
   15224               1 : SWIGINTERN PyObject *_wrap_Geometry_FlattenTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15225               1 :   PyObject *resultobj = 0;
   15226               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15227               1 :   void *argp1 = 0 ;
   15228               1 :   int res1 = 0 ;
   15229               1 :   PyObject * obj0 = 0 ;
   15230                 :   
   15231               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_FlattenTo2D",&obj0)) SWIG_fail;
   15232               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15233               1 :   if (!SWIG_IsOK(res1)) {
   15234               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FlattenTo2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15235                 :   }
   15236               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15237                 :   {
   15238               1 :     if ( bUseExceptions ) {
   15239               0 :       CPLErrorReset();
   15240                 :     }
   15241                 :     OGRGeometryShadow_FlattenTo2D(arg1);
   15242               1 :     if ( bUseExceptions ) {
   15243               0 :       CPLErr eclass = CPLGetLastErrorType();
   15244               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15245               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15246                 :       }
   15247                 :     }
   15248                 :   }
   15249               1 :   resultobj = SWIG_Py_Void();
   15250               1 :   return resultobj;
   15251                 : fail:
   15252               0 :   return NULL;
   15253                 : }
   15254                 : 
   15255                 : 
   15256               1 : SWIGINTERN PyObject *_wrap_Geometry_Segmentize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15257               1 :   PyObject *resultobj = 0;
   15258               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15259                 :   double arg2 ;
   15260               1 :   void *argp1 = 0 ;
   15261               1 :   int res1 = 0 ;
   15262                 :   double val2 ;
   15263               1 :   int ecode2 = 0 ;
   15264               1 :   PyObject * obj0 = 0 ;
   15265               1 :   PyObject * obj1 = 0 ;
   15266                 :   
   15267               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Segmentize",&obj0,&obj1)) SWIG_fail;
   15268               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15269               1 :   if (!SWIG_IsOK(res1)) {
   15270               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Segmentize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15271                 :   }
   15272               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15273               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   15274               1 :   if (!SWIG_IsOK(ecode2)) {
   15275               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Segmentize" "', argument " "2"" of type '" "double""'");
   15276                 :   } 
   15277               1 :   arg2 = static_cast< double >(val2);
   15278                 :   {
   15279               1 :     if ( bUseExceptions ) {
   15280               0 :       CPLErrorReset();
   15281                 :     }
   15282                 :     OGRGeometryShadow_Segmentize(arg1,arg2);
   15283               1 :     if ( bUseExceptions ) {
   15284               0 :       CPLErr eclass = CPLGetLastErrorType();
   15285               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15286               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15287                 :       }
   15288                 :     }
   15289                 :   }
   15290               1 :   resultobj = SWIG_Py_Void();
   15291               1 :   return resultobj;
   15292                 : fail:
   15293               0 :   return NULL;
   15294                 : }
   15295                 : 
   15296                 : 
   15297              25 : SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15298              25 :   PyObject *resultobj = 0;
   15299              25 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15300                 :   double *arg2 ;
   15301              25 :   void *argp1 = 0 ;
   15302              25 :   int res1 = 0 ;
   15303                 :   double argout2[4] ;
   15304              25 :   PyObject * obj0 = 0 ;
   15305                 :   
   15306                 :   {
   15307                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   15308              25 :     arg2 = argout2;
   15309                 :   }
   15310              25 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetEnvelope",&obj0)) SWIG_fail;
   15311              25 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15312              25 :   if (!SWIG_IsOK(res1)) {
   15313               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15314                 :   }
   15315              25 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15316                 :   {
   15317              25 :     if ( bUseExceptions ) {
   15318               0 :       CPLErrorReset();
   15319                 :     }
   15320                 :     OGRGeometryShadow_GetEnvelope(arg1,arg2);
   15321              25 :     if ( bUseExceptions ) {
   15322               0 :       CPLErr eclass = CPLGetLastErrorType();
   15323               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15324               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15325                 :       }
   15326                 :     }
   15327                 :   }
   15328              25 :   resultobj = SWIG_Py_Void();
   15329                 :   {
   15330                 :     /* %typemap(argout) (double argout[ANY]) */
   15331              25 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
   15332              25 :     resultobj = t_output_helper(resultobj,out);
   15333                 :   }
   15334              25 :   return resultobj;
   15335                 : fail:
   15336               0 :   return NULL;
   15337                 : }
   15338                 : 
   15339                 : 
   15340               7 : SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15341               7 :   PyObject *resultobj = 0;
   15342               7 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15343                 :   double *arg2 ;
   15344               7 :   void *argp1 = 0 ;
   15345               7 :   int res1 = 0 ;
   15346                 :   double argout2[6] ;
   15347               7 :   PyObject * obj0 = 0 ;
   15348                 :   
   15349                 :   {
   15350                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   15351               7 :     arg2 = argout2;
   15352                 :   }
   15353               7 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetEnvelope3D",&obj0)) SWIG_fail;
   15354               7 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15355               7 :   if (!SWIG_IsOK(res1)) {
   15356               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15357                 :   }
   15358               7 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15359                 :   {
   15360               7 :     if ( bUseExceptions ) {
   15361               0 :       CPLErrorReset();
   15362                 :     }
   15363                 :     OGRGeometryShadow_GetEnvelope3D(arg1,arg2);
   15364               7 :     if ( bUseExceptions ) {
   15365               0 :       CPLErr eclass = CPLGetLastErrorType();
   15366               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15367               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15368                 :       }
   15369                 :     }
   15370                 :   }
   15371               7 :   resultobj = SWIG_Py_Void();
   15372                 :   {
   15373                 :     /* %typemap(argout) (double argout[ANY]) */
   15374               7 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   15375               7 :     resultobj = t_output_helper(resultobj,out);
   15376                 :   }
   15377               7 :   return resultobj;
   15378                 : fail:
   15379               0 :   return NULL;
   15380                 : }
   15381                 : 
   15382                 : 
   15383               4 : SWIGINTERN PyObject *_wrap_Geometry_Centroid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15384               4 :   PyObject *resultobj = 0;
   15385               4 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15386               4 :   void *argp1 = 0 ;
   15387               4 :   int res1 = 0 ;
   15388               4 :   PyObject * obj0 = 0 ;
   15389               4 :   OGRGeometryShadow *result = 0 ;
   15390                 :   
   15391               4 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Centroid",&obj0)) SWIG_fail;
   15392               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15393               4 :   if (!SWIG_IsOK(res1)) {
   15394               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Centroid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15395                 :   }
   15396               4 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15397                 :   {
   15398               4 :     if ( bUseExceptions ) {
   15399               0 :       CPLErrorReset();
   15400                 :     }
   15401               4 :     result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
   15402               4 :     if ( bUseExceptions ) {
   15403               0 :       CPLErr eclass = CPLGetLastErrorType();
   15404               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15405               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15406                 :       }
   15407                 :     }
   15408                 :   }
   15409               4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
   15410               4 :   return resultobj;
   15411                 : fail:
   15412               0 :   return NULL;
   15413                 : }
   15414                 : 
   15415                 : 
   15416               0 : SWIGINTERN PyObject *_wrap_Geometry_WkbSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15417               0 :   PyObject *resultobj = 0;
   15418               0 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15419               0 :   void *argp1 = 0 ;
   15420               0 :   int res1 = 0 ;
   15421               0 :   PyObject * obj0 = 0 ;
   15422                 :   int result;
   15423                 :   
   15424               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_WkbSize",&obj0)) SWIG_fail;
   15425               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15426               0 :   if (!SWIG_IsOK(res1)) {
   15427               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_WkbSize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15428                 :   }
   15429               0 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15430                 :   {
   15431               0 :     if ( bUseExceptions ) {
   15432               0 :       CPLErrorReset();
   15433                 :     }
   15434               0 :     result = (int)OGRGeometryShadow_WkbSize(arg1);
   15435               0 :     if ( bUseExceptions ) {
   15436               0 :       CPLErr eclass = CPLGetLastErrorType();
   15437               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15438               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15439                 :       }
   15440                 :     }
   15441                 :   }
   15442               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15443               0 :   return resultobj;
   15444                 : fail:
   15445               0 :   return NULL;
   15446                 : }
   15447                 : 
   15448                 : 
   15449              37 : SWIGINTERN PyObject *_wrap_Geometry_GetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15450              37 :   PyObject *resultobj = 0;
   15451              37 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15452              37 :   void *argp1 = 0 ;
   15453              37 :   int res1 = 0 ;
   15454              37 :   PyObject * obj0 = 0 ;
   15455                 :   int result;
   15456                 :   
   15457              37 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetCoordinateDimension",&obj0)) SWIG_fail;
   15458              37 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15459              37 :   if (!SWIG_IsOK(res1)) {
   15460               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15461                 :   }
   15462              37 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15463                 :   {
   15464              37 :     if ( bUseExceptions ) {
   15465               0 :       CPLErrorReset();
   15466                 :     }
   15467              37 :     result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
   15468              37 :     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              37 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15476              37 :   return resultobj;
   15477                 : fail:
   15478               0 :   return NULL;
   15479                 : }
   15480                 : 
   15481                 : 
   15482               0 : SWIGINTERN PyObject *_wrap_Geometry_SetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15483               0 :   PyObject *resultobj = 0;
   15484               0 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15485                 :   int arg2 ;
   15486               0 :   void *argp1 = 0 ;
   15487               0 :   int res1 = 0 ;
   15488                 :   int val2 ;
   15489               0 :   int ecode2 = 0 ;
   15490               0 :   PyObject * obj0 = 0 ;
   15491               0 :   PyObject * obj1 = 0 ;
   15492                 :   
   15493               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SetCoordinateDimension",&obj0,&obj1)) SWIG_fail;
   15494               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15495               0 :   if (!SWIG_IsOK(res1)) {
   15496               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15497                 :   }
   15498               0 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15499               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   15500               0 :   if (!SWIG_IsOK(ecode2)) {
   15501               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetCoordinateDimension" "', argument " "2"" of type '" "int""'");
   15502                 :   } 
   15503               0 :   arg2 = static_cast< int >(val2);
   15504                 :   {
   15505               0 :     if ( bUseExceptions ) {
   15506               0 :       CPLErrorReset();
   15507                 :     }
   15508                 :     OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
   15509               0 :     if ( bUseExceptions ) {
   15510               0 :       CPLErr eclass = CPLGetLastErrorType();
   15511               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15512               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15513                 :       }
   15514                 :     }
   15515                 :   }
   15516               0 :   resultobj = SWIG_Py_Void();
   15517               0 :   return resultobj;
   15518                 : fail:
   15519               0 :   return NULL;
   15520                 : }
   15521                 : 
   15522                 : 
   15523               1 : SWIGINTERN PyObject *_wrap_Geometry_GetDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15524               1 :   PyObject *resultobj = 0;
   15525               1 :   OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
   15526               1 :   void *argp1 = 0 ;
   15527               1 :   int res1 = 0 ;
   15528               1 :   PyObject * obj0 = 0 ;
   15529                 :   int result;
   15530                 :   
   15531               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetDimension",&obj0)) SWIG_fail;
   15532               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   15533               1 :   if (!SWIG_IsOK(res1)) {
   15534               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
   15535                 :   }
   15536               1 :   arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
   15537                 :   {
   15538               1 :     if ( bUseExceptions ) {
   15539               0 :       CPLErrorReset();
   15540                 :     }
   15541               1 :     result = (int)OGRGeometryShadow_GetDimension(arg1);
   15542               1 :     if ( bUseExceptions ) {
   15543               0 :       CPLErr eclass = CPLGetLastErrorType();
   15544               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15545               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15546                 :       }
   15547                 :     }
   15548                 :   }
   15549               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15550               1 :   return resultobj;
   15551                 : fail:
   15552               0 :   return NULL;
   15553                 : }
   15554                 : 
   15555                 : 
   15556               1 : SWIGINTERN PyObject *Geometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15557                 :   PyObject *obj;
   15558               1 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   15559               1 :   SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeometryShadow, SWIG_NewClientData(obj));
   15560               1 :   return SWIG_Py_Void();
   15561                 : }
   15562                 : 
   15563               0 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15564               0 :   PyObject *resultobj = 0;
   15565                 :   int result;
   15566                 :   
   15567               0 :   if (!PyArg_ParseTuple(args,(char *)":GetDriverCount")) SWIG_fail;
   15568                 :   {
   15569               0 :     if ( bUseExceptions ) {
   15570               0 :       CPLErrorReset();
   15571                 :     }
   15572               0 :     result = (int)OGRGetDriverCount();
   15573               0 :     if ( bUseExceptions ) {
   15574               0 :       CPLErr eclass = CPLGetLastErrorType();
   15575               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15576               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15577                 :       }
   15578                 :     }
   15579                 :   }
   15580               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15581               0 :   return resultobj;
   15582                 : fail:
   15583               0 :   return NULL;
   15584                 : }
   15585                 : 
   15586                 : 
   15587               5 : SWIGINTERN PyObject *_wrap_GetOpenDSCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15588               5 :   PyObject *resultobj = 0;
   15589                 :   int result;
   15590                 :   
   15591               5 :   if (!PyArg_ParseTuple(args,(char *)":GetOpenDSCount")) SWIG_fail;
   15592                 :   {
   15593               5 :     if ( bUseExceptions ) {
   15594               0 :       CPLErrorReset();
   15595                 :     }
   15596               5 :     result = (int)OGRGetOpenDSCount();
   15597               5 :     if ( bUseExceptions ) {
   15598               0 :       CPLErr eclass = CPLGetLastErrorType();
   15599               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15600               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15601                 :       }
   15602                 :     }
   15603                 :   }
   15604               5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15605               5 :   return resultobj;
   15606                 : fail:
   15607               0 :   return NULL;
   15608                 : }
   15609                 : 
   15610                 : 
   15611               4 : SWIGINTERN PyObject *_wrap_SetGenerate_DB2_V72_BYTE_ORDER(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15612               4 :   PyObject *resultobj = 0;
   15613                 :   int arg1 ;
   15614                 :   int val1 ;
   15615               4 :   int ecode1 = 0 ;
   15616               4 :   PyObject * obj0 = 0 ;
   15617                 :   OGRErr result;
   15618                 :   
   15619               4 :   if (!PyArg_ParseTuple(args,(char *)"O:SetGenerate_DB2_V72_BYTE_ORDER",&obj0)) SWIG_fail;
   15620               4 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   15621               4 :   if (!SWIG_IsOK(ecode1)) {
   15622               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetGenerate_DB2_V72_BYTE_ORDER" "', argument " "1"" of type '" "int""'");
   15623                 :   } 
   15624               4 :   arg1 = static_cast< int >(val1);
   15625                 :   {
   15626               4 :     if ( bUseExceptions ) {
   15627               0 :       CPLErrorReset();
   15628                 :     }
   15629               4 :     result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
   15630               4 :     if ( bUseExceptions ) {
   15631               0 :       CPLErr eclass = CPLGetLastErrorType();
   15632               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15633               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15634                 :       }
   15635                 :     }
   15636                 :   }
   15637                 :   {
   15638                 :     /* %typemap(out) OGRErr */
   15639               4 :     if ( result != 0 && bUseExceptions) {
   15640               0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   15641               0 :       SWIG_fail;
   15642                 :     }
   15643                 :   }
   15644                 :   {
   15645                 :     /* %typemap(ret) OGRErr */
   15646               4 :     if (resultobj == Py_None ) {
   15647               0 :       Py_DECREF(resultobj);
   15648               0 :       resultobj = 0;
   15649                 :     }
   15650               4 :     if (resultobj == 0) {
   15651               4 :       resultobj = PyInt_FromLong( result );
   15652                 :     }
   15653                 :   }
   15654               4 :   return resultobj;
   15655                 : fail:
   15656               0 :   return NULL;
   15657                 : }
   15658                 : 
   15659                 : 
   15660               3 : SWIGINTERN PyObject *_wrap_RegisterAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15661               3 :   PyObject *resultobj = 0;
   15662                 :   
   15663               3 :   if (!PyArg_ParseTuple(args,(char *)":RegisterAll")) SWIG_fail;
   15664                 :   {
   15665               3 :     if ( bUseExceptions ) {
   15666               0 :       CPLErrorReset();
   15667                 :     }
   15668               3 :     OGRRegisterAll();
   15669               3 :     if ( bUseExceptions ) {
   15670               0 :       CPLErr eclass = CPLGetLastErrorType();
   15671               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15672               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15673                 :       }
   15674                 :     }
   15675                 :   }
   15676               3 :   resultobj = SWIG_Py_Void();
   15677               3 :   return resultobj;
   15678                 : fail:
   15679               0 :   return NULL;
   15680                 : }
   15681                 : 
   15682                 : 
   15683              11 : SWIGINTERN PyObject *_wrap_GeometryTypeToName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15684              11 :   PyObject *resultobj = 0;
   15685                 :   OGRwkbGeometryType arg1 ;
   15686                 :   int val1 ;
   15687              11 :   int ecode1 = 0 ;
   15688              11 :   PyObject * obj0 = 0 ;
   15689              11 :   char *result = 0 ;
   15690                 :   
   15691              11 :   if (!PyArg_ParseTuple(args,(char *)"O:GeometryTypeToName",&obj0)) SWIG_fail;
   15692              11 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   15693              11 :   if (!SWIG_IsOK(ecode1)) {
   15694               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GeometryTypeToName" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
   15695                 :   } 
   15696              11 :   arg1 = static_cast< OGRwkbGeometryType >(val1);
   15697                 :   {
   15698              11 :     if ( bUseExceptions ) {
   15699               0 :       CPLErrorReset();
   15700                 :     }
   15701              11 :     result = (char *)OGRGeometryTypeToName(arg1);
   15702              11 :     if ( bUseExceptions ) {
   15703               0 :       CPLErr eclass = CPLGetLastErrorType();
   15704               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15705               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15706                 :       }
   15707                 :     }
   15708                 :   }
   15709              11 :   resultobj = SWIG_FromCharPtr((const char *)result);
   15710              11 :   return resultobj;
   15711                 : fail:
   15712               0 :   return NULL;
   15713                 : }
   15714                 : 
   15715                 : 
   15716             287 : SWIGINTERN PyObject *_wrap_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15717             287 :   PyObject *resultobj = 0;
   15718                 :   OGRFieldType arg1 ;
   15719                 :   int val1 ;
   15720             287 :   int ecode1 = 0 ;
   15721             287 :   PyObject * obj0 = 0 ;
   15722             287 :   char *result = 0 ;
   15723                 :   
   15724             287 :   if (!PyArg_ParseTuple(args,(char *)"O:GetFieldTypeName",&obj0)) SWIG_fail;
   15725             287 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   15726             287 :   if (!SWIG_IsOK(ecode1)) {
   15727               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldType""'");
   15728                 :   } 
   15729             287 :   arg1 = static_cast< OGRFieldType >(val1);
   15730                 :   {
   15731             287 :     if ( bUseExceptions ) {
   15732               0 :       CPLErrorReset();
   15733                 :     }
   15734             287 :     result = (char *)OGR_GetFieldTypeName(arg1);
   15735             287 :     if ( bUseExceptions ) {
   15736               0 :       CPLErr eclass = CPLGetLastErrorType();
   15737               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15738               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15739                 :       }
   15740                 :     }
   15741                 :   }
   15742             287 :   resultobj = SWIG_FromCharPtr((const char *)result);
   15743             287 :   return resultobj;
   15744                 : fail:
   15745               0 :   return NULL;
   15746                 : }
   15747                 : 
   15748                 : 
   15749               1 : SWIGINTERN PyObject *_wrap_GetOpenDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15750               1 :   PyObject *resultobj = 0;
   15751                 :   int arg1 ;
   15752                 :   int val1 ;
   15753               1 :   int ecode1 = 0 ;
   15754               1 :   PyObject * obj0 = 0 ;
   15755               1 :   OGRDataSourceShadow *result = 0 ;
   15756                 :   
   15757               1 :   if (!PyArg_ParseTuple(args,(char *)"O:GetOpenDS",&obj0)) SWIG_fail;
   15758               1 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   15759               1 :   if (!SWIG_IsOK(ecode1)) {
   15760               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetOpenDS" "', argument " "1"" of type '" "int""'");
   15761                 :   } 
   15762               1 :   arg1 = static_cast< int >(val1);
   15763                 :   {
   15764               1 :     if ( bUseExceptions ) {
   15765               0 :       CPLErrorReset();
   15766                 :     }
   15767               1 :     result = (OGRDataSourceShadow *)GetOpenDS(arg1);
   15768               1 :     if ( bUseExceptions ) {
   15769               0 :       CPLErr eclass = CPLGetLastErrorType();
   15770               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15771               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15772                 :       }
   15773                 :     }
   15774                 :   }
   15775               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
   15776               1 :   return resultobj;
   15777                 : fail:
   15778               0 :   return NULL;
   15779                 : }
   15780                 : 
   15781                 : 
   15782             703 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15783             703 :   PyObject *resultobj = 0;
   15784             703 :   char *arg1 = (char *) 0 ;
   15785             703 :   int arg2 = (int) 0 ;
   15786             703 :   int bToFree1 = 0 ;
   15787                 :   int val2 ;
   15788             703 :   int ecode2 = 0 ;
   15789             703 :   PyObject * obj0 = 0 ;
   15790             703 :   PyObject * obj1 = 0 ;
   15791                 :   char *  kwnames[] = {
   15792                 :     (char *) "utf8_path",(char *) "update", NULL 
   15793             703 :   };
   15794             703 :   OGRDataSourceShadow *result = 0 ;
   15795                 :   
   15796             703 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Open",kwnames,&obj0,&obj1)) SWIG_fail;
   15797                 :   {
   15798                 :     /* %typemap(in) (const char *utf8_path) */
   15799             703 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   15800             703 :     if (arg1 == NULL)
   15801                 :     {
   15802               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   15803               0 :       SWIG_fail;
   15804                 :     }
   15805                 :   }
   15806             703 :   if (obj1) {
   15807             194 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   15808             194 :     if (!SWIG_IsOK(ecode2)) {
   15809               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Open" "', argument " "2"" of type '" "int""'");
   15810                 :     } 
   15811             194 :     arg2 = static_cast< int >(val2);
   15812                 :   }
   15813                 :   {
   15814             703 :     if ( bUseExceptions ) {
   15815               0 :       CPLErrorReset();
   15816                 :     }
   15817             703 :     result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
   15818             703 :     if ( bUseExceptions ) {
   15819               0 :       CPLErr eclass = CPLGetLastErrorType();
   15820               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15821               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15822                 :       }
   15823                 :     }
   15824                 :   }
   15825             703 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
   15826                 :   {
   15827                 :     /* %typemap(freearg) (const char *utf8_path) */
   15828             703 :     GDALPythonFreeCStr(arg1, bToFree1);
   15829                 :   }
   15830             703 :   return resultobj;
   15831                 : fail:
   15832                 :   {
   15833                 :     /* %typemap(freearg) (const char *utf8_path) */
   15834               0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15835                 :   }
   15836               0 :   return NULL;
   15837                 : }
   15838                 : 
   15839                 : 
   15840               9 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15841               9 :   PyObject *resultobj = 0;
   15842               9 :   char *arg1 = (char *) 0 ;
   15843               9 :   int arg2 = (int) 0 ;
   15844               9 :   int bToFree1 = 0 ;
   15845                 :   int val2 ;
   15846               9 :   int ecode2 = 0 ;
   15847               9 :   PyObject * obj0 = 0 ;
   15848               9 :   PyObject * obj1 = 0 ;
   15849                 :   char *  kwnames[] = {
   15850                 :     (char *) "utf8_path",(char *) "update", NULL 
   15851               9 :   };
   15852               9 :   OGRDataSourceShadow *result = 0 ;
   15853                 :   
   15854               9 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:OpenShared",kwnames,&obj0,&obj1)) SWIG_fail;
   15855                 :   {
   15856                 :     /* %typemap(in) (const char *utf8_path) */
   15857               9 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   15858               9 :     if (arg1 == NULL)
   15859                 :     {
   15860               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   15861               0 :       SWIG_fail;
   15862                 :     }
   15863                 :   }
   15864               9 :   if (obj1) {
   15865               5 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   15866               5 :     if (!SWIG_IsOK(ecode2)) {
   15867               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenShared" "', argument " "2"" of type '" "int""'");
   15868                 :     } 
   15869               5 :     arg2 = static_cast< int >(val2);
   15870                 :   }
   15871                 :   {
   15872               9 :     if ( bUseExceptions ) {
   15873               0 :       CPLErrorReset();
   15874                 :     }
   15875               9 :     result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
   15876               9 :     if ( bUseExceptions ) {
   15877               0 :       CPLErr eclass = CPLGetLastErrorType();
   15878               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15879               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15880                 :       }
   15881                 :     }
   15882                 :   }
   15883               9 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
   15884                 :   {
   15885                 :     /* %typemap(freearg) (const char *utf8_path) */
   15886               9 :     GDALPythonFreeCStr(arg1, bToFree1);
   15887                 :   }
   15888               9 :   return resultobj;
   15889                 : fail:
   15890                 :   {
   15891                 :     /* %typemap(freearg) (const char *utf8_path) */
   15892               0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15893                 :   }
   15894               0 :   return NULL;
   15895                 : }
   15896                 : 
   15897                 : 
   15898             366 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15899             366 :   PyObject *resultobj = 0;
   15900             366 :   char *arg1 = (char *) 0 ;
   15901                 :   int res1 ;
   15902             366 :   char *buf1 = 0 ;
   15903             366 :   int alloc1 = 0 ;
   15904             366 :   PyObject * obj0 = 0 ;
   15905             366 :   OGRDriverShadow *result = 0 ;
   15906                 :   
   15907             366 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDriverByName",&obj0)) SWIG_fail;
   15908             366 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   15909             366 :   if (!SWIG_IsOK(res1)) {
   15910               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
   15911                 :   }
   15912             366 :   arg1 = reinterpret_cast< char * >(buf1);
   15913                 :   {
   15914             366 :     if (!arg1) {
   15915               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15916                 :     }
   15917                 :   }
   15918                 :   {
   15919             366 :     if ( bUseExceptions ) {
   15920               0 :       CPLErrorReset();
   15921                 :     }
   15922             366 :     result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
   15923             366 :     if ( bUseExceptions ) {
   15924               0 :       CPLErr eclass = CPLGetLastErrorType();
   15925               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15926               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15927                 :       }
   15928                 :     }
   15929                 :   }
   15930             366 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
   15931             366 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   15932             366 :   return resultobj;
   15933                 : fail:
   15934               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   15935               0 :   return NULL;
   15936                 : }
   15937                 : 
   15938                 : 
   15939               0 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15940               0 :   PyObject *resultobj = 0;
   15941                 :   int arg1 ;
   15942                 :   int val1 ;
   15943               0 :   int ecode1 = 0 ;
   15944               0 :   PyObject * obj0 = 0 ;
   15945               0 :   OGRDriverShadow *result = 0 ;
   15946                 :   
   15947               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDriver",&obj0)) SWIG_fail;
   15948               0 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   15949               0 :   if (!SWIG_IsOK(ecode1)) {
   15950               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
   15951                 :   } 
   15952               0 :   arg1 = static_cast< int >(val1);
   15953                 :   {
   15954               0 :     if ( bUseExceptions ) {
   15955               0 :       CPLErrorReset();
   15956                 :     }
   15957               0 :     result = (OGRDriverShadow *)GetDriver(arg1);
   15958               0 :     if ( bUseExceptions ) {
   15959               0 :       CPLErr eclass = CPLGetLastErrorType();
   15960               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15961               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15962                 :       }
   15963                 :     }
   15964                 :   }
   15965               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
   15966               0 :   return resultobj;
   15967                 : fail:
   15968               0 :   return NULL;
   15969                 : }
   15970                 : 
   15971                 : 
   15972              53 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15973              53 :   PyObject *resultobj = 0;
   15974              53 :   char **arg1 = (char **) 0 ;
   15975              53 :   int arg2 = (int) 0 ;
   15976                 :   int val2 ;
   15977              53 :   int ecode2 = 0 ;
   15978              53 :   PyObject * obj0 = 0 ;
   15979              53 :   PyObject * obj1 = 0 ;
   15980              53 :   char **result = 0 ;
   15981                 :   
   15982              53 :   if (!PyArg_ParseTuple(args,(char *)"O|O:GeneralCmdLineProcessor",&obj0,&obj1)) SWIG_fail;
   15983                 :   {
   15984                 :     /* %typemap(in) char **options */
   15985                 :     /* Check if is a list */
   15986              53 :     if ( ! PySequence_Check(obj0)) {
   15987               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   15988               0 :       SWIG_fail;
   15989                 :     }
   15990                 :     
   15991              53 :     int size = PySequence_Size(obj0);
   15992             323 :     for (int i = 0; i < size; i++) {
   15993             270 :       PyObject* pyObj = PySequence_GetItem(obj0,i);
   15994             270 :       if (PyUnicode_Check(pyObj))
   15995                 :       {
   15996                 :         char *pszStr;
   15997                 :         Py_ssize_t nLen;
   15998               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   15999                 : #if PY_VERSION_HEX >= 0x03000000
   16000                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   16001                 : #else
   16002               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   16003                 : #endif
   16004               0 :         arg1 = CSLAddString( arg1, pszStr );
   16005               0 :         Py_XDECREF(pyUTF8Str);
   16006                 :       }
   16007                 : #if PY_VERSION_HEX >= 0x03000000
   16008                 :       else if (PyBytes_Check(pyObj))
   16009                 :       arg1 = CSLAddString( arg1, PyBytes_AsString(pyObj) );
   16010                 : #else
   16011             270 :       else if (PyString_Check(pyObj))
   16012             270 :       arg1 = CSLAddString( arg1, PyString_AsString(pyObj) );
   16013                 : #endif
   16014                 :       else
   16015                 :       {
   16016               0 :         Py_DECREF(pyObj);
   16017               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   16018               0 :         SWIG_fail;
   16019                 :       }
   16020             270 :       Py_DECREF(pyObj);
   16021                 :     }
   16022                 :   }
   16023              53 :   if (obj1) {
   16024               0 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   16025               0 :     if (!SWIG_IsOK(ecode2)) {
   16026               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
   16027                 :     } 
   16028               0 :     arg2 = static_cast< int >(val2);
   16029                 :   }
   16030                 :   {
   16031              53 :     if ( bUseExceptions ) {
   16032               0 :       CPLErrorReset();
   16033                 :     }
   16034              53 :     result = (char **)GeneralCmdLineProcessor(arg1,arg2);
   16035              53 :     if ( bUseExceptions ) {
   16036               0 :       CPLErr eclass = CPLGetLastErrorType();
   16037               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16038               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16039                 :       }
   16040                 :     }
   16041                 :   }
   16042                 :   {
   16043                 :     /* %typemap(out) char **CSL -> ( string ) */
   16044              53 :     char **stringarray = result;
   16045              53 :     if ( stringarray == NULL ) {
   16046               0 :       resultobj = Py_None;
   16047               0 :       Py_INCREF( resultobj );
   16048                 :     }
   16049                 :     else {
   16050              53 :       int len = CSLCount( stringarray );
   16051              53 :       resultobj = PyList_New( len );
   16052             323 :       for ( int i = 0; i < len; ++i ) {
   16053             270 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   16054             270 :         PyList_SetItem(resultobj, i, o );
   16055                 :       }
   16056                 :     }
   16057              53 :     CSLDestroy(result);
   16058                 :   }
   16059                 :   {
   16060                 :     /* %typemap(freearg) char **options */
   16061              53 :     CSLDestroy( arg1 );
   16062                 :   }
   16063              53 :   return resultobj;
   16064                 : fail:
   16065                 :   {
   16066                 :     /* %typemap(freearg) char **options */
   16067               0 :     CSLDestroy( arg1 );
   16068                 :   }
   16069               0 :   return NULL;
   16070                 : }
   16071                 : 
   16072                 : 
   16073                 : static PyMethodDef SwigMethods[] = {
   16074                 :    { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
   16075                 :    { (char *)"GetUseExceptions", _wrap_GetUseExceptions, METH_VARARGS, (char *)"GetUseExceptions() -> int"},
   16076                 :    { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, (char *)"UseExceptions()"},
   16077                 :    { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, (char *)"DontUseExceptions()"},
   16078                 :    { (char *)"Driver_name_get", _wrap_Driver_name_get, METH_VARARGS, (char *)"Driver_name_get(Driver self) -> char"},
   16079                 :    { (char *)"Driver_CreateDataSource", (PyCFunction) _wrap_Driver_CreateDataSource, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   16080                 :     "Driver_CreateDataSource(Driver self, char utf8_path, char options = None) -> DataSource\n"
   16081                 :     "\n"
   16082                 :     "OGRDataSourceH\n"
   16083                 :     "OGR_Dr_CreateDataSource(OGRSFDriverH hDriver, const char *pszName,\n"
   16084                 :     "char **papszOptions)\n"
   16085                 :     "\n"
   16086                 :     "This function attempts to create a new data source based on the passed\n"
   16087                 :     "driver.\n"
   16088                 :     "\n"
   16089                 :     "The papszOptions argument can be used to control driver specific\n"
   16090                 :     "creation options. These options are normally documented in the format\n"
   16091                 :     "specific documentation.\n"
   16092                 :     "\n"
   16093                 :     "It is important to call OGR_DS_Destroy() when the datasource is no\n"
   16094                 :     "longer used to ensure that all data has been properly flushed to disk.\n"
   16095                 :     "\n"
   16096                 :     "This function is the same as the C++ method\n"
   16097                 :     "OGRSFDriver::CreateDataSource().\n"
   16098                 :     "\n"
   16099                 :     "Parameters:\n"
   16100                 :     "-----------\n"
   16101                 :     "\n"
   16102                 :     "hDriver:  handle to the driver on which data source creation is based.\n"
   16103                 :     "\n"
   16104                 :     "pszName:  the name for the new data source. UTF-8 encoded.\n"
   16105                 :     "\n"
   16106                 :     "papszOptions:  a StringList of name=value options. Options are driver\n"
   16107                 :     "specific, and driver information can be found at the following\n"
   16108                 :     "url:http://www.gdal.org/ogr/ogr_formats.html\n"
   16109                 :     "\n"
   16110                 :     "NULL is returned on failure, or a new OGRDataSource handle on success.\n"
   16111                 :     "\n"
   16112                 :     ""},
   16113                 :    { (char *)"Driver_CopyDataSource", (PyCFunction) _wrap_Driver_CopyDataSource, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   16114                 :     "Driver_CopyDataSource(Driver self, DataSource copy_ds, char utf8_path, char options = None) -> DataSource\n"
   16115                 :     "\n"
   16116                 :     "OGRDataSourceH\n"
   16117                 :     "OGR_Dr_CopyDataSource(OGRSFDriverH hDriver, OGRDataSourceH hSrcDS,\n"
   16118                 :     "const char *pszNewName, char **papszOptions)\n"
   16119                 :     "\n"
   16120                 :     "This function creates a new datasource by copying all the layers from\n"
   16121                 :     "the source datasource.\n"
   16122                 :     "\n"
   16123                 :     "It is important to call OGR_DS_Destroy() when the datasource is no\n"
   16124                 :     "longer used to ensure that all data has been properly flushed to disk.\n"
   16125                 :     "\n"
   16126                 :     "This function is the same as the C++ method\n"
   16127                 :     "OGRSFDriver::CopyDataSource().\n"
   16128                 :     "\n"
   16129                 :     "Parameters:\n"
   16130                 :     "-----------\n"
   16131                 :     "\n"
   16132                 :     "hDriver:  handle to the driver on which data source creation is based.\n"
   16133                 :     "\n"
   16134                 :     "hSrcDS:  source datasource\n"
   16135                 :     "\n"
   16136                 :     "pszNewName:  the name for the new data source.\n"
   16137                 :     "\n"
   16138                 :     "papszOptions:  a StringList of name=value options. Options are driver\n"
   16139                 :     "specific, and driver information can be found at the following\n"
   16140                 :     "url:http://www.gdal.org/ogr/ogr_formats.html\n"
   16141                 :     "\n"
   16142                 :     "NULL is returned on failure, or a new OGRDataSource handle on success.\n"
   16143                 :     "\n"
   16144                 :     ""},
   16145                 :    { (char *)"Driver_Open", (PyCFunction) _wrap_Driver_Open, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   16146                 :     "Driver_Open(Driver self, char utf8_path, int update = 0) -> DataSource\n"
   16147                 :     "\n"
   16148                 :     "OGRDataSourceH OGR_Dr_Open(OGRSFDriverH\n"
   16149                 :     "hDriver, const char *pszName, int bUpdate)\n"
   16150                 :     "\n"
   16151                 :     "Attempt to open file with this driver.\n"
   16152                 :     "\n"
   16153                 :     "This function is the same as the C++ method OGRSFDriver::Open().\n"
   16154                 :     "\n"
   16155                 :     "Parameters:\n"
   16156                 :     "-----------\n"
   16157                 :     "\n"
   16158                 :     "hDriver:  handle to the driver that is used to open file.\n"
   16159                 :     "\n"
   16160                 :     "pszName:  the name of the file, or data source to try and open.\n"
   16161                 :     "\n"
   16162                 :     "bUpdate:  TRUE if update access is required, otherwise FALSE (the\n"
   16163                 :     "default).\n"
   16164                 :     "\n"
   16165                 :     "NULL on error or if the pass name is not supported by this driver,\n"
   16166                 :     "otherwise an handle to an OGRDataSource. This OGRDataSource should be\n"
   16167                 :     "closed by deleting the object when it is no longer needed. \n"
   16168                 :     ""},
   16169                 :    { (char *)"Driver_DeleteDataSource", _wrap_Driver_DeleteDataSource, METH_VARARGS, (char *)"\n"
   16170                 :     "Driver_DeleteDataSource(Driver self, char utf8_path) -> int\n"
   16171                 :     "\n"
   16172                 :     "OGRErr\n"
   16173                 :     "OGR_Dr_DeleteDataSource(OGRSFDriverH hDriver, const char\n"
   16174                 :     "*pszDataSource)\n"
   16175                 :     "\n"
   16176                 :     "Delete a datasource.\n"
   16177                 :     "\n"
   16178                 :     "Delete (from the disk, in the database, ...) the named datasource.\n"
   16179                 :     "Normally it would be safest if the datasource was not open at the\n"
   16180                 :     "time.\n"
   16181                 :     "\n"
   16182                 :     "Whether this is a supported operation on this driver case be tested\n"
   16183                 :     "using TestCapability() on ODrCDeleteDataSource.\n"
   16184                 :     "\n"
   16185                 :     "This method is the same as the C++ method\n"
   16186                 :     "OGRSFDriver::DeleteDataSource().\n"
   16187                 :     "\n"
   16188                 :     "Parameters:\n"
   16189                 :     "-----------\n"
   16190                 :     "\n"
   16191                 :     "hDriver:  handle to the driver on which data source deletion is based.\n"
   16192                 :     "\n"
   16193                 :     "pszDataSource:  the name of the datasource to delete.\n"
   16194                 :     "\n"
   16195                 :     "OGRERR_NONE on success, and OGRERR_UNSUPPORTED_OPERATION if this is\n"
   16196                 :     "not supported by this driver. \n"
   16197                 :     ""},
   16198                 :    { (char *)"Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, (char *)"\n"
   16199                 :     "Driver_TestCapability(Driver self, char cap) -> bool\n"
   16200                 :     "\n"
   16201                 :     "int\n"
   16202                 :     "OGR_Dr_TestCapability(OGRSFDriverH hDriver, const char *pszCap)\n"
   16203                 :     "\n"
   16204                 :     "Test if capability is available.\n"
   16205                 :     "\n"
   16206                 :     "One of the following data source capability names can be passed into\n"
   16207                 :     "this function, and a TRUE or FALSE value will be returned indicating\n"
   16208                 :     "whether or not the capability is available for this object.\n"
   16209                 :     "\n"
   16210                 :     "ODrCCreateDataSource: True if this driver can support creating data\n"
   16211                 :     "sources.\n"
   16212                 :     "\n"
   16213                 :     "ODrCDeleteDataSource: True if this driver supports deleting data\n"
   16214                 :     "sources.\n"
   16215                 :     "\n"
   16216                 :     "The #define macro forms of the capability names should be used in\n"
   16217                 :     "preference to the strings themselves to avoid mispelling.\n"
   16218                 :     "\n"
   16219                 :     "This function is the same as the C++ method\n"
   16220                 :     "OGRSFDriver::TestCapability().\n"
   16221                 :     "\n"
   16222                 :     "Parameters:\n"
   16223                 :     "-----------\n"
   16224                 :     "\n"
   16225                 :     "hDriver:  handle to the driver to test the capability against.\n"
   16226                 :     "\n"
   16227                 :     "pszCap:  the capability to test.\n"
   16228                 :     "\n"
   16229                 :     "TRUE if capability available otherwise FALSE. \n"
   16230                 :     ""},
   16231                 :    { (char *)"Driver_GetName", _wrap_Driver_GetName, METH_VARARGS, (char *)"\n"
   16232                 :     "Driver_GetName(Driver self) -> char\n"
   16233                 :     "\n"
   16234                 :     "const char*\n"
   16235                 :     "OGR_Dr_GetName(OGRSFDriverH hDriver)\n"
   16236                 :     "\n"
   16237                 :     "Fetch name of driver (file format). This name should be relatively\n"
   16238                 :     "short (10-40 characters), and should reflect the underlying file\n"
   16239                 :     "format. For instance \"ESRI Shapefile\".\n"
   16240                 :     "\n"
   16241                 :     "This function is the same as the C++ method OGRSFDriver::GetName().\n"
   16242                 :     "\n"
   16243                 :     "Parameters:\n"
   16244                 :     "-----------\n"
   16245                 :     "\n"
   16246                 :     "hDriver:  handle to the the driver to get the name from.\n"
   16247                 :     "\n"
   16248                 :     "driver name. This is an internal string and should not be modified or\n"
   16249                 :     "freed. \n"
   16250                 :     ""},
   16251                 :    { (char *)"Driver_Register", _wrap_Driver_Register, METH_VARARGS, (char *)"Driver_Register(Driver self)"},
   16252                 :    { (char *)"Driver_Deregister", _wrap_Driver_Deregister, METH_VARARGS, (char *)"Driver_Deregister(Driver self)"},
   16253                 :    { (char *)"Driver_swigregister", Driver_swigregister, METH_VARARGS, NULL},
   16254                 :    { (char *)"DataSource_name_get", _wrap_DataSource_name_get, METH_VARARGS, (char *)"DataSource_name_get(DataSource self) -> char"},
   16255                 :    { (char *)"delete_DataSource", _wrap_delete_DataSource, METH_VARARGS, (char *)"delete_DataSource(DataSource self)"},
   16256                 :    { (char *)"DataSource_GetRefCount", _wrap_DataSource_GetRefCount, METH_VARARGS, (char *)"\n"
   16257                 :     "DataSource_GetRefCount(DataSource self) -> int\n"
   16258                 :     "\n"
   16259                 :     "int\n"
   16260                 :     "OGR_DS_GetRefCount(OGRDataSourceH hDataSource) \n"
   16261                 :     ""},
   16262                 :    { (char *)"DataSource_GetSummaryRefCount", _wrap_DataSource_GetSummaryRefCount, METH_VARARGS, (char *)"\n"
   16263                 :     "DataSource_GetSummaryRefCount(DataSource self) -> int\n"
   16264                 :     "\n"
   16265                 :     "int\n"
   16266                 :     "OGR_DS_GetSummaryRefCount(OGRDataSourceH hDataSource) \n"
   16267                 :     ""},
   16268                 :    { (char *)"DataSource_GetLayerCount", _wrap_DataSource_GetLayerCount, METH_VARARGS, (char *)"\n"
   16269                 :     "DataSource_GetLayerCount(DataSource self) -> int\n"
   16270                 :     "\n"
   16271                 :     "int\n"
   16272                 :     "OGR_DS_GetLayerCount(OGRDataSourceH hDS)\n"
   16273                 :     "\n"
   16274                 :     "Get the number of layers in this data source.\n"
   16275                 :     "\n"
   16276                 :     "This function is the same as the C++ method\n"
   16277                 :     "OGRDataSource::GetLayerCount().\n"
   16278                 :     "\n"
   16279                 :     "Parameters:\n"
   16280                 :     "-----------\n"
   16281                 :     "\n"
   16282                 :     "hDS:  handle to the data source from which to get the number of\n"
   16283                 :     "layers.\n"
   16284                 :     "\n"
   16285                 :     "layer count. \n"
   16286                 :     ""},
   16287                 :    { (char *)"DataSource_GetDriver", _wrap_DataSource_GetDriver, METH_VARARGS, (char *)"\n"
   16288                 :     "DataSource_GetDriver(DataSource self) -> Driver\n"
   16289                 :     "\n"
   16290                 :     "OGRSFDriverH\n"
   16291                 :     "OGR_DS_GetDriver(OGRDataSourceH hDS)\n"
   16292                 :     "\n"
   16293                 :     "Returns the driver that the dataset was opened with.\n"
   16294                 :     "\n"
   16295                 :     "This method is the same as the C++ method OGRDataSource::GetDriver()\n"
   16296                 :     "\n"
   16297                 :     "Parameters:\n"
   16298                 :     "-----------\n"
   16299                 :     "\n"
   16300                 :     "hDS:  handle to the datasource\n"
   16301                 :     "\n"
   16302                 :     "NULL if driver info is not available, or pointer to a driver owned by\n"
   16303                 :     "the OGRSFDriverManager. \n"
   16304                 :     ""},
   16305                 :    { (char *)"DataSource_GetName", _wrap_DataSource_GetName, METH_VARARGS, (char *)"\n"
   16306                 :     "DataSource_GetName(DataSource self) -> char\n"
   16307                 :     "\n"
   16308                 :     "const char*\n"
   16309                 :     "OGR_DS_GetName(OGRDataSourceH hDS)\n"
   16310                 :     "\n"
   16311                 :     "Returns the name of the data source.\n"
   16312                 :     "\n"
   16313                 :     "This string should be sufficient to open the data source if passed to\n"
   16314                 :     "the same OGRSFDriver that this data source was opened with, but it\n"
   16315                 :     "need not be exactly the same string that was used to open the data\n"
   16316                 :     "source. Normally this is a filename.\n"
   16317                 :     "\n"
   16318                 :     "This function is the same as the C++ method OGRDataSource::GetName().\n"
   16319                 :     "\n"
   16320                 :     "Parameters:\n"
   16321                 :     "-----------\n"
   16322                 :     "\n"
   16323                 :     "hDS:  handle to the data source to get the name from.\n"
   16324                 :     "\n"
   16325                 :     "pointer to an internal name string which should not be modified or\n"
   16326                 :     "freed by the caller. \n"
   16327                 :     ""},
   16328                 :    { (char *)"DataSource_DeleteLayer", _wrap_DataSource_DeleteLayer, METH_VARARGS, (char *)"\n"
   16329                 :     "DataSource_DeleteLayer(DataSource self, int index) -> OGRErr\n"
   16330                 :     "\n"
   16331                 :     "OGRErr\n"
   16332                 :     "OGR_DS_DeleteLayer(OGRDataSourceH hDS, int iLayer)\n"
   16333                 :     "\n"
   16334                 :     "Delete the indicated layer from the datasource.\n"
   16335                 :     "\n"
   16336                 :     "If this method is supported the ODsCDeleteLayer capability will test\n"
   16337                 :     "TRUE on the OGRDataSource.\n"
   16338                 :     "\n"
   16339                 :     "This method is the same as the C++ method\n"
   16340                 :     "OGRDataSource::DeleteLayer().\n"
   16341                 :     "\n"
   16342                 :     "Parameters:\n"
   16343                 :     "-----------\n"
   16344                 :     "\n"
   16345                 :     "hDS:  handle to the datasource\n"
   16346                 :     "\n"
   16347                 :     "iLayer:  the index of the layer to delete.\n"
   16348                 :     "\n"
   16349                 :     "OGRERR_NONE on success, or OGRERR_UNSUPPORTED_OPERATION if deleting\n"
   16350                 :     "layers is not supported for this datasource. \n"
   16351                 :     ""},
   16352                 :    { (char *)"DataSource_SyncToDisk", _wrap_DataSource_SyncToDisk, METH_VARARGS, (char *)"\n"
   16353                 :     "DataSource_SyncToDisk(DataSource self) -> OGRErr\n"
   16354                 :     "\n"
   16355                 :     "OGRErr\n"
   16356                 :     "OGR_DS_SyncToDisk(OGRDataSourceH hDS)\n"
   16357                 :     "\n"
   16358                 :     "Flush pending changes to disk.\n"
   16359                 :     "\n"
   16360                 :     "This call is intended to force the datasource to flush any pending\n"
   16361                 :     "writes to disk, and leave the disk file in a consistent state. It\n"
   16362                 :     "would not normally have any effect on read-only datasources.\n"
   16363                 :     "\n"
   16364                 :     "Some data sources do not implement this method, and will still return\n"
   16365                 :     "OGRERR_NONE. An error is only returned if an error occurs while\n"
   16366                 :     "attempting to flush to disk.\n"
   16367                 :     "\n"
   16368                 :     "The default implementation of this method just calls the SyncToDisk()\n"
   16369                 :     "method on each of the layers. Conceptionally, calling SyncToDisk() on\n"
   16370                 :     "a datasource should include any work that might be accomplished by\n"
   16371                 :     "calling SyncToDisk() on layers in that data source.\n"
   16372                 :     "\n"
   16373                 :     "In any event, you should always close any opened datasource with\n"
   16374                 :     "OGR_DS_Destroy() that will ensure all data is correctly flushed.\n"
   16375                 :     "\n"
   16376                 :     "This method is the same as the C++ method OGRDataSource::SyncToDisk()\n"
   16377                 :     "\n"
   16378                 :     "Parameters:\n"
   16379                 :     "-----------\n"
   16380                 :     "\n"
   16381                 :     "hDS:  handle to the data source\n"
   16382                 :     "\n"
   16383                 :     "OGRERR_NONE if no error occurs (even if nothing is done) or an error\n"
   16384                 :     "code. \n"
   16385                 :     ""},
   16386                 :    { (char *)"DataSource_CreateLayer", (PyCFunction) _wrap_DataSource_CreateLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   16387                 :     "DataSource_CreateLayer(DataSource self, char name, SpatialReference srs = None, \n"
   16388                 :     "    OGRwkbGeometryType geom_type = wkbUnknown, \n"
   16389                 :     "    char options = None) -> Layer\n"
   16390                 :     "\n"
   16391                 :     "OGRLayerH\n"
   16392                 :     "OGR_DS_CreateLayer(OGRDataSourceH hDS, const char *pszName,\n"
   16393                 :     "OGRSpatialReferenceH hSpatialRef, OGRwkbGeometryType eType, char\n"
   16394                 :     "**papszOptions)\n"
   16395                 :     "\n"
   16396                 :     "This function attempts to create a new layer on the data source with\n"
   16397                 :     "the indicated name, coordinate system, geometry type.\n"
   16398                 :     "\n"
   16399                 :     "The papszOptions argument can be used to control driver specific\n"
   16400                 :     "creation options. These options are normally documented in the format\n"
   16401                 :     "specific documentation.\n"
   16402                 :     "\n"
   16403                 :     "This function is the same as the C++ method\n"
   16404                 :     "OGRDataSource::CreateLayer().\n"
   16405                 :     "\n"
   16406                 :     "Parameters:\n"
   16407                 :     "-----------\n"
   16408                 :     "\n"
   16409                 :     "hDS:  The dataset handle.\n"
   16410                 :     "\n"
   16411                 :     "pszName:  the name for the new layer. This should ideally not match\n"
   16412                 :     "any existing layer on the datasource.\n"
   16413                 :     "\n"
   16414                 :     "hSpatialRef:  handle to the coordinate system to use for the new\n"
   16415                 :     "layer, or NULL if no coordinate system is available.\n"
   16416                 :     "\n"
   16417                 :     "eType:  the geometry type for the layer. Use wkbUnknown if there are\n"
   16418                 :     "no constraints on the types geometry to be written.\n"
   16419                 :     "\n"
   16420                 :     "papszOptions:  a StringList of name=value options. Options are driver\n"
   16421                 :     "specific, and driver information can be found at the following\n"
   16422                 :     "url:http://www.gdal.org/ogr/ogr_formats.html\n"
   16423                 :     "\n"
   16424                 :     "NULL is returned on failure, or a new OGRLayer handle on success.\n"
   16425                 :     "Example: \n"
   16426                 :     ""},
   16427                 :    { (char *)"DataSource_CopyLayer", (PyCFunction) _wrap_DataSource_CopyLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   16428                 :     "DataSource_CopyLayer(DataSource self, Layer src_layer, char new_name, char options = None) -> Layer\n"
   16429                 :     "\n"
   16430                 :     "OGRLayerH\n"
   16431                 :     "OGR_DS_CopyLayer(OGRDataSourceH hDS, OGRLayerH hSrcLayer, const char\n"
   16432                 :     "*pszNewName, char **papszOptions)\n"
   16433                 :     "\n"
   16434                 :     "Duplicate an existing layer.\n"
   16435                 :     "\n"
   16436                 :     "This function creates a new layer, duplicate the field definitions of\n"
   16437                 :     "the source layer and then duplicate each features of the source layer.\n"
   16438                 :     "The papszOptions argument can be used to control driver specific\n"
   16439                 :     "creation options. These options are normally documented in the format\n"
   16440                 :     "specific documentation. The source layer may come from another\n"
   16441                 :     "dataset.\n"
   16442                 :     "\n"
   16443                 :     "This function is the same as the C++ method OGRDataSource::CopyLayer\n"
   16444                 :     "\n"
   16445                 :     "Parameters:\n"
   16446                 :     "-----------\n"
   16447                 :     "\n"
   16448                 :     "hDS:  handle to the data source where to create the new layer\n"
   16449                 :     "\n"
   16450                 :     "hSrcLayer:  handle to the source layer.\n"
   16451                 :     "\n"
   16452                 :     "pszNewName:  the name of the layer to create.\n"
   16453                 :     "\n"
   16454                 :     "papszOptions:  a StringList of name=value options. Options are driver\n"
   16455                 :     "specific.\n"
   16456                 :     "\n"
   16457                 :     "an handle to the layer, or NULL if an error occurs. \n"
   16458                 :     ""},
   16459                 :    { (char *)"DataSource_GetLayerByIndex", _wrap_DataSource_GetLayerByIndex, METH_VARARGS, (char *)"DataSource_GetLayerByIndex(DataSource self, int index = 0) -> Layer"},
   16460                 :    { (char *)"DataSource_GetLayerByName", _wrap_DataSource_GetLayerByName, METH_VARARGS, (char *)"\n"
   16461                 :     "DataSource_GetLayerByName(DataSource self, char layer_name) -> Layer\n"
   16462                 :     "\n"
   16463                 :     "OGRLayerH\n"
   16464                 :     "OGR_DS_GetLayerByName(OGRDataSourceH hDS, const char *pszName)\n"
   16465                 :     "\n"
   16466                 :     "Fetch a layer by name.\n"
   16467                 :     "\n"
   16468                 :     "The returned layer remains owned by the OGRDataSource and should not\n"
   16469                 :     "be deleted by the application.\n"
   16470                 :     "\n"
   16471                 :     "This function is the same as the C++ method\n"
   16472                 :     "OGRDataSource::GetLayerByName().\n"
   16473                 :     "\n"
   16474                 :     "Parameters:\n"
   16475                 :     "-----------\n"
   16476                 :     "\n"
   16477                 :     "hDS:  handle to the data source from which to get the layer.\n"
   16478                 :     "\n"
   16479                 :     "pszLayerName:  Layer the layer name of the layer to fetch.\n"
   16480                 :     "\n"
   16481                 :     "an handle to the layer, or NULL if the layer is not found or an error\n"
   16482                 :     "occurs. \n"
   16483                 :     ""},
   16484                 :    { (char *)"DataSource_TestCapability", _wrap_DataSource_TestCapability, METH_VARARGS, (char *)"\n"
   16485                 :     "DataSource_TestCapability(DataSource self, char cap) -> bool\n"
   16486                 :     "\n"
   16487                 :     "int\n"
   16488                 :     "OGR_DS_TestCapability(OGRDataSourceH hDS, const char *pszCap)\n"
   16489                 :     "\n"
   16490                 :     "Test if capability is available.\n"
   16491                 :     "\n"
   16492                 :     "One of the following data source capability names can be passed into\n"
   16493                 :     "this function, and a TRUE or FALSE value will be returned indicating\n"
   16494                 :     "whether or not the capability is available for this object.\n"
   16495                 :     "\n"
   16496                 :     "ODsCCreateLayer: True if this datasource can create new layers.\n"
   16497                 :     "\n"
   16498                 :     "The #define macro forms of the capability names should be used in\n"
   16499                 :     "preference to the strings themselves to avoid mispelling.\n"
   16500                 :     "\n"
   16501                 :     "This function is the same as the C++ method\n"
   16502                 :     "OGRDataSource::TestCapability().\n"
   16503                 :     "\n"
   16504                 :     "Parameters:\n"
   16505                 :     "-----------\n"
   16506                 :     "\n"
   16507                 :     "hDS:  handle to the data source against which to test the capability.\n"
   16508                 :     "\n"
   16509                 :     "pszCapability:  the capability to test.\n"
   16510                 :     "\n"
   16511                 :     "TRUE if capability available otherwise FALSE. \n"
   16512                 :     ""},
   16513                 :    { (char *)"DataSource_ExecuteSQL", (PyCFunction) _wrap_DataSource_ExecuteSQL, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   16514                 :     "DataSource_ExecuteSQL(DataSource self, char statement, Geometry spatialFilter = None, \n"
   16515                 :     "    char dialect = \"\") -> Layer\n"
   16516                 :     "\n"
   16517                 :     "OGRLayerH\n"
   16518                 :     "OGR_DS_ExecuteSQL(OGRDataSourceH hDS, const char *pszStatement,\n"
   16519                 :     "OGRGeometryH hSpatialFilter, const char *pszDialect)\n"
   16520                 :     "\n"
   16521                 :     "Execute an SQL statement against the data store.\n"
   16522                 :     "\n"
   16523                 :     "The result of an SQL query is either NULL for statements that are in\n"
   16524                 :     "error, or that have no results set, or an OGRLayer handle representing\n"
   16525                 :     "a results set from the query. Note that this OGRLayer is in addition\n"
   16526                 :     "to the layers in the data store and must be destroyed with\n"
   16527                 :     "OGR_DS_ReleaseResultSet() before the data source is closed\n"
   16528                 :     "(destroyed).\n"
   16529                 :     "\n"
   16530                 :     "For more information on the SQL dialect supported internally by OGR\n"
   16531                 :     "review theOGR SQL document. Some drivers (ie. Oracle and PostGIS) pass\n"
   16532                 :     "the SQL directly through to the underlying RDBMS.\n"
   16533                 :     "\n"
   16534                 :     "This function is the same as the C++ method\n"
   16535                 :     "OGRDataSource::ExecuteSQL();\n"
   16536                 :     "\n"
   16537                 :     "Parameters:\n"
   16538                 :     "-----------\n"
   16539                 :     "\n"
   16540                 :     "hDS:  handle to the data source on which the SQL query is executed.\n"
   16541                 :     "\n"
   16542                 :     "pszSQLCommand:  the SQL statement to execute.\n"
   16543                 :     "\n"
   16544                 :     "hSpatialFilter:  handle to a geometry which represents a spatial\n"
   16545                 :     "filter. Can be NULL.\n"
   16546                 :     "\n"
   16547                 :     "pszDialect:  allows control of the statement dialect. If set to NULL,\n"
   16548                 :     "the OGR SQL engine will be used, except for RDBMS drivers that will\n"
   16549                 :     "use their dedicated SQL engine, unless OGRSQL is explicitely passed as\n"
   16550                 :     "the dialect.\n"
   16551                 :     "\n"
   16552                 :     "an handle to a OGRLayer containing the results of the query.\n"
   16553                 :     "Deallocate with OGR_DS_ReleaseResultSet(). \n"
   16554                 :     ""},
   16555                 :    { (char *)"DataSource_ReleaseResultSet", _wrap_DataSource_ReleaseResultSet, METH_VARARGS, (char *)"\n"
   16556                 :     "DataSource_ReleaseResultSet(DataSource self, Layer layer)\n"
   16557                 :     "\n"
   16558                 :     "void\n"
   16559                 :     "OGR_DS_ReleaseResultSet(OGRDataSourceH hDS, OGRLayerH hLayer)\n"
   16560                 :     "\n"
   16561                 :     "Release results of OGR_DS_ExecuteSQL().\n"
   16562                 :     "\n"
   16563                 :     "This function should only be used to deallocate OGRLayers resulting\n"
   16564                 :     "from an OGR_DS_ExecuteSQL() call on the same OGRDataSource. Failure to\n"
   16565                 :     "deallocate a results set before destroying the OGRDataSource may cause\n"
   16566                 :     "errors.\n"
   16567                 :     "\n"
   16568                 :     "This function is the same as the C++ method\n"
   16569                 :     "OGRDataSource::ReleaseResultSet().\n"
   16570                 :     "\n"
   16571                 :     "Parameters:\n"
   16572                 :     "-----------\n"
   16573                 :     "\n"
   16574                 :     "hDS:  an handle to the data source on which was executed an SQL query.\n"
   16575                 :     "\n"
   16576                 :     "hLayer:  handle to the result of a previous OGR_DS_ExecuteSQL() call.\n"
   16577                 :     "\n"
   16578                 :     ""},
   16579                 :    { (char *)"DataSource_swigregister", DataSource_swigregister, METH_VARARGS, NULL},
   16580                 :    { (char *)"Layer_GetRefCount", _wrap_Layer_GetRefCount, METH_VARARGS, (char *)"\n"
   16581                 :     "Layer_GetRefCount(Layer self) -> int\n"
   16582                 :     "\n"
   16583                 :     "int OGR_L_GetRefCount(OGRLayerH\n"
   16584                 :     "hLayer) \n"
   16585                 :     ""},
   16586                 :    { (char *)"Layer_SetSpatialFilter", _wrap_Layer_SetSpatialFilter, METH_VARARGS, (char *)"\n"
   16587                 :     "Layer_SetSpatialFilter(Layer self, Geometry filter)\n"
   16588                 :     "\n"
   16589                 :     "void\n"
   16590                 :     "OGR_L_SetSpatialFilter(OGRLayerH hLayer, OGRGeometryH hGeom)\n"
   16591                 :     "\n"
   16592                 :     "Set a new spatial filter.\n"
   16593                 :     "\n"
   16594                 :     "This function set the geometry to be used as a spatial filter when\n"
   16595                 :     "fetching features via the OGR_L_GetNextFeature() function. Only\n"
   16596                 :     "features that geometrically intersect the filter geometry will be\n"
   16597                 :     "returned.\n"
   16598                 :     "\n"
   16599                 :     "Currently this test is may be inaccurately implemented, but it is\n"
   16600                 :     "guaranteed that all features who's envelope (as returned by\n"
   16601                 :     "OGR_G_GetEnvelope()) overlaps the envelope of the spatial filter will\n"
   16602                 :     "be returned. This can result in more shapes being returned that should\n"
   16603                 :     "strictly be the case.\n"
   16604                 :     "\n"
   16605                 :     "This function makes an internal copy of the passed geometry. The\n"
   16606                 :     "passed geometry remains the responsibility of the caller, and may be\n"
   16607                 :     "safely destroyed.\n"
   16608                 :     "\n"
   16609                 :     "For the time being the passed filter geometry should be in the same\n"
   16610                 :     "SRS as the layer (as returned by OGR_L_GetSpatialRef()). In the future\n"
   16611                 :     "this may be generalized.\n"
   16612                 :     "\n"
   16613                 :     "This function is the same as the C++ method\n"
   16614                 :     "OGRLayer::SetSpatialFilter.\n"
   16615                 :     "\n"
   16616                 :     "Parameters:\n"
   16617                 :     "-----------\n"
   16618                 :     "\n"
   16619                 :     "hLayer:  handle to the layer on which to set the spatial filter.\n"
   16620                 :     "\n"
   16621                 :     "hGeom:  handle to the geometry to use as a filtering region. NULL may\n"
   16622                 :     "be passed indicating that the current spatial filter should be\n"
   16623                 :     "cleared, but no new one instituted. \n"
   16624                 :     ""},
   16625                 :    { (char *)"Layer_SetSpatialFilterRect", _wrap_Layer_SetSpatialFilterRect, METH_VARARGS, (char *)"\n"
   16626                 :     "Layer_SetSpatialFilterRect(Layer self, double minx, double miny, double maxx, \n"
   16627                 :     "    double maxy)\n"
   16628                 :     "\n"
   16629                 :     "void\n"
   16630                 :     "OGR_L_SetSpatialFilterRect(OGRLayerH hLayer, double dfMinX, double\n"
   16631                 :     "dfMinY, double dfMaxX, double dfMaxY)\n"
   16632                 :     "\n"
   16633                 :     "Set a new rectangular spatial filter.\n"
   16634                 :     "\n"
   16635                 :     "This method set rectangle to be used as a spatial filter when fetching\n"
   16636                 :     "features via the OGR_L_GetNextFeature() method. Only features that\n"
   16637                 :     "geometrically intersect the given rectangle will be returned.\n"
   16638                 :     "\n"
   16639                 :     "The x/y values should be in the same coordinate system as the layer as\n"
   16640                 :     "a whole (as returned by OGRLayer::GetSpatialRef()). Internally this\n"
   16641                 :     "method is normally implemented as creating a 5 vertex closed\n"
   16642                 :     "rectangular polygon and passing it to OGRLayer::SetSpatialFilter(). It\n"
   16643                 :     "exists as a convenience.\n"
   16644                 :     "\n"
   16645                 :     "The only way to clear a spatial filter set with this method is to call\n"
   16646                 :     "OGRLayer::SetSpatialFilter(NULL).\n"
   16647                 :     "\n"
   16648                 :     "This method is the same as the C++ method\n"
   16649                 :     "OGRLayer::SetSpatialFilterRect().\n"
   16650                 :     "\n"
   16651                 :     "Parameters:\n"
   16652                 :     "-----------\n"
   16653                 :     "\n"
   16654                 :     "hLayer:  handle to the layer on which to set the spatial filter.\n"
   16655                 :     "\n"
   16656                 :     "dfMinX:  the minimum X coordinate for the rectangular region.\n"
   16657                 :     "\n"
   16658                 :     "dfMinY:  the minimum Y coordinate for the rectangular region.\n"
   16659                 :     "\n"
   16660                 :     "dfMaxX:  the maximum X coordinate for the rectangular region.\n"
   16661                 :     "\n"
   16662                 :     "dfMaxY:  the maximum Y coordinate for the rectangular region. \n"
   16663                 :     ""},
   16664                 :    { (char *)"Layer_GetSpatialFilter", _wrap_Layer_GetSpatialFilter, METH_VARARGS, (char *)"\n"
   16665                 :     "Layer_GetSpatialFilter(Layer self) -> Geometry\n"
   16666                 :     "\n"
   16667                 :     "OGRGeometryH\n"
   16668                 :     "OGR_L_GetSpatialFilter(OGRLayerH hLayer)\n"
   16669                 :     "\n"
   16670                 :     "This function returns the current spatial filter for this layer.\n"
   16671                 :     "\n"
   16672                 :     "The returned pointer is to an internally owned object, and should not\n"
   16673                 :     "be altered or deleted by the caller.\n"
   16674                 :     "\n"
   16675                 :     "This function is the same as the C++ method\n"
   16676                 :     "OGRLayer::GetSpatialFilter().\n"
   16677                 :     "\n"
   16678                 :     "Parameters:\n"
   16679                 :     "-----------\n"
   16680                 :     "\n"
   16681                 :     "hLayer:  handle to the layer to get the spatial filter from.\n"
   16682                 :     "\n"
   16683                 :     "an handle to the spatial filter geometry. \n"
   16684                 :     ""},
   16685                 :    { (char *)"Layer_SetAttributeFilter", _wrap_Layer_SetAttributeFilter, METH_VARARGS, (char *)"\n"
   16686                 :     "Layer_SetAttributeFilter(Layer self, char filter_string) -> OGRErr\n"
   16687                 :     "\n"
   16688                 :     "OGRErr\n"
   16689                 :     "OGR_L_SetAttributeFilter(OGRLayerH hLayer, const char *pszQuery)\n"
   16690                 :     "\n"
   16691                 :     "Set a new attribute query.\n"
   16692                 :     "\n"
   16693                 :     "This function sets the attribute query string to be used when fetching\n"
   16694                 :     "features via the OGR_L_GetNextFeature() function. Only features for\n"
   16695                 :     "which the query evaluates as true will be returned.\n"
   16696                 :     "\n"
   16697                 :     "The query string should be in the format of an SQL WHERE clause. For\n"
   16698                 :     "instance \"population > 1000000 and population < 5000000\" where\n"
   16699                 :     "population is an attribute in the layer. The query format is a\n"
   16700                 :     "restricted form of SQL WHERE clause as defined\n"
   16701                 :     "\"eq_format=restricted_where\" about half way through this document:\n"
   16702                 :     "\n"
   16703                 :     "http://ogdi.sourceforge.net/prop/6.2.CapabilitiesMetadata.html\n"
   16704                 :     "\n"
   16705                 :     "Note that installing a query string will generally result in resetting\n"
   16706                 :     "the current reading position (ala OGR_L_ResetReading()).\n"
   16707                 :     "\n"
   16708                 :     "This function is the same as the C++ method\n"
   16709                 :     "OGRLayer::SetAttributeFilter().\n"
   16710                 :     "\n"
   16711                 :     "Parameters:\n"
   16712                 :     "-----------\n"
   16713                 :     "\n"
   16714                 :     "hLayer:  handle to the layer on which attribute query will be\n"
   16715                 :     "executed.\n"
   16716                 :     "\n"
   16717                 :     "pszQuery:  query in restricted SQL WHERE format, or NULL to clear the\n"
   16718                 :     "current query.\n"
   16719                 :     "\n"
   16720                 :     "OGRERR_NONE if successfully installed, or an error code if the query\n"
   16721                 :     "expression is in error, or some other failure occurs. \n"
   16722                 :     ""},
   16723                 :    { (char *)"Layer_ResetReading", _wrap_Layer_ResetReading, METH_VARARGS, (char *)"\n"
   16724                 :     "Layer_ResetReading(Layer self)\n"
   16725                 :     "\n"
   16726                 :     "void\n"
   16727                 :     "OGR_L_ResetReading(OGRLayerH hLayer)\n"
   16728                 :     "\n"
   16729                 :     "Reset feature reading to start on the first feature.\n"
   16730                 :     "\n"
   16731                 :     "This affects GetNextFeature().\n"
   16732                 :     "\n"
   16733                 :     "This function is the same as the C++ method OGRLayer::ResetReading().\n"
   16734                 :     "\n"
   16735                 :     "Parameters:\n"
   16736                 :     "-----------\n"
   16737                 :     "\n"
   16738                 :     "hLayer:  handle to the layer on which features are read. \n"
   16739                 :     ""},
   16740                 :    { (char *)"Layer_GetName", _wrap_Layer_GetName, METH_VARARGS, (char *)"\n"
   16741                 :     "Layer_GetName(Layer self) -> char\n"
   16742                 :     "\n"
   16743                 :     "const char* OGR_L_GetName(OGRLayerH\n"
   16744                 :     "hLayer)\n"
   16745                 :     "\n"
   16746                 :     "Return the layer name.\n"
   16747                 :     "\n"
   16748                 :     "This returns the same content as\n"
   16749                 :     "OGR_FD_GetName(OGR_L_GetLayerDefn(hLayer)), but for a few drivers,\n"
   16750                 :     "calling OGR_L_GetName() directly can avoid lengthy layer definition\n"
   16751                 :     "initialization.\n"
   16752                 :     "\n"
   16753                 :     "This function is the same as the C++ method OGRLayer::GetName().\n"
   16754                 :     "\n"
   16755                 :     "Parameters:\n"
   16756                 :     "-----------\n"
   16757                 :     "\n"
   16758                 :     "hLayer:  handle to the layer.\n"
   16759                 :     "\n"
   16760                 :     "the layer name (must not been freed)\n"
   16761                 :     "\n"
   16762                 :     "OGR 1.8.0 \n"
   16763                 :     ""},
   16764                 :    { (char *)"Layer_GetGeomType", _wrap_Layer_GetGeomType, METH_VARARGS, (char *)"\n"
   16765                 :     "Layer_GetGeomType(Layer self) -> OGRwkbGeometryType\n"
   16766                 :     "\n"
   16767                 :     "OGRwkbGeometryType\n"
   16768                 :     "OGR_L_GetGeomType(OGRLayerH hLayer)\n"
   16769                 :     "\n"
   16770                 :     "Return the layer geometry type.\n"
   16771                 :     "\n"
   16772                 :     "This returns the same result as\n"
   16773                 :     "OGR_FD_GetGeomType(OGR_L_GetLayerDefn(hLayer)), but for a few drivers,\n"
   16774                 :     "calling OGR_L_GetGeomType() directly can avoid lengthy layer\n"
   16775                 :     "definition initialization.\n"
   16776                 :     "\n"
   16777                 :     "This function is the same as the C++ method OGRLayer::GetGeomType().\n"
   16778                 :     "\n"
   16779                 :     "Parameters:\n"
   16780                 :     "-----------\n"
   16781                 :     "\n"
   16782                 :     "hLayer:  handle to the layer.\n"
   16783                 :     "\n"
   16784                 :     "the geometry type\n"
   16785                 :     "\n"
   16786                 :     "OGR 1.8.0 \n"
   16787                 :     ""},
   16788                 :    { (char *)"Layer_GetGeometryColumn", _wrap_Layer_GetGeometryColumn, METH_VARARGS, (char *)"\n"
   16789                 :     "Layer_GetGeometryColumn(Layer self) -> char\n"
   16790                 :     "\n"
   16791                 :     "const char*\n"
   16792                 :     "OGR_L_GetGeometryColumn(OGRLayerH hLayer)\n"
   16793                 :     "\n"
   16794                 :     "This method returns the name of the underlying database column being\n"
   16795                 :     "used as the geometry column, or \"\" if not supported.\n"
   16796                 :     "\n"
   16797                 :     "This method is the same as the C++ method\n"
   16798                 :     "OGRLayer::GetGeometryColumn()\n"
   16799                 :     "\n"
   16800                 :     "Parameters:\n"
   16801                 :     "-----------\n"
   16802                 :     "\n"
   16803                 :     "hLayer:  handle to the layer\n"
   16804                 :     "\n"
   16805                 :     "geometry column name. \n"
   16806                 :     ""},
   16807                 :    { (char *)"Layer_GetFIDColumn", _wrap_Layer_GetFIDColumn, METH_VARARGS, (char *)"\n"
   16808                 :     "Layer_GetFIDColumn(Layer self) -> char\n"
   16809                 :     "\n"
   16810                 :     "const char*\n"
   16811                 :     "OGR_L_GetFIDColumn(OGRLayerH hLayer)\n"
   16812                 :     "\n"
   16813                 :     "This method returns the name of the underlying database column being\n"
   16814                 :     "used as the FID column, or \"\" if not supported.\n"
   16815                 :     "\n"
   16816                 :     "This method is the same as the C++ method OGRLayer::GetFIDColumn()\n"
   16817                 :     "\n"
   16818                 :     "Parameters:\n"
   16819                 :     "-----------\n"
   16820                 :     "\n"
   16821                 :     "hLayer:  handle to the layer\n"
   16822                 :     "\n"
   16823                 :     "fid column name. \n"
   16824                 :     ""},
   16825                 :    { (char *)"Layer_GetFeature", _wrap_Layer_GetFeature, METH_VARARGS, (char *)"\n"
   16826                 :     "Layer_GetFeature(Layer self, long fid) -> Feature\n"
   16827                 :     "\n"
   16828                 :     "OGRFeatureH\n"
   16829                 :     "OGR_L_GetFeature(OGRLayerH hLayer, long nFeatureId)\n"
   16830                 :     "\n"
   16831                 :     "Fetch a feature by its identifier.\n"
   16832                 :     "\n"
   16833                 :     "This function will attempt to read the identified feature. The nFID\n"
   16834                 :     "value cannot be OGRNullFID. Success or failure of this operation is\n"
   16835                 :     "unaffected by the spatial or attribute filters.\n"
   16836                 :     "\n"
   16837                 :     "If this function returns a non-NULL feature, it is guaranteed that its\n"
   16838                 :     "feature id ( OGR_F_GetFID()) will be the same as nFID.\n"
   16839                 :     "\n"
   16840                 :     "Use OGR_L_TestCapability(OLCRandomRead) to establish if this layer\n"
   16841                 :     "supports efficient random access reading via OGR_L_GetFeature();\n"
   16842                 :     "however, the call should always work if the feature exists as a\n"
   16843                 :     "fallback implementation just scans all the features in the layer\n"
   16844                 :     "looking for the desired feature.\n"
   16845                 :     "\n"
   16846                 :     "Sequential reads are generally considered interrupted by a\n"
   16847                 :     "OGR_L_GetFeature() call.\n"
   16848                 :     "\n"
   16849                 :     "The returned feature should be free with OGR_F_Destroy().\n"
   16850                 :     "\n"
   16851                 :     "This function is the same as the C++ method OGRLayer::GetFeature( ).\n"
   16852                 :     "\n"
   16853                 :     "Parameters:\n"
   16854                 :     "-----------\n"
   16855                 :     "\n"
   16856                 :     "hLayer:  handle to the layer that owned the feature.\n"
   16857                 :     "\n"
   16858                 :     "nFeatureId:  the feature id of the feature to read.\n"
   16859                 :     "\n"
   16860                 :     "an handle to a feature now owned by the caller, or NULL on failure. \n"
   16861                 :     ""},
   16862                 :    { (char *)"Layer_GetNextFeature", _wrap_Layer_GetNextFeature, METH_VARARGS, (char *)"\n"
   16863                 :     "Layer_GetNextFeature(Layer self) -> Feature\n"
   16864                 :     "\n"
   16865                 :     "OGRFeatureH\n"
   16866                 :     "OGR_L_GetNextFeature(OGRLayerH hLayer)\n"
   16867                 :     "\n"
   16868                 :     "Fetch the next available feature from this layer.\n"
   16869                 :     "\n"
   16870                 :     "The returned feature becomes the responsiblity of the caller to delete\n"
   16871                 :     "with OGR_F_Destroy(). It is critical that all features associated with\n"
   16872                 :     "an OGRLayer (more specifically an OGRFeatureDefn) be deleted before\n"
   16873                 :     "that layer/datasource is deleted.\n"
   16874                 :     "\n"
   16875                 :     "Only features matching the current spatial filter (set with\n"
   16876                 :     "SetSpatialFilter()) will be returned.\n"
   16877                 :     "\n"
   16878                 :     "This function implements sequential access to the features of a layer.\n"
   16879                 :     "The OGR_L_ResetReading() function can be used to start at the\n"
   16880                 :     "beginning again.\n"
   16881                 :     "\n"
   16882                 :     "This function is the same as the C++ method\n"
   16883                 :     "OGRLayer::GetNextFeature().\n"
   16884                 :     "\n"
   16885                 :     "Parameters:\n"
   16886                 :     "-----------\n"
   16887                 :     "\n"
   16888                 :     "hLayer:  handle to the layer from which feature are read.\n"
   16889                 :     "\n"
   16890                 :     "an handle to a feature, or NULL if no more features are available. \n"
   16891                 :     ""},
   16892                 :    { (char *)"Layer_SetNextByIndex", _wrap_Layer_SetNextByIndex, METH_VARARGS, (char *)"\n"
   16893                 :     "Layer_SetNextByIndex(Layer self, long new_index) -> OGRErr\n"
   16894                 :     "\n"
   16895                 :     "OGRErr\n"
   16896                 :     "OGR_L_SetNextByIndex(OGRLayerH hLayer, long nIndex)\n"
   16897                 :     "\n"
   16898                 :     "Move read cursor to the nIndex'th feature in the current resultset.\n"
   16899                 :     "\n"
   16900                 :     "This method allows positioning of a layer such that the\n"
   16901                 :     "GetNextFeature() call will read the requested feature, where nIndex is\n"
   16902                 :     "an absolute index into the current result set. So, setting it to 3\n"
   16903                 :     "would mean the next feature read with GetNextFeature() would have been\n"
   16904                 :     "the 4th feature to have been read if sequential reading took place\n"
   16905                 :     "from the beginning of the layer, including accounting for spatial and\n"
   16906                 :     "attribute filters.\n"
   16907                 :     "\n"
   16908                 :     "Only in rare circumstances is SetNextByIndex() efficiently\n"
   16909                 :     "implemented. In all other cases the default implementation which calls\n"
   16910                 :     "ResetReading() and then calls GetNextFeature() nIndex times is used.\n"
   16911                 :     "To determine if fast seeking is available on the current layer use the\n"
   16912                 :     "TestCapability() method with a value of OLCFastSetNextByIndex.\n"
   16913                 :     "\n"
   16914                 :     "This method is the same as the C++ method OGRLayer::SetNextByIndex()\n"
   16915                 :     "\n"
   16916                 :     "Parameters:\n"
   16917                 :     "-----------\n"
   16918                 :     "\n"
   16919                 :     "hLayer:  handle to the layer\n"
   16920                 :     "\n"
   16921                 :     "nIndex:  the index indicating how many steps into the result set to\n"
   16922                 :     "seek.\n"
   16923                 :     "\n"
   16924                 :     "OGRERR_NONE on success or an error code. \n"
   16925                 :     ""},
   16926                 :    { (char *)"Layer_SetFeature", _wrap_Layer_SetFeature, METH_VARARGS, (char *)"\n"
   16927                 :     "Layer_SetFeature(Layer self, Feature feature) -> OGRErr\n"
   16928                 :     "\n"
   16929                 :     "OGRErr OGR_L_SetFeature(OGRLayerH\n"
   16930                 :     "hLayer, OGRFeatureH hFeat)\n"
   16931                 :     "\n"
   16932                 :     "Rewrite an existing feature.\n"
   16933                 :     "\n"
   16934                 :     "This function will write a feature to the layer, based on the feature\n"
   16935                 :     "id within the OGRFeature.\n"
   16936                 :     "\n"
   16937                 :     "Use OGR_L_TestCapability(OLCRandomWrite) to establish if this layer\n"
   16938                 :     "supports random access writing via OGR_L_SetFeature().\n"
   16939                 :     "\n"
   16940                 :     "This function is the same as the C++ method OGRLayer::SetFeature().\n"
   16941                 :     "\n"
   16942                 :     "Parameters:\n"
   16943                 :     "-----------\n"
   16944                 :     "\n"
   16945                 :     "hLayer:  handle to the layer to write the feature.\n"
   16946                 :     "\n"
   16947                 :     "hFeat:  the feature to write.\n"
   16948                 :     "\n"
   16949                 :     "OGRERR_NONE if the operation works, otherwise an appropriate error\n"
   16950                 :     "code. \n"
   16951                 :     ""},
   16952                 :    { (char *)"Layer_CreateFeature", _wrap_Layer_CreateFeature, METH_VARARGS, (char *)"\n"
   16953                 :     "Layer_CreateFeature(Layer self, Feature feature) -> OGRErr\n"
   16954                 :     "\n"
   16955                 :     "OGRErr\n"
   16956                 :     "OGR_L_CreateFeature(OGRLayerH hLayer, OGRFeatureH hFeat)\n"
   16957                 :     "\n"
   16958                 :     "Create and write a new feature within a layer.\n"
   16959                 :     "\n"
   16960                 :     "The passed feature is written to the layer as a new feature, rather\n"
   16961                 :     "than overwriting an existing one. If the feature has a feature id\n"
   16962                 :     "other than OGRNullFID, then the native implementation may use that as\n"
   16963                 :     "the feature id of the new feature, but not necessarily. Upon\n"
   16964                 :     "successful return the passed feature will have been updated with the\n"
   16965                 :     "new feature id.\n"
   16966                 :     "\n"
   16967                 :     "This function is the same as the C++ method OGRLayer::CreateFeature().\n"
   16968                 :     "\n"
   16969                 :     "Parameters:\n"
   16970                 :     "-----------\n"
   16971                 :     "\n"
   16972                 :     "hLayer:  handle to the layer to write the feature to.\n"
   16973                 :     "\n"
   16974                 :     "hFeat:  the handle of the feature to write to disk.\n"
   16975                 :     "\n"
   16976                 :     "OGRERR_NONE on success. \n"
   16977                 :     ""},
   16978                 :    { (char *)"Layer_DeleteFeature", _wrap_Layer_DeleteFeature, METH_VARARGS, (char *)"\n"
   16979                 :     "Layer_DeleteFeature(Layer self, long fid) -> OGRErr\n"
   16980                 :     "\n"
   16981                 :     "OGRErr\n"
   16982                 :     "OGR_L_DeleteFeature(OGRLayerH hDS, long nFID)\n"
   16983                 :     "\n"
   16984                 :     "Delete feature from layer.\n"
   16985                 :     "\n"
   16986                 :     "The feature with the indicated feature id is deleted from the layer if\n"
   16987                 :     "supported by the driver. Most drivers do not support feature deletion,\n"
   16988                 :     "and will return OGRERR_UNSUPPORTED_OPERATION. The\n"
   16989                 :     "OGR_L_TestCapability() function may be called with OLCDeleteFeature to\n"
   16990                 :     "check if the driver supports feature deletion.\n"
   16991                 :     "\n"
   16992                 :     "This method is the same as the C++ method OGRLayer::DeleteFeature().\n"
   16993                 :     "\n"
   16994                 :     "Parameters:\n"
   16995                 :     "-----------\n"
   16996                 :     "\n"
   16997                 :     "hLayer:  handle to the layer\n"
   16998                 :     "\n"
   16999                 :     "nFID:  the feature id to be deleted from the layer\n"
   17000                 :     "\n"
   17001                 :     "OGRERR_NONE on success. \n"
   17002                 :     ""},
   17003                 :    { (char *)"Layer_SyncToDisk", _wrap_Layer_SyncToDisk, METH_VARARGS, (char *)"\n"
   17004                 :     "Layer_SyncToDisk(Layer self) -> OGRErr\n"
   17005                 :     "\n"
   17006                 :     "OGRErr OGR_L_SyncToDisk(OGRLayerH\n"
   17007                 :     "hDS)\n"
   17008                 :     "\n"
   17009                 :     "Flush pending changes to disk.\n"
   17010                 :     "\n"
   17011                 :     "This call is intended to force the layer to flush any pending writes\n"
   17012                 :     "to disk, and leave the disk file in a consistent state. It would not\n"
   17013                 :     "normally have any effect on read-only datasources.\n"
   17014                 :     "\n"
   17015                 :     "Some layers do not implement this method, and will still return\n"
   17016                 :     "OGRERR_NONE. The default implementation just returns OGRERR_NONE. An\n"
   17017                 :     "error is only returned if an error occurs while attempting to flush to\n"
   17018                 :     "disk.\n"
   17019                 :     "\n"
   17020                 :     "In any event, you should always close any opened datasource with\n"
   17021                 :     "OGR_DS_Destroy() that will ensure all data is correctly flushed.\n"
   17022                 :     "\n"
   17023                 :     "This method is the same as the C++ method OGRLayer::SyncToDisk()\n"
   17024                 :     "\n"
   17025                 :     "Parameters:\n"
   17026                 :     "-----------\n"
   17027                 :     "\n"
   17028                 :     "hLayer:  handle to the layer\n"
   17029                 :     "\n"
   17030                 :     "OGRERR_NONE if no error occurs (even if nothing is done) or an error\n"
   17031                 :     "code. \n"
   17032                 :     ""},
   17033                 :    { (char *)"Layer_GetLayerDefn", _wrap_Layer_GetLayerDefn, METH_VARARGS, (char *)"\n"
   17034                 :     "Layer_GetLayerDefn(Layer self) -> FeatureDefn\n"
   17035                 :     "\n"
   17036                 :     "OGRFeatureDefnH\n"
   17037                 :     "OGR_L_GetLayerDefn(OGRLayerH hLayer)\n"
   17038                 :     "\n"
   17039                 :     "Fetch the schema information for this layer.\n"
   17040                 :     "\n"
   17041                 :     "The returned handle to the OGRFeatureDefn is owned by the OGRLayer,\n"
   17042                 :     "and should not be modified or freed by the application. It\n"
   17043                 :     "encapsulates the attribute schema of the features of the layer.\n"
   17044                 :     "\n"
   17045                 :     "This function is the same as the C++ method OGRLayer::GetLayerDefn().\n"
   17046                 :     "\n"
   17047                 :     "Parameters:\n"
   17048                 :     "-----------\n"
   17049                 :     "\n"
   17050                 :     "hLayer:  handle to the layer to get the schema information.\n"
   17051                 :     "\n"
   17052                 :     "an handle to the feature definition. \n"
   17053                 :     ""},
   17054                 :    { (char *)"Layer_GetFeatureCount", (PyCFunction) _wrap_Layer_GetFeatureCount, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   17055                 :     "Layer_GetFeatureCount(Layer self, int force = 1) -> int\n"
   17056                 :     "\n"
   17057                 :     "int\n"
   17058                 :     "OGR_L_GetFeatureCount(OGRLayerH hLayer, int bForce)\n"
   17059                 :     "\n"
   17060                 :     "Fetch the feature count in this layer.\n"
   17061                 :     "\n"
   17062                 :     "Returns the number of features in the layer. For dynamic databases the\n"
   17063                 :     "count may not be exact. If bForce is FALSE, and it would be expensive\n"
   17064                 :     "to establish the feature count a value of -1 may be returned\n"
   17065                 :     "indicating that the count isn't know. If bForce is TRUE some\n"
   17066                 :     "implementations will actually scan the entire layer once to count\n"
   17067                 :     "objects.\n"
   17068                 :     "\n"
   17069                 :     "The returned count takes the spatial filter into account.\n"
   17070                 :     "\n"
   17071                 :     "Note that some implementations of this method may alter the read\n"
   17072                 :     "cursor of the layer.\n"
   17073                 :     "\n"
   17074                 :     "This function is the same as the CPP OGRLayer::GetFeatureCount().\n"
   17075                 :     "\n"
   17076                 :     "Parameters:\n"
   17077                 :     "-----------\n"
   17078                 :     "\n"
   17079                 :     "hLayer:  handle to the layer that owned the features.\n"
   17080                 :     "\n"
   17081                 :     "bForce:  Flag indicating whether the count should be computed even if\n"
   17082                 :     "it is expensive.\n"
   17083                 :     "\n"
   17084                 :     "feature count, -1 if count not known. \n"
   17085                 :     ""},
   17086                 :    { (char *)"Layer_GetExtent", (PyCFunction) _wrap_Layer_GetExtent, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   17087                 :     "Layer_GetExtent(Layer self, int force = 1, int can_return_null = 0)\n"
   17088                 :     "\n"
   17089                 :     "OGRErr OGR_L_GetExtent(OGRLayerH\n"
   17090                 :     "hLayer, OGREnvelope *psExtent, int bForce)\n"
   17091                 :     "\n"
   17092                 :     "Fetch the extent of this layer.\n"
   17093                 :     "\n"
   17094                 :     "Returns the extent (MBR) of the data in the layer. If bForce is FALSE,\n"
   17095                 :     "and it would be expensive to establish the extent then OGRERR_FAILURE\n"
   17096                 :     "will be returned indicating that the extent isn't know. If bForce is\n"
   17097                 :     "TRUE then some implementations will actually scan the entire layer\n"
   17098                 :     "once to compute the MBR of all the features in the layer.\n"
   17099                 :     "\n"
   17100                 :     "Depending on the drivers, the returned extent may or may not take the\n"
   17101                 :     "spatial filter into account. So it is safer to call OGR_L_GetExtent()\n"
   17102                 :     "without setting a spatial filter.\n"
   17103                 :     "\n"
   17104                 :     "Layers without any geometry may return OGRERR_FAILURE just indicating\n"
   17105                 :     "that no meaningful extents could be collected.\n"
   17106                 :     "\n"
   17107                 :     "Note that some implementations of this method may alter the read\n"
   17108                 :     "cursor of the layer.\n"
   17109                 :     "\n"
   17110                 :     "This function is the same as the C++ method OGRLayer::GetExtent().\n"
   17111                 :     "\n"
   17112                 :     "Parameters:\n"
   17113                 :     "-----------\n"
   17114                 :     "\n"
   17115                 :     "hLayer:  handle to the layer from which to get extent.\n"
   17116                 :     "\n"
   17117                 :     "psExtent:  the structure in which the extent value will be returned.\n"
   17118                 :     "\n"
   17119                 :     "bForce:  Flag indicating whether the extent should be computed even if\n"
   17120                 :     "it is expensive.\n"
   17121                 :     "\n"
   17122                 :     "OGRERR_NONE on success, OGRERR_FAILURE if extent not known. \n"
   17123                 :     ""},
   17124                 :    { (char *)"Layer_TestCapability", _wrap_Layer_TestCapability, METH_VARARGS, (char *)"\n"
   17125                 :     "Layer_TestCapability(Layer self, char cap) -> bool\n"
   17126                 :     "\n"
   17127                 :     "int\n"
   17128                 :     "OGR_L_TestCapability(OGRLayerH hLayer, const char *pszCap)\n"
   17129                 :     "\n"
   17130                 :     "Test if this layer supported the named capability.\n"
   17131                 :     "\n"
   17132                 :     "The capability codes that can be tested are represented as strings,\n"
   17133                 :     "but #defined constants exists to ensure correct spelling. Specific\n"
   17134                 :     "layer types may implement class specific capabilities, but this can't\n"
   17135                 :     "generally be discovered by the caller.\n"
   17136                 :     "\n"
   17137                 :     "OLCRandomRead / \"RandomRead\": TRUE if the GetFeature() method is\n"
   17138                 :     "implemented in an optimized way for this layer, as opposed to the\n"
   17139                 :     "default implementation using ResetReading() and GetNextFeature() to\n"
   17140                 :     "find the requested feature id.\n"
   17141                 :     "\n"
   17142                 :     "OLCSequentialWrite / \"SequentialWrite\": TRUE if the CreateFeature()\n"
   17143                 :     "method works for this layer. Note this means that this particular\n"
   17144                 :     "layer is writable. The same OGRLayer class may returned FALSE for\n"
   17145                 :     "other layer instances that are effectively read-only.\n"
   17146                 :     "\n"
   17147                 :     "OLCRandomWrite / \"RandomWrite\": TRUE if the SetFeature() method is\n"
   17148                 :     "operational on this layer. Note this means that this particular layer\n"
   17149                 :     "is writable. The same OGRLayer class may returned FALSE for other\n"
   17150                 :     "layer instances that are effectively read-only.\n"
   17151                 :     "\n"
   17152                 :     "OLCFastSpatialFilter / \"FastSpatialFilter\": TRUE if this layer\n"
   17153                 :     "implements spatial filtering efficiently. Layers that effectively read\n"
   17154                 :     "all features, and test them with the OGRFeature intersection methods\n"
   17155                 :     "should return FALSE. This can be used as a clue by the application\n"
   17156                 :     "whether it should build and maintain its own spatial index for\n"
   17157                 :     "features in this layer.\n"
   17158                 :     "\n"
   17159                 :     "OLCFastFeatureCount / \"FastFeatureCount\": TRUE if this layer can\n"
   17160                 :     "return a feature count (via OGR_L_GetFeatureCount()) efficiently ...\n"
   17161                 :     "ie. without counting the features. In some cases this will return TRUE\n"
   17162                 :     "until a spatial filter is installed after which it will return FALSE.\n"
   17163                 :     "\n"
   17164                 :     "OLCFastGetExtent / \"FastGetExtent\": TRUE if this layer can return\n"
   17165                 :     "its data extent (via OGR_L_GetExtent()) efficiently ... ie. without\n"
   17166                 :     "scanning all the features. In some cases this will return TRUE until a\n"
   17167                 :     "spatial filter is installed after which it will return FALSE.\n"
   17168                 :     "\n"
   17169                 :     "OLCFastSetNextByIndex / \"FastSetNextByIndex\": TRUE if this layer can\n"
   17170                 :     "perform the SetNextByIndex() call efficiently, otherwise FALSE.\n"
   17171                 :     "\n"
   17172                 :     "OLCCreateField / \"CreateField\": TRUE if this layer can create new\n"
   17173                 :     "fields on the current layer using CreateField(), otherwise FALSE.\n"
   17174                 :     "\n"
   17175                 :     "OLCDeleteField / \"DeleteField\": TRUE if this layer can delete\n"
   17176                 :     "existing fields on the current layer using DeleteField(), otherwise\n"
   17177                 :     "FALSE.\n"
   17178                 :     "\n"
   17179                 :     "OLCReorderFields / \"ReorderFields\": TRUE if this layer can reorder\n"
   17180                 :     "existing fields on the current layer using ReorderField() or\n"
   17181                 :     "ReorderFields(), otherwise FALSE.\n"
   17182                 :     "\n"
   17183                 :     "OLCAlterFieldDefn / \"AlterFieldDefn\": TRUE if this layer can alter\n"
   17184                 :     "the definition of an existing field on the current layer using\n"
   17185                 :     "AlterFieldDefn(), otherwise FALSE.\n"
   17186                 :     "\n"
   17187                 :     "OLCDeleteFeature / \"DeleteFeature\": TRUE if the DeleteFeature()\n"
   17188                 :     "method is supported on this layer, otherwise FALSE.\n"
   17189                 :     "\n"
   17190                 :     "OLCStringsAsUTF8 / \"StringsAsUTF8\": TRUE if values of OFTString\n"
   17191                 :     "fields are assured to be in UTF-8 format. If FALSE the encoding of\n"
   17192                 :     "fields is uncertain, though it might still be UTF-8.\n"
   17193                 :     "\n"
   17194                 :     "OLCTransactions / \"Transactions\": TRUE if the StartTransaction(),\n"
   17195                 :     "CommitTransaction() and RollbackTransaction() methods work in a\n"
   17196                 :     "meaningful way, otherwise FALSE.\n"
   17197                 :     "\n"
   17198                 :     "This function is the same as the C++ method\n"
   17199                 :     "OGRLayer::TestCapability().\n"
   17200                 :     "\n"
   17201                 :     "Parameters:\n"
   17202                 :     "-----------\n"
   17203                 :     "\n"
   17204                 :     "hLayer:  handle to the layer to get the capability from.\n"
   17205                 :     "\n"
   17206                 :     "pszCap:  the name of the capability to test.\n"
   17207                 :     "\n"
   17208                 :     "TRUE if the layer has the requested capability, or FALSE otherwise.\n"
   17209                 :     "OGRLayers will return FALSE for any unrecognised capabilities. \n"
   17210                 :     ""},
   17211                 :    { (char *)"Layer_CreateField", (PyCFunction) _wrap_Layer_CreateField, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   17212                 :     "Layer_CreateField(Layer self, FieldDefn field_def, int approx_ok = 1) -> OGRErr\n"
   17213                 :     "\n"
   17214                 :     "OGRErr\n"
   17215                 :     "OGR_L_CreateField(OGRLayerH hLayer, OGRFieldDefnH hField, int\n"
   17216                 :     "bApproxOK)\n"
   17217                 :     "\n"
   17218                 :     "Create a new field on a layer.\n"
   17219                 :     "\n"
   17220                 :     "You must use this to create new fields on a real layer. Internally the\n"
   17221                 :     "OGRFeatureDefn for the layer will be updated to reflect the new field.\n"
   17222                 :     "Applications should never modify the OGRFeatureDefn used by a layer\n"
   17223                 :     "directly.\n"
   17224                 :     "\n"
   17225                 :     "This function should not be called while there are feature objects in\n"
   17226                 :     "existance that were obtained or created with the previous layer\n"
   17227                 :     "definition.\n"
   17228                 :     "\n"
   17229                 :     "Not all drivers support this function. You can query a layer to check\n"
   17230                 :     "if it supports it with the OLCCreateField capability. Some drivers may\n"
   17231                 :     "only support this method while there are still no features in the\n"
   17232                 :     "layer. When it is supported, the existings features of the backing\n"
   17233                 :     "file/database should be updated accordingly.\n"
   17234                 :     "\n"
   17235                 :     "This function is the same as the C++ method OGRLayer::CreateField().\n"
   17236                 :     "\n"
   17237                 :     "Parameters:\n"
   17238                 :     "-----------\n"
   17239                 :     "\n"
   17240                 :     "hLayer:  handle to the layer to write the field definition.\n"
   17241                 :     "\n"
   17242                 :     "hField:  handle of the field definition to write to disk.\n"
   17243                 :     "\n"
   17244                 :     "bApproxOK:  If TRUE, the field may be created in a slightly different\n"
   17245                 :     "form depending on the limitations of the format driver.\n"
   17246                 :     "\n"
   17247                 :     "OGRERR_NONE on success. \n"
   17248                 :     ""},
   17249                 :    { (char *)"Layer_DeleteField", _wrap_Layer_DeleteField, METH_VARARGS, (char *)"\n"
   17250                 :     "Layer_DeleteField(Layer self, int iField) -> OGRErr\n"
   17251                 :     "\n"
   17252                 :     "OGRErr\n"
   17253                 :     "OGR_L_DeleteField(OGRLayerH hLayer, int iField)\n"
   17254                 :     "\n"
   17255                 :     "Create a new field on a layer.\n"
   17256                 :     "\n"
   17257                 :     "You must use this to delete existing fields on a real layer.\n"
   17258                 :     "Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
   17259                 :     "the deleted field. Applications should never modify the OGRFeatureDefn\n"
   17260                 :     "used by a layer directly.\n"
   17261                 :     "\n"
   17262                 :     "This function should not be called while there are feature objects in\n"
   17263                 :     "existance that were obtained or created with the previous layer\n"
   17264                 :     "definition.\n"
   17265                 :     "\n"
   17266                 :     "Not all drivers support this function. You can query a layer to check\n"
   17267                 :     "if it supports it with the OLCDeleteField capability. Some drivers may\n"
   17268                 :     "only support this method while there are still no features in the\n"
   17269                 :     "layer. When it is supported, the existings features of the backing\n"
   17270                 :     "file/database should be updated accordingly.\n"
   17271                 :     "\n"
   17272                 :     "This function is the same as the C++ method OGRLayer::DeleteField().\n"
   17273                 :     "\n"
   17274                 :     "Parameters:\n"
   17275                 :     "-----------\n"
   17276                 :     "\n"
   17277                 :     "hLayer:  handle to the layer.\n"
   17278                 :     "\n"
   17279                 :     "iField:  index of the field to delete.\n"
   17280                 :     "\n"
   17281                 :     "OGRERR_NONE on success.\n"
   17282                 :     "\n"
   17283                 :     "OGR 1.9.0 \n"
   17284                 :     ""},
   17285                 :    { (char *)"Layer_ReorderField", _wrap_Layer_ReorderField, METH_VARARGS, (char *)"\n"
   17286                 :     "Layer_ReorderField(Layer self, int iOldFieldPos, int iNewFieldPos) -> OGRErr\n"
   17287                 :     "\n"
   17288                 :     "OGRErr\n"
   17289                 :     "OGR_L_ReorderField(OGRLayerH hLayer, int iOldFieldPos, int\n"
   17290                 :     "iNewFieldPos)\n"
   17291                 :     "\n"
   17292                 :     "Reorder an existing field on a layer.\n"
   17293                 :     "\n"
   17294                 :     "This function is a conveniency wrapper of OGR_L_ReorderFields()\n"
   17295                 :     "dedicated to move a single field.\n"
   17296                 :     "\n"
   17297                 :     "You must use this to reorder existing fields on a real layer.\n"
   17298                 :     "Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
   17299                 :     "the reordering of the fields. Applications should never modify the\n"
   17300                 :     "OGRFeatureDefn used by a layer directly.\n"
   17301                 :     "\n"
   17302                 :     "This function should not be called while there are feature objects in\n"
   17303                 :     "existance that were obtained or created with the previous layer\n"
   17304                 :     "definition.\n"
   17305                 :     "\n"
   17306                 :     "The field definition that was at initial position iOldFieldPos will be\n"
   17307                 :     "moved at position iNewFieldPos, and elements between will be shuffled\n"
   17308                 :     "accordingly.\n"
   17309                 :     "\n"
   17310                 :     "For example, let suppose the fields were \"0\",\"1\",\"2\",\"3\",\"4\"\n"
   17311                 :     "initially. ReorderField(1, 3) will reorder them as\n"
   17312                 :     "\"0\",\"2\",\"3\",\"1\",\"4\".\n"
   17313                 :     "\n"
   17314                 :     "Not all drivers support this function. You can query a layer to check\n"
   17315                 :     "if it supports it with the OLCReorderFields capability. Some drivers\n"
   17316                 :     "may only support this method while there are still no features in the\n"
   17317                 :     "layer. When it is supported, the existings features of the backing\n"
   17318                 :     "file/database should be updated accordingly.\n"
   17319                 :     "\n"
   17320                 :     "This function is the same as the C++ method OGRLayer::ReorderField().\n"
   17321                 :     "\n"
   17322                 :     "Parameters:\n"
   17323                 :     "-----------\n"
   17324                 :     "\n"
   17325                 :     "hLayer:  handle to the layer.\n"
   17326                 :     "\n"
   17327                 :     "iOldFieldPos:  previous position of the field to move. Must be in the\n"
   17328                 :     "range [0,GetFieldCount()-1].\n"
   17329                 :     "\n"
   17330                 :     "iNewFieldPos:  new position of the field to move. Must be in the range\n"
   17331                 :     "[0,GetFieldCount()-1].\n"
   17332                 :     "\n"
   17333                 :     "OGRERR_NONE on success.\n"
   17334                 :     "\n"
   17335                 :     "OGR 1.9.0 \n"
   17336                 :     ""},
   17337                 :    { (char *)"Layer_ReorderFields", _wrap_Layer_ReorderFields, METH_VARARGS, (char *)"\n"
   17338                 :     "Layer_ReorderFields(Layer self, int nList) -> OGRErr\n"
   17339                 :     "\n"
   17340                 :     "OGRErr\n"
   17341                 :     "OGR_L_ReorderFields(OGRLayerH hLayer, int *panMap)\n"
   17342                 :     "\n"
   17343                 :     "Reorder all the fields of a layer.\n"
   17344                 :     "\n"
   17345                 :     "You must use this to reorder existing fields on a real layer.\n"
   17346                 :     "Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
   17347                 :     "the reordering of the fields. Applications should never modify the\n"
   17348                 :     "OGRFeatureDefn used by a layer directly.\n"
   17349                 :     "\n"
   17350                 :     "This function should not be called while there are feature objects in\n"
   17351                 :     "existance that were obtained or created with the previous layer\n"
   17352                 :     "definition.\n"
   17353                 :     "\n"
   17354                 :     "panMap is such that,for each field definition at position i after\n"
   17355                 :     "reordering, its position before reordering was panMap[i].\n"
   17356                 :     "\n"
   17357                 :     "For example, let suppose the fields were \"0\",\"1\",\"2\",\"3\",\"4\"\n"
   17358                 :     "initially. ReorderFields([0,2,3,1,4]) will reorder them as\n"
   17359                 :     "\"0\",\"2\",\"3\",\"1\",\"4\".\n"
   17360                 :     "\n"
   17361                 :     "Not all drivers support this function. You can query a layer to check\n"
   17362                 :     "if it supports it with the OLCReorderFields capability. Some drivers\n"
   17363                 :     "may only support this method while there are still no features in the\n"
   17364                 :     "layer. When it is supported, the existings features of the backing\n"
   17365                 :     "file/database should be updated accordingly.\n"
   17366                 :     "\n"
   17367                 :     "This function is the same as the C++ method OGRLayer::ReorderFields().\n"
   17368                 :     "\n"
   17369                 :     "Parameters:\n"
   17370                 :     "-----------\n"
   17371                 :     "\n"
   17372                 :     "hLayer:  handle to the layer.\n"
   17373                 :     "\n"
   17374                 :     "panMap:  an array of GetLayerDefn()->GetFieldCount() elements which is\n"
   17375                 :     "a permutation of [0, GetLayerDefn()->GetFieldCount()-1].\n"
   17376                 :     "\n"
   17377                 :     "OGRERR_NONE on success.\n"
   17378                 :     "\n"
   17379                 :     "OGR 1.9.0 \n"
   17380                 :     ""},
   17381                 :    { (char *)"Layer_AlterFieldDefn", _wrap_Layer_AlterFieldDefn, METH_VARARGS, (char *)"\n"
   17382                 :     "Layer_AlterFieldDefn(Layer self, int iField, FieldDefn field_def, int nFlags) -> OGRErr\n"
   17383                 :     "\n"
   17384                 :     "OGRErr\n"
   17385                 :     "OGR_L_AlterFieldDefn(OGRLayerH hLayer, int iField, OGRFieldDefnH\n"
   17386                 :     "hNewFieldDefn, int nFlags)\n"
   17387                 :     "\n"
   17388                 :     "Alter the definition of an existing field on a layer.\n"
   17389                 :     "\n"
   17390                 :     "You must use this to alter the definition of an existing field of a\n"
   17391                 :     "real layer. Internally the OGRFeatureDefn for the layer will be\n"
   17392                 :     "updated to reflect the altered field. Applications should never modify\n"
   17393                 :     "the OGRFeatureDefn used by a layer directly.\n"
   17394                 :     "\n"
   17395                 :     "This function should not be called while there are feature objects in\n"
   17396                 :     "existance that were obtained or created with the previous layer\n"
   17397                 :     "definition.\n"
   17398                 :     "\n"
   17399                 :     "Not all drivers support this function. You can query a layer to check\n"
   17400                 :     "if it supports it with the OLCAlterFieldDefn capability. Some drivers\n"
   17401                 :     "may only support this method while there are still no features in the\n"
   17402                 :     "layer. When it is supported, the existings features of the backing\n"
   17403                 :     "file/database should be updated accordingly. Some drivers might also\n"
   17404                 :     "not support all update flags.\n"
   17405                 :     "\n"
   17406                 :     "This function is the same as the C++ method\n"
   17407                 :     "OGRLayer::AlterFieldDefn().\n"
   17408                 :     "\n"
   17409                 :     "Parameters:\n"
   17410                 :     "-----------\n"
   17411                 :     "\n"
   17412                 :     "hLayer:  handle to the layer.\n"
   17413                 :     "\n"
   17414                 :     "iField:  index of the field whose definition must be altered.\n"
   17415                 :     "\n"
   17416                 :     "hNewFieldDefn:  new field definition\n"
   17417                 :     "\n"
   17418                 :     "nFlags:  combination of ALTER_NAME_FLAG, ALTER_TYPE_FLAG and\n"
   17419                 :     "ALTER_WIDTH_PRECISION_FLAG to indicate which of the name and/or type\n"
   17420                 :     "and/or width and precision fields from the new field definition must\n"
   17421                 :     "be taken into account.\n"
   17422                 :     "\n"
   17423                 :     "OGRERR_NONE on success.\n"
   17424                 :     "\n"
   17425                 :     "OGR 1.9.0 \n"
   17426                 :     ""},
   17427                 :    { (char *)"Layer_StartTransaction", _wrap_Layer_StartTransaction, METH_VARARGS, (char *)"\n"
   17428                 :     "Layer_StartTransaction(Layer self) -> OGRErr\n"
   17429                 :     "\n"
   17430                 :     "OGRErr\n"
   17431                 :     "OGR_L_StartTransaction(OGRLayerH hLayer)\n"
   17432                 :     "\n"
   17433                 :     "For datasources which support transactions, StartTransaction creates a\n"
   17434                 :     "transaction.\n"
   17435                 :     "\n"
   17436                 :     "If starting the transaction fails, will return OGRERR_FAILURE.\n"
   17437                 :     "Datasources which do not support transactions will always return\n"
   17438                 :     "OGRERR_NONE.\n"
   17439                 :     "\n"
   17440                 :     "This function is the same as the C++ method\n"
   17441                 :     "OGRLayer::StartTransaction().\n"
   17442                 :     "\n"
   17443                 :     "Parameters:\n"
   17444                 :     "-----------\n"
   17445                 :     "\n"
   17446                 :     "hLayer:  handle to the layer\n"
   17447                 :     "\n"
   17448                 :     "OGRERR_NONE on success. \n"
   17449                 :     ""},
   17450                 :    { (char *)"Layer_CommitTransaction", _wrap_Layer_CommitTransaction, METH_VARARGS, (char *)"\n"
   17451                 :     "Layer_CommitTransaction(Layer self) -> OGRErr\n"
   17452                 :     "\n"
   17453                 :     "OGRErr\n"
   17454                 :     "OGR_L_CommitTransaction(OGRLayerH hLayer)\n"
   17455                 :     "\n"
   17456                 :     "For datasources which support transactions, CommitTransaction commits\n"
   17457                 :     "a transaction.\n"
   17458                 :     "\n"
   17459                 :     "If no transaction is active, or the commit fails, will return\n"
   17460                 :     "OGRERR_FAILURE. Datasources which do not support transactions will\n"
   17461                 :     "always return OGRERR_NONE.\n"
   17462                 :     "\n"
   17463                 :     "This function is the same as the C++ method\n"
   17464                 :     "OGRLayer::CommitTransaction().\n"
   17465                 :     "\n"
   17466                 :     "Parameters:\n"
   17467                 :     "-----------\n"
   17468                 :     "\n"
   17469                 :     "hLayer:  handle to the layer\n"
   17470                 :     "\n"
   17471                 :     "OGRERR_NONE on success. \n"
   17472                 :     ""},
   17473                 :    { (char *)"Layer_RollbackTransaction", _wrap_Layer_RollbackTransaction, METH_VARARGS, (char *)"\n"
   17474                 :     "Layer_RollbackTransaction(Layer self) -> OGRErr\n"
   17475                 :     "\n"
   17476                 :     "OGRErr\n"
   17477                 :     "OGR_L_RollbackTransaction(OGRLayerH hLayer)\n"
   17478                 :     "\n"
   17479                 :     "For datasources which support transactions, RollbackTransaction will\n"
   17480                 :     "roll back a datasource to its state before the start of the current\n"
   17481                 :     "transaction. If no transaction is active, or the rollback fails, will\n"
   17482                 :     "return OGRERR_FAILURE. Datasources which do not support transactions\n"
   17483                 :     "will always return OGRERR_NONE.\n"
   17484                 :     "\n"
   17485                 :     "This function is the same as the C++ method\n"
   17486                 :     "OGRLayer::RollbackTransaction().\n"
   17487                 :     "\n"
   17488                 :     "Parameters:\n"
   17489                 :     "-----------\n"
   17490                 :     "\n"
   17491                 :     "hLayer:  handle to the layer\n"
   17492                 :     "\n"
   17493                 :     "OGRERR_NONE on success. \n"
   17494                 :     ""},
   17495                 :    { (char *)"Layer_GetSpatialRef", _wrap_Layer_GetSpatialRef, METH_VARARGS, (char *)"\n"
   17496                 :     "Layer_GetSpatialRef(Layer self) -> SpatialReference\n"
   17497                 :     "\n"
   17498                 :     "OGRSpatialReferenceH\n"
   17499                 :     "OGR_L_GetSpatialRef(OGRLayerH hLayer)\n"
   17500                 :     "\n"
   17501                 :     "Fetch the spatial reference system for this layer.\n"
   17502                 :     "\n"
   17503                 :     "The returned object is owned by the OGRLayer and should not be\n"
   17504                 :     "modified or freed by the application.\n"
   17505                 :     "\n"
   17506                 :     "This function is the same as the C++ method OGRLayer::GetSpatialRef().\n"
   17507                 :     "\n"
   17508                 :     "Parameters:\n"
   17509                 :     "-----------\n"
   17510                 :     "\n"
   17511                 :     "hLayer:  handle to the layer to get the spatial reference from.\n"
   17512                 :     "\n"
   17513                 :     "spatial reference, or NULL if there isn't one. \n"
   17514                 :     ""},
   17515                 :    { (char *)"Layer_GetFeaturesRead", _wrap_Layer_GetFeaturesRead, METH_VARARGS, (char *)"\n"
   17516                 :     "Layer_GetFeaturesRead(Layer self) -> GIntBig\n"
   17517                 :     "\n"
   17518                 :     "GIntBig\n"
   17519                 :     "OGR_L_GetFeaturesRead(OGRLayerH hLayer) \n"
   17520                 :     ""},
   17521                 :    { (char *)"Layer_SetIgnoredFields", _wrap_Layer_SetIgnoredFields, METH_VARARGS, (char *)"\n"
   17522                 :     "Layer_SetIgnoredFields(Layer self, char options) -> OGRErr\n"
   17523                 :     "\n"
   17524                 :     "OGRErr\n"
   17525                 :     "OGR_L_SetIgnoredFields(OGRLayerH hLayer, const char **papszFields)\n"
   17526                 :     "\n"
   17527                 :     "Set which fields can be omitted when retrieving features from the\n"
   17528                 :     "layer.\n"
   17529                 :     "\n"
   17530                 :     "If the driver supports this functionality (testable using\n"
   17531                 :     "OLCIgnoreFields capability), it will not fetch the specified fields in\n"
   17532                 :     "subsequent calls to GetFeature() / GetNextFeature() and thus save some\n"
   17533                 :     "processing time and/or bandwidth.\n"
   17534                 :     "\n"
   17535                 :     "Besides field names of the layers, the following special fields can be\n"
   17536                 :     "passed: \"OGR_GEOMETRY\" to ignore geometry and \"OGR_STYLE\" to\n"
   17537                 :     "ignore layer style.\n"
   17538                 :     "\n"
   17539                 :     "By default, no fields are ignored.\n"
   17540                 :     "\n"
   17541                 :     "This method is the same as the C++ method OGRLayer::SetIgnoredFields()\n"
   17542                 :     "\n"
   17543                 :     "Parameters:\n"
   17544                 :     "-----------\n"
   17545                 :     "\n"
   17546                 :     "papszFields:  an array of field names terminated by NULL item. If NULL\n"
   17547                 :     "is passed, the ignored list is cleared.\n"
   17548                 :     "\n"
   17549                 :     "OGRERR_NONE if all field names have been resolved (even if the driver\n"
   17550                 :     "does not support this method) \n"
   17551                 :     ""},
   17552                 :    { (char *)"Layer_swigregister", Layer_swigregister, METH_VARARGS, NULL},
   17553                 :    { (char *)"delete_Feature", _wrap_delete_Feature, METH_VARARGS, (char *)"delete_Feature(Feature self)"},
   17554                 :    { (char *)"new_Feature", (PyCFunction) _wrap_new_Feature, METH_VARARGS | METH_KEYWORDS, (char *)"new_Feature(FeatureDefn feature_def) -> Feature"},
   17555                 :    { (char *)"Feature_GetDefnRef", _wrap_Feature_GetDefnRef, METH_VARARGS, (char *)"\n"
   17556                 :     "Feature_GetDefnRef(Feature self) -> FeatureDefn\n"
   17557                 :     "\n"
   17558                 :     "OGRFeatureDefnH\n"
   17559                 :     "OGR_F_GetDefnRef(OGRFeatureH hFeat)\n"
   17560                 :     "\n"
   17561                 :     "Fetch feature definition.\n"
   17562                 :     "\n"
   17563                 :     "This function is the same as the C++ method OGRFeature::GetDefnRef().\n"
   17564                 :     "\n"
   17565                 :     "Parameters:\n"
   17566                 :     "-----------\n"
   17567                 :     "\n"
   17568                 :     "hFeat:  handle to the feature to get the feature definition from.\n"
   17569                 :     "\n"
   17570                 :     "an handle to the feature definition object on which feature depends.\n"
   17571                 :     "\n"
   17572                 :     ""},
   17573                 :    { (char *)"Feature_SetGeometry", _wrap_Feature_SetGeometry, METH_VARARGS, (char *)"\n"
   17574                 :     "Feature_SetGeometry(Feature self, Geometry geom) -> OGRErr\n"
   17575                 :     "\n"
   17576                 :     "OGRErr\n"
   17577                 :     "OGR_F_SetGeometry(OGRFeatureH hFeat, OGRGeometryH hGeom)\n"
   17578                 :     "\n"
   17579                 :     "Set feature geometry.\n"
   17580                 :     "\n"
   17581                 :     "This function updates the features geometry, and operate exactly as\n"
   17582                 :     "SetGeometryDirectly(), except that this function does not assume\n"
   17583                 :     "ownership of the passed geometry, but instead makes a copy of it.\n"
   17584                 :     "\n"
   17585                 :     "This function is the same as the C++ OGRFeature::SetGeometry().\n"
   17586                 :     "\n"
   17587                 :     "Parameters:\n"
   17588                 :     "-----------\n"
   17589                 :     "\n"
   17590                 :     "hFeat:  handle to the feature on which new geometry is applied to.\n"
   17591                 :     "\n"
   17592                 :     "hGeom:  handle to the new geometry to apply to feature.\n"
   17593                 :     "\n"
   17594                 :     "OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the\n"
   17595                 :     "geometry type is illegal for the OGRFeatureDefn (checking not yet\n"
   17596                 :     "implemented). \n"
   17597                 :     ""},
   17598                 :    { (char *)"Feature_SetGeometryDirectly", _wrap_Feature_SetGeometryDirectly, METH_VARARGS, (char *)"\n"
   17599                 :     "Feature_SetGeometryDirectly(Feature self, Geometry geom) -> OGRErr\n"
   17600                 :     "\n"
   17601                 :     "OGRErr\n"
   17602                 :     "OGR_F_SetGeometryDirectly(OGRFeatureH hFeat, OGRGeometryH hGeom)\n"
   17603                 :     "\n"
   17604                 :     "Set feature geometry.\n"
   17605                 :     "\n"
   17606                 :     "This function updates the features geometry, and operate exactly as\n"
   17607                 :     "SetGeometry(), except that this function assumes ownership of the\n"
   17608                 :     "passed geometry.\n"
   17609                 :     "\n"
   17610                 :     "This function is the same as the C++ method\n"
   17611                 :     "OGRFeature::SetGeometryDirectly.\n"
   17612                 :     "\n"
   17613                 :     "Parameters:\n"
   17614                 :     "-----------\n"
   17615                 :     "\n"
   17616                 :     "hFeat:  handle to the feature on which to apply the geometry.\n"
   17617                 :     "\n"
   17618                 :     "hGeom:  handle to the new geometry to apply to feature.\n"
   17619                 :     "\n"
   17620                 :     "OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the\n"
   17621                 :     "geometry type is illegal for the OGRFeatureDefn (checking not yet\n"
   17622                 :     "implemented). \n"
   17623                 :     ""},
   17624                 :    { (char *)"Feature_GetGeometryRef", _wrap_Feature_GetGeometryRef, METH_VARARGS, (char *)"\n"
   17625                 :     "Feature_GetGeometryRef(Feature self) -> Geometry\n"
   17626                 :     "\n"
   17627                 :     "OGRGeometryH\n"
   17628                 :     "OGR_F_GetGeometryRef(OGRFeatureH hFeat)\n"
   17629                 :     "\n"
   17630                 :     "Fetch an handle to feature geometry.\n"
   17631                 :     "\n"
   17632                 :     "This function is the same as the C++ method\n"
   17633                 :     "OGRFeature::GetGeometryRef().\n"
   17634                 :     "\n"
   17635                 :     "Parameters:\n"
   17636                 :     "-----------\n"
   17637                 :     "\n"
   17638                 :     "hFeat:  handle to the feature to get geometry from.\n"
   17639                 :     "\n"
   17640                 :     "an handle to internal feature geometry. This object should not be\n"
   17641                 :     "modified. \n"
   17642                 :     ""},
   17643                 :    { (char *)"Feature_Clone", _wrap_Feature_Clone, METH_VARARGS, (char *)"\n"
   17644                 :     "Feature_Clone(Feature self) -> Feature\n"
   17645                 :     "\n"
   17646                 :     "OGRFeatureH OGR_F_Clone(OGRFeatureH\n"
   17647                 :     "hFeat)\n"
   17648                 :     "\n"
   17649                 :     "Duplicate feature.\n"
   17650                 :     "\n"
   17651                 :     "The newly created feature is owned by the caller, and will have it's\n"
   17652                 :     "own reference to the OGRFeatureDefn.\n"
   17653                 :     "\n"
   17654                 :     "This function is the same as the C++ method OGRFeature::Clone().\n"
   17655                 :     "\n"
   17656                 :     "Parameters:\n"
   17657                 :     "-----------\n"
   17658                 :     "\n"
   17659                 :     "hFeat:  handle to the feature to clone.\n"
   17660                 :     "\n"
   17661                 :     "an handle to the new feature, exactly matching this feature. \n"
   17662                 :     ""},
   17663                 :    { (char *)"Feature_Equal", _wrap_Feature_Equal, METH_VARARGS, (char *)"\n"
   17664                 :     "Feature_Equal(Feature self, Feature feature) -> bool\n"
   17665                 :     "\n"
   17666                 :     "int OGR_F_Equal(OGRFeatureH hFeat,\n"
   17667                 :     "OGRFeatureH hOtherFeat)\n"
   17668                 :     "\n"
   17669                 :     "Test if two features are the same.\n"
   17670                 :     "\n"
   17671                 :     "Two features are considered equal if the share them (handle equality)\n"
   17672                 :     "same OGRFeatureDefn, have the same field values, and the same geometry\n"
   17673                 :     "(as tested by OGR_G_Equal()) as well as the same feature id.\n"
   17674                 :     "\n"
   17675                 :     "This function is the same as the C++ method OGRFeature::Equal().\n"
   17676                 :     "\n"
   17677                 :     "Parameters:\n"
   17678                 :     "-----------\n"
   17679                 :     "\n"
   17680                 :     "hFeat:  handle to one of the feature.\n"
   17681                 :     "\n"
   17682                 :     "hOtherFeat:  handle to the other feature to test this one against.\n"
   17683                 :     "\n"
   17684                 :     "TRUE if they are equal, otherwise FALSE. \n"
   17685                 :     ""},
   17686                 :    { (char *)"Feature_GetFieldCount", _wrap_Feature_GetFieldCount, METH_VARARGS, (char *)"\n"
   17687                 :     "Feature_GetFieldCount(Feature self) -> int\n"
   17688                 :     "\n"
   17689                 :     "int\n"
   17690                 :     "OGR_F_GetFieldCount(OGRFeatureH hFeat)\n"
   17691                 :     "\n"
   17692                 :     "Fetch number of fields on this feature This will always be the same as\n"
   17693                 :     "the field count for the OGRFeatureDefn.\n"
   17694                 :     "\n"
   17695                 :     "This function is the same as the C++ method\n"
   17696                 :     "OGRFeature::GetFieldCount().\n"
   17697                 :     "\n"
   17698                 :     "Parameters:\n"
   17699                 :     "-----------\n"
   17700                 :     "\n"
   17701                 :     "hFeat:  handle to the feature to get the fields count from.\n"
   17702                 :     "\n"
   17703                 :     "count of fields. \n"
   17704                 :     ""},
   17705                 :    { (char *)"Feature_GetFieldDefnRef", _wrap_Feature_GetFieldDefnRef, METH_VARARGS, (char *)"\n"
   17706                 :     "GetFieldDefnRef(int id) -> FieldDefn\n"
   17707                 :     "Feature_GetFieldDefnRef(Feature self, char name) -> FieldDefn\n"
   17708                 :     "\n"
   17709                 :     "OGRFieldDefnH\n"
   17710                 :     "OGR_F_GetFieldDefnRef(OGRFeatureH hFeat, int i)\n"
   17711                 :     "\n"
   17712                 :     "Fetch definition for this field.\n"
   17713                 :     "\n"
   17714                 :     "This function is the same as the C++ method\n"
   17715                 :     "OGRFeature::GetFieldDefnRef().\n"
   17716                 :     "\n"
   17717                 :     "Parameters:\n"
   17718                 :     "-----------\n"
   17719                 :     "\n"
   17720                 :     "hFeat:  handle to the feature on which the field is found.\n"
   17721                 :     "\n"
   17722                 :     "i:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   17723                 :     "\n"
   17724                 :     "an handle to the field definition (from the OGRFeatureDefn). This is\n"
   17725                 :     "an internal reference, and should not be deleted or modified. \n"
   17726                 :     ""},
   17727                 :    { (char *)"Feature_GetFieldAsString", _wrap_Feature_GetFieldAsString, METH_VARARGS, (char *)"\n"
   17728                 :     "GetFieldAsString(int id) -> char\n"
   17729                 :     "Feature_GetFieldAsString(Feature self, char name) -> char\n"
   17730                 :     "\n"
   17731                 :     "const char*\n"
   17732                 :     "OGR_F_GetFieldAsString(OGRFeatureH hFeat, int iField)\n"
   17733                 :     "\n"
   17734                 :     "Fetch field value as a string.\n"
   17735                 :     "\n"
   17736                 :     "OFTReal and OFTInteger fields will be translated to string using\n"
   17737                 :     "sprintf(), but not necessarily using the established formatting rules.\n"
   17738                 :     "Other field types, or errors will result in a return value of zero.\n"
   17739                 :     "\n"
   17740                 :     "This function is the same as the C++ method\n"
   17741                 :     "OGRFeature::GetFieldAsString().\n"
   17742                 :     "\n"
   17743                 :     "Parameters:\n"
   17744                 :     "-----------\n"
   17745                 :     "\n"
   17746                 :     "hFeat:  handle to the feature that owned the field.\n"
   17747                 :     "\n"
   17748                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   17749                 :     "\n"
   17750                 :     "the field value. This string is internal, and should not be modified,\n"
   17751                 :     "or freed. Its lifetime may be very brief. \n"
   17752                 :     ""},
   17753                 :    { (char *)"Feature_GetFieldAsInteger", _wrap_Feature_GetFieldAsInteger, METH_VARARGS, (char *)"\n"
   17754                 :     "GetFieldAsInteger(int id) -> int\n"
   17755                 :     "Feature_GetFieldAsInteger(Feature self, char name) -> int\n"
   17756                 :     "\n"
   17757                 :     "int\n"
   17758                 :     "OGR_F_GetFieldAsInteger(OGRFeatureH hFeat, int iField)\n"
   17759                 :     "\n"
   17760                 :     "Fetch field value as integer.\n"
   17761                 :     "\n"
   17762                 :     "OFTString features will be translated using atoi(). OFTReal fields\n"
   17763                 :     "will be cast to integer. Other field types, or errors will result in a\n"
   17764                 :     "return value of zero.\n"
   17765                 :     "\n"
   17766                 :     "This function is the same as the C++ method\n"
   17767                 :     "OGRFeature::GetFieldAsInteger().\n"
   17768                 :     "\n"
   17769                 :     "Parameters:\n"
   17770                 :     "-----------\n"
   17771                 :     "\n"
   17772                 :     "hFeat:  handle to the feature that owned the field.\n"
   17773                 :     "\n"
   17774                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   17775                 :     "\n"
   17776                 :     "the field value. \n"
   17777                 :     ""},
   17778                 :    { (char *)"Feature_GetFieldAsDouble", _wrap_Feature_GetFieldAsDouble, METH_VARARGS, (char *)"\n"
   17779                 :     "GetFieldAsDouble(int id) -> double\n"
   17780                 :     "Feature_GetFieldAsDouble(Feature self, char name) -> double\n"
   17781                 :     "\n"
   17782                 :     "double\n"
   17783                 :     "OGR_F_GetFieldAsDouble(OGRFeatureH hFeat, int iField)\n"
   17784                 :     "\n"
   17785                 :     "Fetch field value as a double.\n"
   17786                 :     "\n"
   17787                 :     "OFTString features will be translated using atof(). OFTInteger fields\n"
   17788                 :     "will be cast to double. Other field types, or errors will result in a\n"
   17789                 :     "return value of zero.\n"
   17790                 :     "\n"
   17791                 :     "This function is the same as the C++ method\n"
   17792                 :     "OGRFeature::GetFieldAsDouble().\n"
   17793                 :     "\n"
   17794                 :     "Parameters:\n"
   17795                 :     "-----------\n"
   17796                 :     "\n"
   17797                 :     "hFeat:  handle to the feature that owned the field.\n"
   17798                 :     "\n"
   17799                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   17800                 :     "\n"
   17801                 :     "the field value. \n"
   17802                 :     ""},
   17803                 :    { (char *)"Feature_GetFieldAsDateTime", _wrap_Feature_GetFieldAsDateTime, METH_VARARGS, (char *)"\n"
   17804                 :     "Feature_GetFieldAsDateTime(Feature self, int id)\n"
   17805                 :     "\n"
   17806                 :     "int\n"
   17807                 :     "OGR_F_GetFieldAsDateTime(OGRFeatureH hFeat, int iField, int *pnYear,\n"
   17808                 :     "int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, int *pnSecond,\n"
   17809                 :     "int *pnTZFlag)\n"
   17810                 :     "\n"
   17811                 :     "Fetch field value as date and time.\n"
   17812                 :     "\n"
   17813                 :     "Currently this method only works for OFTDate, OFTTime and OFTDateTime\n"
   17814                 :     "fields.\n"
   17815                 :     "\n"
   17816                 :     "This function is the same as the C++ method\n"
   17817                 :     "OGRFeature::GetFieldAsDateTime().\n"
   17818                 :     "\n"
   17819                 :     "Parameters:\n"
   17820                 :     "-----------\n"
   17821                 :     "\n"
   17822                 :     "hFeat:  handle to the feature that owned the field.\n"
   17823                 :     "\n"
   17824                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   17825                 :     "\n"
   17826                 :     "pnYear:  (including century)\n"
   17827                 :     "\n"
   17828                 :     "pnMonth:  (1-12)\n"
   17829                 :     "\n"
   17830                 :     "pnDay:  (1-31)\n"
   17831                 :     "\n"
   17832                 :     "pnHour:  (0-23)\n"
   17833                 :     "\n"
   17834                 :     "pnMinute:  (0-59)\n"
   17835                 :     "\n"
   17836                 :     "pnSecond:  (0-59)\n"
   17837                 :     "\n"
   17838                 :     "pnTZFlag:  (0=unknown, 1=localtime, 100=GMT, see data model for\n"
   17839                 :     "details)\n"
   17840                 :     "\n"
   17841                 :     "TRUE on success or FALSE on failure. \n"
   17842                 :     ""},
   17843                 :    { (char *)"Feature_GetFieldAsIntegerList", _wrap_Feature_GetFieldAsIntegerList, METH_VARARGS, (char *)"\n"
   17844                 :     "Feature_GetFieldAsIntegerList(Feature self, int id)\n"
   17845                 :     "\n"
   17846                 :     "const int*\n"
   17847                 :     "OGR_F_GetFieldAsIntegerList(OGRFeatureH hFeat, int iField, int\n"
   17848                 :     "*pnCount)\n"
   17849                 :     "\n"
   17850                 :     "Fetch field value as a list of integers.\n"
   17851                 :     "\n"
   17852                 :     "Currently this function only works for OFTIntegerList fields.\n"
   17853                 :     "\n"
   17854                 :     "This function is the same as the C++ method\n"
   17855                 :     "OGRFeature::GetFieldAsIntegerList().\n"
   17856                 :     "\n"
   17857                 :     "Parameters:\n"
   17858                 :     "-----------\n"
   17859                 :     "\n"
   17860                 :     "hFeat:  handle to the feature that owned the field.\n"
   17861                 :     "\n"
   17862                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   17863                 :     "\n"
   17864                 :     "pnCount:  an integer to put the list count (number of integers) into.\n"
   17865                 :     "\n"
   17866                 :     "the field value. This list is internal, and should not be modified, or\n"
   17867                 :     "freed. Its lifetime may be very brief. If *pnCount is zero on return\n"
   17868                 :     "the returned pointer may be NULL or non-NULL. \n"
   17869                 :     ""},
   17870                 :    { (char *)"Feature_GetFieldAsDoubleList", _wrap_Feature_GetFieldAsDoubleList, METH_VARARGS, (char *)"\n"
   17871                 :     "Feature_GetFieldAsDoubleList(Feature self, int id)\n"
   17872                 :     "\n"
   17873                 :     "const double*\n"
   17874                 :     "OGR_F_GetFieldAsDoubleList(OGRFeatureH hFeat, int iField, int\n"
   17875                 :     "*pnCount)\n"
   17876                 :     "\n"
   17877                 :     "Fetch field value as a list of doubles.\n"
   17878                 :     "\n"
   17879                 :     "Currently this function only works for OFTRealList fields.\n"
   17880                 :     "\n"
   17881                 :     "This function is the same as the C++ method\n"
   17882                 :     "OGRFeature::GetFieldAsDoubleList().\n"
   17883                 :     "\n"
   17884                 :     "Parameters:\n"
   17885                 :     "-----------\n"
   17886                 :     "\n"
   17887                 :     "hFeat:  handle to the feature that owned the field.\n"
   17888                 :     "\n"
   17889                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   17890                 :     "\n"
   17891                 :     "pnCount:  an integer to put the list count (number of doubles) into.\n"
   17892                 :     "\n"
   17893                 :     "the field value. This list is internal, and should not be modified, or\n"
   17894                 :     "freed. Its lifetime may be very brief. If *pnCount is zero on return\n"
   17895                 :     "the returned pointer may be NULL or non-NULL. \n"
   17896                 :     ""},
   17897                 :    { (char *)"Feature_GetFieldAsStringList", _wrap_Feature_GetFieldAsStringList, METH_VARARGS, (char *)"\n"
   17898                 :     "Feature_GetFieldAsStringList(Feature self, int id) -> char\n"
   17899                 :     "\n"
   17900                 :     "char**\n"
   17901                 :     "OGR_F_GetFieldAsStringList(OGRFeatureH hFeat, int iField)\n"
   17902                 :     "\n"
   17903                 :     "Fetch field value as a list of strings.\n"
   17904                 :     "\n"
   17905                 :     "Currently this method only works for OFTStringList fields.\n"
   17906                 :     "\n"
   17907                 :     "The returned list is terminated by a NULL pointer. The number of\n"
   17908                 :     "elements can also be calculated using CSLCount().\n"
   17909                 :     "\n"
   17910                 :     "This function is the same as the C++ method\n"
   17911                 :     "OGRFeature::GetFieldAsStringList().\n"
   17912                 :     "\n"
   17913                 :     "Parameters:\n"
   17914                 :     "-----------\n"
   17915                 :     "\n"
   17916                 :     "hFeat:  handle to the feature that owned the field.\n"
   17917                 :     "\n"
   17918                 :     "iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
   17919                 :     "\n"
   17920                 :     "the field value. This list is internal, and should not be modified, or\n"
   17921                 :     "freed. Its lifetime may be very brief. \n"
   17922                 :     ""},
   17923                 :    { (char *)"Feature_IsFieldSet", _wrap_Feature_IsFieldSet, METH_VARARGS, (char *)"\n"
   17924                 :     "IsFieldSet(int id) -> bool\n"
   17925                 :     "Feature_IsFieldSet(Feature self, char name) -> bool\n"
   17926                 :     "\n"
   17927                 :     "int OGR_F_IsFieldSet(OGRFeatureH\n"
   17928                 :     "hFeat, int iField)\n"
   17929                 :     "\n"
   17930                 :     "Test if a field has ever been assigned a value or not.\n"
   17931                 :     "\n"
   17932                 :     "This function is the same as the C++ method OGRFeature::IsFieldSet().\n"
   17933                 :     "\n"
   17934                 :     "Parameters:\n"
   17935                 :     "-----------\n"
   17936                 :     "\n"
   17937                 :     "hFeat:  handle to the feature on which the field is.\n"
   17938                 :     "\n"
   17939                 :     "iField:  the field to test.\n"
   17940                 :     "\n"
   17941                 :     "TRUE if the field has been set, otherwise false. \n"
   17942                 :     ""},
   17943                 :    { (char *)"Feature_GetFieldIndex", _wrap_Feature_GetFieldIndex, METH_VARARGS, (char *)"\n"
   17944                 :     "Feature_GetFieldIndex(Feature self, char name) -> int\n"
   17945                 :     "\n"
   17946                 :     "int\n"
   17947                 :     "OGR_F_GetFieldIndex(OGRFeatureH hFeat, const char *pszName)\n"
   17948                 :     "\n"
   17949                 :     "Fetch the field index given field name.\n"
   17950                 :     "\n"
   17951                 :     "This is a cover for the OGRFeatureDefn::GetFieldIndex() method.\n"
   17952                 :     "\n"
   17953                 :     "This function is the same as the C++ method\n"
   17954                 :     "OGRFeature::GetFieldIndex().\n"
   17955                 :     "\n"
   17956                 :     "Parameters:\n"
   17957                 :     "-----------\n"
   17958                 :     "\n"
   17959                 :     "hFeat:  handle to the feature on which the field is found.\n"
   17960                 :     "\n"
   17961                 :     "pszName:  the name of the field to search for.\n"
   17962                 :     "\n"
   17963                 :     "the field index, or -1 if no matching field is found. \n"
   17964                 :     ""},
   17965                 :    { (char *)"Feature_GetFID", _wrap_Feature_GetFID, METH_VARARGS, (char *)"\n"
   17966                 :     "Feature_GetFID(Feature self) -> int\n"
   17967                 :     "\n"
   17968                 :     "long OGR_F_GetFID(OGRFeatureH hFeat)\n"
   17969                 :     "\n"
   17970                 :     "Get feature identifier.\n"
   17971                 :     "\n"
   17972                 :     "This function is the same as the C++ method OGRFeature::GetFID().\n"
   17973                 :     "\n"
   17974                 :     "Parameters:\n"
   17975                 :     "-----------\n"
   17976                 :     "\n"
   17977                 :     "hFeat:  handle to the feature from which to get the feature\n"
   17978                 :     "identifier.\n"
   17979                 :     "\n"
   17980                 :     "feature id or OGRNullFID if none has been assigned. \n"
   17981                 :     ""},
   17982                 :    { (char *)"Feature_SetFID", _wrap_Feature_SetFID, METH_VARARGS, (char *)"\n"
   17983                 :     "Feature_SetFID(Feature self, int fid) -> OGRErr\n"
   17984                 :     "\n"
   17985                 :     "OGRErr OGR_F_SetFID(OGRFeatureH hFeat,\n"
   17986                 :     "long nFID)\n"
   17987                 :     "\n"
   17988                 :     "Set the feature identifier.\n"
   17989                 :     "\n"
   17990                 :     "For specific types of features this operation may fail on illegal\n"
   17991                 :     "features ids. Generally it always succeeds. Feature ids should be\n"
   17992                 :     "greater than or equal to zero, with the exception of OGRNullFID (-1)\n"
   17993                 :     "indicating that the feature id is unknown.\n"
   17994                 :     "\n"
   17995                 :     "This function is the same as the C++ method OGRFeature::SetFID().\n"
   17996                 :     "\n"
   17997                 :     "Parameters:\n"
   17998                 :     "-----------\n"
   17999                 :     "\n"
   18000                 :     "hFeat:  handle to the feature to set the feature id to.\n"
   18001                 :     "\n"
   18002                 :     "nFID:  the new feature identifier value to assign.\n"
   18003                 :     "\n"
   18004                 :     "On success OGRERR_NONE, or on failure some other value. \n"
   18005                 :     ""},
   18006                 :    { (char *)"Feature_DumpReadable", _wrap_Feature_DumpReadable, METH_VARARGS, (char *)"\n"
   18007                 :     "Feature_DumpReadable(Feature self)\n"
   18008                 :     "\n"
   18009                 :     "void\n"
   18010                 :     "OGR_F_DumpReadable(OGRFeatureH hFeat, FILE *fpOut)\n"
   18011                 :     "\n"
   18012                 :     "Dump this feature in a human readable form.\n"
   18013                 :     "\n"
   18014                 :     "This dumps the attributes, and geometry; however, it doesn't\n"
   18015                 :     "definition information (other than field types and names), nor does it\n"
   18016                 :     "report the geometry spatial reference system.\n"
   18017                 :     "\n"
   18018                 :     "This function is the same as the C++ method\n"
   18019                 :     "OGRFeature::DumpReadable().\n"
   18020                 :     "\n"
   18021                 :     "Parameters:\n"
   18022                 :     "-----------\n"
   18023                 :     "\n"
   18024                 :     "hFeat:  handle to the feature to dump.\n"
   18025                 :     "\n"
   18026                 :     "fpOut:  the stream to write to, such as strout. \n"
   18027                 :     ""},
   18028                 :    { (char *)"Feature_UnsetField", _wrap_Feature_UnsetField, METH_VARARGS, (char *)"\n"
   18029                 :     "UnsetField(int id)\n"
   18030                 :     "Feature_UnsetField(Feature self, char name)\n"
   18031                 :     "\n"
   18032                 :     "void OGR_F_UnsetField(OGRFeatureH\n"
   18033                 :     "hFeat, int iField)\n"
   18034                 :     "\n"
   18035                 :     "Clear a field, marking it as unset.\n"
   18036                 :     "\n"
   18037                 :     "This function is the same as the C++ method OGRFeature::UnsetField().\n"
   18038                 :     "\n"
   18039                 :     "Parameters:\n"
   18040                 :     "-----------\n"
   18041                 :     "\n"
   18042                 :     "hFeat:  handle to the feature on which the field is.\n"
   18043                 :     "\n"
   18044                 :     "iField:  the field to unset. \n"
   18045                 :     ""},
   18046                 :    { (char *)"Feature_SetField", _wrap_Feature_SetField, METH_VARARGS, (char *)"\n"
   18047                 :     "SetField(int id, char value)\n"
   18048                 :     "SetField(char name, char value)\n"
   18049                 :     "SetField(int id, int value)\n"
   18050                 :     "SetField(char name, int value)\n"
   18051                 :     "SetField(int id, double value)\n"
   18052                 :     "SetField(char name, double value)\n"
   18053                 :     "SetField(int id, int year, int month, int day, int hour, int minute, \n"
   18054                 :     "    int second, int tzflag)\n"
   18055                 :     "Feature_SetField(Feature self, char name, int year, int month, int day, \n"
   18056                 :     "    int hour, int minute, int second, int tzflag)\n"
   18057                 :     ""},
   18058                 :    { (char *)"Feature_SetFieldIntegerList", _wrap_Feature_SetFieldIntegerList, METH_VARARGS, (char *)"\n"
   18059                 :     "Feature_SetFieldIntegerList(Feature self, int id, int nList)\n"
   18060                 :     "\n"
   18061                 :     "void\n"
   18062                 :     "OGR_F_SetFieldIntegerList(OGRFeatureH hFeat, int iField, int nCount,\n"
   18063                 :     "int *panValues)\n"
   18064                 :     "\n"
   18065                 :     "Set field to list of integers value.\n"
   18066                 :     "\n"
   18067                 :     "This function currently on has an effect of OFTIntegerList fields.\n"
   18068                 :     "\n"
   18069                 :     "This function is the same as the C++ method OGRFeature::SetField().\n"
   18070                 :     "\n"
   18071                 :     "Parameters:\n"
   18072                 :     "-----------\n"
   18073                 :     "\n"
   18074                 :     "hFeat:  handle to the feature that owned the field.\n"
   18075                 :     "\n"
   18076                 :     "iField:  the field to set, from 0 to GetFieldCount()-1.\n"
   18077                 :     "\n"
   18078                 :     "nCount:  the number of values in the list being assigned.\n"
   18079                 :     "\n"
   18080                 :     "panValues:  the values to assign. \n"
   18081                 :     ""},
   18082                 :    { (char *)"Feature_SetFieldDoubleList", _wrap_Feature_SetFieldDoubleList, METH_VARARGS, (char *)"\n"
   18083                 :     "Feature_SetFieldDoubleList(Feature self, int id, int nList)\n"
   18084                 :     "\n"
   18085                 :     "void\n"
   18086                 :     "OGR_F_SetFieldDoubleList(OGRFeatureH hFeat, int iField, int nCount,\n"
   18087                 :     "double *padfValues)\n"
   18088                 :     "\n"
   18089                 :     "Set field to list of doubles value.\n"
   18090                 :     "\n"
   18091                 :     "This function currently on has an effect of OFTRealList fields.\n"
   18092                 :     "\n"
   18093                 :     "This function is the same as the C++ method OGRFeature::SetField().\n"
   18094                 :     "\n"
   18095                 :     "Parameters:\n"
   18096                 :     "-----------\n"
   18097                 :     "\n"
   18098                 :     "hFeat:  handle to the feature that owned the field.\n"
   18099                 :     "\n"
   18100                 :     "iField:  the field to set, from 0 to GetFieldCount()-1.\n"
   18101                 :     "\n"
   18102                 :     "nCount:  the number of values in the list being assigned.\n"
   18103                 :     "\n"
   18104                 :     "padfValues:  the values to assign. \n"
   18105                 :     ""},
   18106                 :    { (char *)"Feature_SetFieldStringList", _wrap_Feature_SetFieldStringList, METH_VARARGS, (char *)"\n"
   18107                 :     "Feature_SetFieldStringList(Feature self, int id, char pList)\n"
   18108                 :     "\n"
   18109                 :     "void\n"
   18110                 :     "OGR_F_SetFieldStringList(OGRFeatureH hFeat, int iField, char\n"
   18111                 :     "**papszValues)\n"
   18112                 :     "\n"
   18113                 :     "Set field to list of strings value.\n"
   18114                 :     "\n"
   18115                 :     "This function currently on has an effect of OFTStringList fields.\n"
   18116                 :     "\n"
   18117                 :     "This function is the same as the C++ method OGRFeature::SetField().\n"
   18118                 :     "\n"
   18119                 :     "Parameters:\n"
   18120                 :     "-----------\n"
   18121                 :     "\n"
   18122                 :     "hFeat:  handle to the feature that owned the field.\n"
   18123                 :     "\n"
   18124                 :     "iField:  the field to set, from 0 to GetFieldCount()-1.\n"
   18125                 :     "\n"
   18126                 :     "papszValues:  the values to assign. \n"
   18127                 :     ""},
   18128                 :    { (char *)"Feature_SetFrom", (PyCFunction) _wrap_Feature_SetFrom, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   18129                 :     "Feature_SetFrom(Feature self, Feature other, int forgiving = 1) -> OGRErr\n"
   18130                 :     "\n"
   18131                 :     "OGRErr OGR_F_SetFrom(OGRFeatureH\n"
   18132                 :     "hFeat, OGRFeatureH hOtherFeat, int bForgiving)\n"
   18133                 :     "\n"
   18134                 :     "Set one feature from another.\n"
   18135                 :     "\n"
   18136                 :     "Overwrite the contents of this feature from the geometry and\n"
   18137                 :     "attributes of another. The hOtherFeature does not need to have the\n"
   18138                 :     "same OGRFeatureDefn. Field values are copied by corresponding field\n"
   18139                 :     "names. Field types do not have to exactly match. OGR_F_SetField*()\n"
   18140                 :     "function conversion rules will be applied as needed.\n"
   18141                 :     "\n"
   18142                 :     "This function is the same as the C++ method OGRFeature::SetFrom().\n"
   18143                 :     "\n"
   18144                 :     "Parameters:\n"
   18145                 :     "-----------\n"
   18146                 :     "\n"
   18147                 :     "hFeat:  handle to the feature to set to.\n"
   18148                 :     "\n"
   18149                 :     "hOtherFeat:  handle to the feature from which geometry, and field\n"
   18150                 :     "values will be copied.\n"
   18151                 :     "\n"
   18152                 :     "bForgiving:  TRUE if the operation should continue despite lacking\n"
   18153                 :     "output fields matching some of the source fields.\n"
   18154                 :     "\n"
   18155                 :     "OGRERR_NONE if the operation succeeds, even if some values are not\n"
   18156                 :     "transferred, otherwise an error code. \n"
   18157                 :     ""},
   18158                 :    { (char *)"Feature_SetFromWithMap", _wrap_Feature_SetFromWithMap, METH_VARARGS, (char *)"\n"
   18159                 :     "Feature_SetFromWithMap(Feature self, Feature other, int forgiving, int nList) -> OGRErr\n"
   18160                 :     "\n"
   18161                 :     "OGRErr\n"
   18162                 :     "OGR_F_SetFromWithMap(OGRFeatureH hFeat, OGRFeatureH hOtherFeat, int\n"
   18163                 :     "bForgiving, int *panMap)\n"
   18164                 :     "\n"
   18165                 :     "Set one feature from another.\n"
   18166                 :     "\n"
   18167                 :     "Overwrite the contents of this feature from the geometry and\n"
   18168                 :     "attributes of another. The hOtherFeature does not need to have the\n"
   18169                 :     "same OGRFeatureDefn. Field values are copied according to the provided\n"
   18170                 :     "indices map. Field types do not have to exactly match.\n"
   18171                 :     "OGR_F_SetField*() function conversion rules will be applied as needed.\n"
   18172                 :     "This is more efficient than OGR_F_SetFrom() in that this doesn't\n"
   18173                 :     "lookup the fields by their names. Particularly useful when the field\n"
   18174                 :     "names don't match.\n"
   18175                 :     "\n"
   18176                 :     "This function is the same as the C++ method OGRFeature::SetFrom().\n"
   18177                 :     "\n"
   18178                 :     "Parameters:\n"
   18179                 :     "-----------\n"
   18180                 :     "\n"
   18181                 :     "hFeat:  handle to the feature to set to.\n"
   18182                 :     "\n"
   18183                 :     "hOtherFeat:  handle to the feature from which geometry, and field\n"
   18184                 :     "values will be copied.\n"
   18185                 :     "\n"
   18186                 :     "panMap:  Array of the indices of the destination feature's fields\n"
   18187                 :     "stored at the corresponding index of the source feature's fields. A\n"
   18188                 :     "value of -1 should be used to ignore the source's field. The array\n"
   18189                 :     "should not be NULL and be as long as the number of fields in the\n"
   18190                 :     "source feature.\n"
   18191                 :     "\n"
   18192                 :     "bForgiving:  TRUE if the operation should continue despite lacking\n"
   18193                 :     "output fields matching some of the source fields.\n"
   18194                 :     "\n"
   18195                 :     "OGRERR_NONE if the operation succeeds, even if some values are not\n"
   18196                 :     "transferred, otherwise an error code. \n"
   18197                 :     ""},
   18198                 :    { (char *)"Feature_GetStyleString", _wrap_Feature_GetStyleString, METH_VARARGS, (char *)"\n"
   18199                 :     "Feature_GetStyleString(Feature self) -> char\n"
   18200                 :     "\n"
   18201                 :     "const char*\n"
   18202                 :     "OGR_F_GetStyleString(OGRFeatureH hFeat)\n"
   18203                 :     "\n"
   18204                 :     "Fetch style string for this feature.\n"
   18205                 :     "\n"
   18206                 :     "Set the OGR Feature Style Specification for details on the format of\n"
   18207                 :     "this string, and ogr_featurestyle.h for services available to parse\n"
   18208                 :     "it.\n"
   18209                 :     "\n"
   18210                 :     "This function is the same as the C++ method\n"
   18211                 :     "OGRFeature::GetStyleString().\n"
   18212                 :     "\n"
   18213                 :     "Parameters:\n"
   18214                 :     "-----------\n"
   18215                 :     "\n"
   18216                 :     "hFeat:  handle to the feature to get the style from.\n"
   18217                 :     "\n"
   18218                 :     "a reference to a representation in string format, or NULL if there\n"
   18219                 :     "isn't one. \n"
   18220                 :     ""},
   18221                 :    { (char *)"Feature_SetStyleString", _wrap_Feature_SetStyleString, METH_VARARGS, (char *)"\n"
   18222                 :     "Feature_SetStyleString(Feature self, char the_string)\n"
   18223                 :     "\n"
   18224                 :     "void\n"
   18225                 :     "OGR_F_SetStyleString(OGRFeatureH hFeat, const char *pszStyle)\n"
   18226                 :     "\n"
   18227                 :     "Set feature style string. This method operate exactly as\n"
   18228                 :     "OGR_F_SetStyleStringDirectly() except that it does not assume\n"
   18229                 :     "ownership of the passed string, but instead makes a copy of it.\n"
   18230                 :     "\n"
   18231                 :     "This function is the same as the C++ method\n"
   18232                 :     "OGRFeature::SetStyleString().\n"
   18233                 :     "\n"
   18234                 :     "Parameters:\n"
   18235                 :     "-----------\n"
   18236                 :     "\n"
   18237                 :     "hFeat:  handle to the feature to set style to.\n"
   18238                 :     "\n"
   18239                 :     "pszStyle:  the style string to apply to this feature, cannot be NULL.\n"
   18240                 :     "\n"
   18241                 :     ""},
   18242                 :    { (char *)"Feature_GetFieldType", _wrap_Feature_GetFieldType, METH_VARARGS, (char *)"\n"
   18243                 :     "GetFieldType(int id) -> OGRFieldType\n"
   18244                 :     "Feature_GetFieldType(Feature self, char name) -> OGRFieldType\n"
   18245                 :     ""},
   18246                 :    { (char *)"Feature_swigregister", Feature_swigregister, METH_VARARGS, NULL},
   18247                 :    { (char *)"delete_FeatureDefn", _wrap_delete_FeatureDefn, METH_VARARGS, (char *)"delete_FeatureDefn(FeatureDefn self)"},
   18248                 :    { (char *)"new_FeatureDefn", (PyCFunction) _wrap_new_FeatureDefn, METH_VARARGS | METH_KEYWORDS, (char *)"new_FeatureDefn(char name_null_ok = None) -> FeatureDefn"},
   18249                 :    { (char *)"FeatureDefn_GetName", _wrap_FeatureDefn_GetName, METH_VARARGS, (char *)"\n"
   18250                 :     "FeatureDefn_GetName(FeatureDefn self) -> char\n"
   18251                 :     "\n"
   18252                 :     "const char*\n"
   18253                 :     "OGR_FD_GetName(OGRFeatureDefnH hDefn)\n"
   18254                 :     "\n"
   18255                 :     "Get name of the OGRFeatureDefn passed as an argument.\n"
   18256                 :     "\n"
   18257                 :     "This function is the same as the C++ method OGRFeatureDefn::GetName().\n"
   18258                 :     "\n"
   18259                 :     "Parameters:\n"
   18260                 :     "-----------\n"
   18261                 :     "\n"
   18262                 :     "hDefn:  handle to the feature definition to get the name from.\n"
   18263                 :     "\n"
   18264                 :     "the name. This name is internal and should not be modified, or freed.\n"
   18265                 :     "\n"
   18266                 :     ""},
   18267                 :    { (char *)"FeatureDefn_GetFieldCount", _wrap_FeatureDefn_GetFieldCount, METH_VARARGS, (char *)"\n"
   18268                 :     "FeatureDefn_GetFieldCount(FeatureDefn self) -> int\n"
   18269                 :     "\n"
   18270                 :     "int\n"
   18271                 :     "OGR_FD_GetFieldCount(OGRFeatureDefnH hDefn)\n"
   18272                 :     "\n"
   18273                 :     "Fetch number of fields on the passed feature definition.\n"
   18274                 :     "\n"
   18275                 :     "This function is the same as the C++ OGRFeatureDefn::GetFieldCount().\n"
   18276                 :     "\n"
   18277                 :     "Parameters:\n"
   18278                 :     "-----------\n"
   18279                 :     "\n"
   18280                 :     "hDefn:  handle to the feature definition to get the fields count from.\n"
   18281                 :     "\n"
   18282                 :     "count of fields. \n"
   18283                 :     ""},
   18284                 :    { (char *)"FeatureDefn_GetFieldDefn", _wrap_FeatureDefn_GetFieldDefn, METH_VARARGS, (char *)"\n"
   18285                 :     "FeatureDefn_GetFieldDefn(FeatureDefn self, int i) -> FieldDefn\n"
   18286                 :     "\n"
   18287                 :     "OGRFieldDefnH\n"
   18288                 :     "OGR_FD_GetFieldDefn(OGRFeatureDefnH hDefn, int iField)\n"
   18289                 :     "\n"
   18290                 :     "Fetch field definition of the passed feature definition.\n"
   18291                 :     "\n"
   18292                 :     "This function is the same as the C++ method\n"
   18293                 :     "OGRFeatureDefn::GetFieldDefn().\n"
   18294                 :     "\n"
   18295                 :     "Starting with GDAL 1.7.0, this method will also issue an error if the\n"
   18296                 :     "index is not valid.\n"
   18297                 :     "\n"
   18298                 :     "Parameters:\n"
   18299                 :     "-----------\n"
   18300                 :     "\n"
   18301                 :     "hDefn:  handle to the feature definition to get the field definition\n"
   18302                 :     "from.\n"
   18303                 :     "\n"
   18304                 :     "iField:  the field to fetch, between 0 and GetFieldCount()-1.\n"
   18305                 :     "\n"
   18306                 :     "an handle to an internal field definition object or NULL if invalid\n"
   18307                 :     "index. This object should not be modified or freed by the application.\n"
   18308                 :     "\n"
   18309                 :     ""},
   18310                 :    { (char *)"FeatureDefn_GetFieldIndex", _wrap_FeatureDefn_GetFieldIndex, METH_VARARGS, (char *)"\n"
   18311                 :     "FeatureDefn_GetFieldIndex(FeatureDefn self, char name) -> int\n"
   18312                 :     "\n"
   18313                 :     "int\n"
   18314                 :     "OGR_FD_GetFieldIndex(OGRFeatureDefnH hDefn, const char *pszFieldName)\n"
   18315                 :     "\n"
   18316                 :     "Find field by name.\n"
   18317                 :     "\n"
   18318                 :     "The field index of the first field matching the passed field name\n"
   18319                 :     "(case insensitively) is returned.\n"
   18320                 :     "\n"
   18321                 :     "This function is the same as the C++ method\n"
   18322                 :     "OGRFeatureDefn::GetFieldIndex.\n"
   18323                 :     "\n"
   18324                 :     "Parameters:\n"
   18325                 :     "-----------\n"
   18326                 :     "\n"
   18327                 :     "hDefn:  handle to the feature definition to get field index from.\n"
   18328                 :     "\n"
   18329                 :     "pszFieldName:  the field name to search for.\n"
   18330                 :     "\n"
   18331                 :     "the field index, or -1 if no match found. \n"
   18332                 :     ""},
   18333                 :    { (char *)"FeatureDefn_AddFieldDefn", _wrap_FeatureDefn_AddFieldDefn, METH_VARARGS, (char *)"\n"
   18334                 :     "FeatureDefn_AddFieldDefn(FeatureDefn self, FieldDefn defn)\n"
   18335                 :     "\n"
   18336                 :     "void\n"
   18337                 :     "OGR_FD_AddFieldDefn(OGRFeatureDefnH hDefn, OGRFieldDefnH hNewField)\n"
   18338                 :     "\n"
   18339                 :     "Add a new field definition to the passed feature definition.\n"
   18340                 :     "\n"
   18341                 :     "To add a new field definition to a layer definition, do not use this\n"
   18342                 :     "function directly, but use OGR_L_CreateField() instead.\n"
   18343                 :     "\n"
   18344                 :     "This function should only be called while there are no OGRFeature\n"
   18345                 :     "objects in existance based on this OGRFeatureDefn. The OGRFieldDefn\n"
   18346                 :     "passed in is copied, and remains the responsibility of the caller.\n"
   18347                 :     "\n"
   18348                 :     "This function is the same as the C++ method\n"
   18349                 :     "OGRFeatureDefn::AddFieldDefn().\n"
   18350                 :     "\n"
   18351                 :     "Parameters:\n"
   18352                 :     "-----------\n"
   18353                 :     "\n"
   18354                 :     "hDefn:  handle to the feature definition to add the field definition\n"
   18355                 :     "to.\n"
   18356                 :     "\n"
   18357                 :     "hNewField:  handle to the new field definition. \n"
   18358                 :     ""},
   18359                 :    { (char *)"FeatureDefn_GetGeomType", _wrap_FeatureDefn_GetGeomType, METH_VARARGS, (char *)"\n"
   18360                 :     "FeatureDefn_GetGeomType(FeatureDefn self) -> OGRwkbGeometryType\n"
   18361                 :     "\n"
   18362                 :     "OGRwkbGeometryType\n"
   18363                 :     "OGR_FD_GetGeomType(OGRFeatureDefnH hDefn)\n"
   18364                 :     "\n"
   18365                 :     "Fetch the geometry base type of the passed feature definition.\n"
   18366                 :     "\n"
   18367                 :     "This function is the same as the C++ method\n"
   18368                 :     "OGRFeatureDefn::GetGeomType().\n"
   18369                 :     "\n"
   18370                 :     "Parameters:\n"
   18371                 :     "-----------\n"
   18372                 :     "\n"
   18373                 :     "hDefn:  handle to the feature definition to get the geometry type\n"
   18374                 :     "from.\n"
   18375                 :     "\n"
   18376                 :     "the base type for all geometry related to this definition. \n"
   18377                 :     ""},
   18378                 :    { (char *)"FeatureDefn_SetGeomType", _wrap_FeatureDefn_SetGeomType, METH_VARARGS, (char *)"\n"
   18379                 :     "FeatureDefn_SetGeomType(FeatureDefn self, OGRwkbGeometryType geom_type)\n"
   18380                 :     "\n"
   18381                 :     "void\n"
   18382                 :     "OGR_FD_SetGeomType(OGRFeatureDefnH hDefn, OGRwkbGeometryType eType)\n"
   18383                 :     "\n"
   18384                 :     "Assign the base geometry type for the passed layer (the same as the\n"
   18385                 :     "feature definition).\n"
   18386                 :     "\n"
   18387                 :     "All geometry objects using this type must be of the defined type or a\n"
   18388                 :     "derived type. The default upon creation is wkbUnknown which allows for\n"
   18389                 :     "any geometry type. The geometry type should generally not be changed\n"
   18390                 :     "after any OGRFeatures have been created against this definition.\n"
   18391                 :     "\n"
   18392                 :     "This function is the same as the C++ method\n"
   18393                 :     "OGRFeatureDefn::SetGeomType().\n"
   18394                 :     "\n"
   18395                 :     "Parameters:\n"
   18396                 :     "-----------\n"
   18397                 :     "\n"
   18398                 :     "hDefn:  handle to the layer or feature definition to set the geometry\n"
   18399                 :     "type to.\n"
   18400                 :     "\n"
   18401                 :     "eType:  the new type to assign. \n"
   18402                 :     ""},
   18403                 :    { (char *)"FeatureDefn_GetReferenceCount", _wrap_FeatureDefn_GetReferenceCount, METH_VARARGS, (char *)"\n"
   18404                 :     "FeatureDefn_GetReferenceCount(FeatureDefn self) -> int\n"
   18405                 :     "\n"
   18406                 :     "int\n"
   18407                 :     "OGR_FD_GetReferenceCount(OGRFeatureDefnH hDefn)\n"
   18408                 :     "\n"
   18409                 :     "Fetch current reference count.\n"
   18410                 :     "\n"
   18411                 :     "This function is the same as the C++ method\n"
   18412                 :     "OGRFeatureDefn::GetReferenceCount().\n"
   18413                 :     "\n"
   18414                 :     "Parameters:\n"
   18415                 :     "-----------\n"
   18416                 :     "\n"
   18417                 :     "hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
   18418                 :     "on.\n"
   18419                 :     "\n"
   18420                 :     "the current reference count. \n"
   18421                 :     ""},
   18422                 :    { (char *)"FeatureDefn_IsGeometryIgnored", _wrap_FeatureDefn_IsGeometryIgnored, METH_VARARGS, (char *)"\n"
   18423                 :     "FeatureDefn_IsGeometryIgnored(FeatureDefn self) -> int\n"
   18424                 :     "\n"
   18425                 :     "int\n"
   18426                 :     "OGR_FD_IsGeometryIgnored(OGRFeatureDefnH hDefn)\n"
   18427                 :     "\n"
   18428                 :     "Determine whether the geometry can be omitted when fetching features.\n"
   18429                 :     "\n"
   18430                 :     "This function is the same as the C++ method\n"
   18431                 :     "OGRFeatureDefn::IsGeometryIgnored().\n"
   18432                 :     "\n"
   18433                 :     "Parameters:\n"
   18434                 :     "-----------\n"
   18435                 :     "\n"
   18436                 :     "hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
   18437                 :     "on.\n"
   18438                 :     "\n"
   18439                 :     "ignore state \n"
   18440                 :     ""},
   18441                 :    { (char *)"FeatureDefn_SetGeometryIgnored", _wrap_FeatureDefn_SetGeometryIgnored, METH_VARARGS, (char *)"\n"
   18442                 :     "FeatureDefn_SetGeometryIgnored(FeatureDefn self, int bIgnored)\n"
   18443                 :     "\n"
   18444                 :     "void\n"
   18445                 :     "OGR_FD_SetGeometryIgnored(OGRFeatureDefnH hDefn, int bIgnore)\n"
   18446                 :     "\n"
   18447                 :     "Set whether the geometry can be omitted when fetching features.\n"
   18448                 :     "\n"
   18449                 :     "This function is the same as the C++ method\n"
   18450                 :     "OGRFeatureDefn::SetGeometryIgnored().\n"
   18451                 :     "\n"
   18452                 :     "Parameters:\n"
   18453                 :     "-----------\n"
   18454                 :     "\n"
   18455                 :     "hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
   18456                 :     "on.\n"
   18457                 :     "\n"
   18458                 :     "bIgnore:  ignore state \n"
   18459                 :     ""},
   18460                 :    { (char *)"FeatureDefn_IsStyleIgnored", _wrap_FeatureDefn_IsStyleIgnored, METH_VARARGS, (char *)"\n"
   18461                 :     "FeatureDefn_IsStyleIgnored(FeatureDefn self) -> int\n"
   18462                 :     "\n"
   18463                 :     "int\n"
   18464                 :     "OGR_FD_IsStyleIgnored(OGRFeatureDefnH hDefn)\n"
   18465                 :     "\n"
   18466                 :     "Determine whether the style can be omitted when fetching features.\n"
   18467                 :     "\n"
   18468                 :     "This function is the same as the C++ method\n"
   18469                 :     "OGRFeatureDefn::IsStyleIgnored().\n"
   18470                 :     "\n"
   18471                 :     "Parameters:\n"
   18472                 :     "-----------\n"
   18473                 :     "\n"
   18474                 :     "hDefn:  handle to the feature definition on which OGRFeature are based\n"
   18475                 :     "on.\n"
   18476                 :     "\n"
   18477                 :     "ignore state \n"
   18478                 :     ""},
   18479                 :    { (char *)"FeatureDefn_SetStyleIgnored", _wrap_FeatureDefn_SetStyleIgnored, METH_VARARGS, (char *)"\n"
   18480                 :     "FeatureDefn_SetStyleIgnored(FeatureDefn self, int bIgnored)\n"
   18481                 :     "\n"
   18482                 :     "void\n"
   18483                 :     "OGR_FD_SetStyleIgnored(OGRFeatureDefnH hDefn, int bIgnore)\n"
   18484                 :     "\n"
   18485                 :     "Set whether the style can be omitted when fetching features.\n"
   18486                 :     "\n"
   18487                 :     "This function is the same as the C++ method\n"
   18488                 :     "OGRFeatureDefn::SetStyleIgnored().\n"
   18489                 :     "\n"
   18490                 :     "Parameters:\n"
   18491                 :     "-----------\n"
   18492                 :     "\n"
   18493                 :     "hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
   18494                 :     "on.\n"
   18495                 :     "\n"
   18496                 :     "bIgnore:  ignore state \n"
   18497                 :     ""},
   18498                 :    { (char *)"FeatureDefn_swigregister", FeatureDefn_swigregister, METH_VARARGS, NULL},
   18499                 :    { (char *)"delete_FieldDefn", _wrap_delete_FieldDefn, METH_VARARGS, (char *)"delete_FieldDefn(FieldDefn self)"},
   18500                 :    { (char *)"new_FieldDefn", (PyCFunction) _wrap_new_FieldDefn, METH_VARARGS | METH_KEYWORDS, (char *)"new_FieldDefn(char name_null_ok = \"unnamed\", OGRFieldType field_type = OFTString) -> FieldDefn"},
   18501                 :    { (char *)"FieldDefn_GetName", _wrap_FieldDefn_GetName, METH_VARARGS, (char *)"FieldDefn_GetName(FieldDefn self) -> char"},
   18502                 :    { (char *)"FieldDefn_GetNameRef", _wrap_FieldDefn_GetNameRef, METH_VARARGS, (char *)"\n"
   18503                 :     "FieldDefn_GetNameRef(FieldDefn self) -> char\n"
   18504                 :     "\n"
   18505                 :     "const char*\n"
   18506                 :     "OGR_Fld_GetNameRef(OGRFieldDefnH hDefn)\n"
   18507                 :     "\n"
   18508                 :     "Fetch name of this field.\n"
   18509                 :     "\n"
   18510                 :     "This function is the same as the CPP method\n"
   18511                 :     "OGRFieldDefn::GetNameRef().\n"
   18512                 :     "\n"
   18513                 :     "Parameters:\n"
   18514                 :     "-----------\n"
   18515                 :     "\n"
   18516                 :     "hDefn:  handle to the field definition.\n"
   18517                 :     "\n"
   18518                 :     "the name of the field definition. \n"
   18519                 :     ""},
   18520                 :    { (char *)"FieldDefn_SetName", _wrap_FieldDefn_SetName, METH_VARARGS, (char *)"\n"
   18521                 :     "FieldDefn_SetName(FieldDefn self, char name)\n"
   18522                 :     "\n"
   18523                 :     "void OGR_Fld_SetName(OGRFieldDefnH\n"
   18524                 :     "hDefn, const char *pszName)\n"
   18525                 :     "\n"
   18526                 :     "Reset the name of this field.\n"
   18527                 :     "\n"
   18528                 :     "This function is the same as the CPP method OGRFieldDefn::SetName().\n"
   18529                 :     "\n"
   18530                 :     "Parameters:\n"
   18531                 :     "-----------\n"
   18532                 :     "\n"
   18533                 :     "hDefn:  handle to the field definition to apply the new name to.\n"
   18534                 :     "\n"
   18535                 :     "pszName:  the new name to apply. \n"
   18536                 :     ""},
   18537                 :    { (char *)"FieldDefn_GetType", _wrap_FieldDefn_GetType, METH_VARARGS, (char *)"\n"
   18538                 :     "FieldDefn_GetType(FieldDefn self) -> OGRFieldType\n"
   18539                 :     "\n"
   18540                 :     "OGRFieldType\n"
   18541                 :     "OGR_Fld_GetType(OGRFieldDefnH hDefn)\n"
   18542                 :     "\n"
   18543                 :     "Fetch type of this field.\n"
   18544                 :     "\n"
   18545                 :     "This function is the same as the CPP method OGRFieldDefn::GetType().\n"
   18546                 :     "\n"
   18547                 :     "Parameters:\n"
   18548                 :     "-----------\n"
   18549                 :     "\n"
   18550                 :     "hDefn:  handle to the field definition to get type from.\n"
   18551                 :     "\n"
   18552                 :     "field type. \n"
   18553                 :     ""},
   18554                 :    { (char *)"FieldDefn_SetType", _wrap_FieldDefn_SetType, METH_VARARGS, (char *)"\n"
   18555                 :     "FieldDefn_SetType(FieldDefn self, OGRFieldType type)\n"
   18556                 :     "\n"
   18557                 :     "void OGR_Fld_SetType(OGRFieldDefnH\n"
   18558                 :     "hDefn, OGRFieldType eType)\n"
   18559                 :     "\n"
   18560                 :     "Set the type of this field. This should never be done to an\n"
   18561                 :     "OGRFieldDefn that is already part of an OGRFeatureDefn.\n"
   18562                 :     "\n"
   18563                 :     "This function is the same as the CPP method OGRFieldDefn::SetType().\n"
   18564                 :     "\n"
   18565                 :     "Parameters:\n"
   18566                 :     "-----------\n"
   18567                 :     "\n"
   18568                 :     "hDefn:  handle to the field definition to set type to.\n"
   18569                 :     "\n"
   18570                 :     "eType:  the new field type. \n"
   18571                 :     ""},
   18572                 :    { (char *)"FieldDefn_GetJustify", _wrap_FieldDefn_GetJustify, METH_VARARGS, (char *)"\n"
   18573                 :     "FieldDefn_GetJustify(FieldDefn self) -> OGRJustification\n"
   18574                 :     "\n"
   18575                 :     "OGRJustification\n"
   18576                 :     "OGR_Fld_GetJustify(OGRFieldDefnH hDefn)\n"
   18577                 :     "\n"
   18578                 :     "Get the justification for this field.\n"
   18579                 :     "\n"
   18580                 :     "This function is the same as the CPP method\n"
   18581                 :     "OGRFieldDefn::GetJustify().\n"
   18582                 :     "\n"
   18583                 :     "Parameters:\n"
   18584                 :     "-----------\n"
   18585                 :     "\n"
   18586                 :     "hDefn:  handle to the field definition to get justification from.\n"
   18587                 :     "\n"
   18588                 :     "the justification. \n"
   18589                 :     ""},
   18590                 :    { (char *)"FieldDefn_SetJustify", _wrap_FieldDefn_SetJustify, METH_VARARGS, (char *)"\n"
   18591                 :     "FieldDefn_SetJustify(FieldDefn self, OGRJustification justify)\n"
   18592                 :     "\n"
   18593                 :     "void\n"
   18594                 :     "OGR_Fld_SetJustify(OGRFieldDefnH hDefn, OGRJustification eJustify)\n"
   18595                 :     "\n"
   18596                 :     "Set the justification for this field.\n"
   18597                 :     "\n"
   18598                 :     "This function is the same as the CPP method\n"
   18599                 :     "OGRFieldDefn::SetJustify().\n"
   18600                 :     "\n"
   18601                 :     "Parameters:\n"
   18602                 :     "-----------\n"
   18603                 :     "\n"
   18604                 :     "hDefn:  handle to the field definition to set justification to.\n"
   18605                 :     "\n"
   18606                 :     "eJustify:  the new justification. \n"
   18607                 :     ""},
   18608                 :    { (char *)"FieldDefn_GetWidth", _wrap_FieldDefn_GetWidth, METH_VARARGS, (char *)"\n"
   18609                 :     "FieldDefn_GetWidth(FieldDefn self) -> int\n"
   18610                 :     "\n"
   18611                 :     "int OGR_Fld_GetWidth(OGRFieldDefnH\n"
   18612                 :     "hDefn)\n"
   18613                 :     "\n"
   18614                 :     "Get the formatting width for this field.\n"
   18615                 :     "\n"
   18616                 :     "This function is the same as the CPP method OGRFieldDefn::GetWidth().\n"
   18617                 :     "\n"
   18618                 :     "Parameters:\n"
   18619                 :     "-----------\n"
   18620                 :     "\n"
   18621                 :     "hDefn:  handle to the field definition to get width from.\n"
   18622                 :     "\n"
   18623                 :     "the width, zero means no specified width. \n"
   18624                 :     ""},
   18625                 :    { (char *)"FieldDefn_SetWidth", _wrap_FieldDefn_SetWidth, METH_VARARGS, (char *)"\n"
   18626                 :     "FieldDefn_SetWidth(FieldDefn self, int width)\n"
   18627                 :     "\n"
   18628                 :     "void OGR_Fld_SetWidth(OGRFieldDefnH\n"
   18629                 :     "hDefn, int nNewWidth)\n"
   18630                 :     "\n"
   18631                 :     "Set the formatting width for this field in characters.\n"
   18632                 :     "\n"
   18633                 :     "This function is the same as the CPP method OGRFieldDefn::SetWidth().\n"
   18634                 :     "\n"
   18635                 :     "Parameters:\n"
   18636                 :     "-----------\n"
   18637                 :     "\n"
   18638                 :     "hDefn:  handle to the field definition to set width to.\n"
   18639                 :     "\n"
   18640                 :     "nNewWidth:  the new width. \n"
   18641                 :     ""},
   18642                 :    { (char *)"FieldDefn_GetPrecision", _wrap_FieldDefn_GetPrecision, METH_VARARGS, (char *)"\n"
   18643                 :     "FieldDefn_GetPrecision(FieldDefn self) -> int\n"
   18644                 :     "\n"
   18645                 :     "int\n"
   18646                 :     "OGR_Fld_GetPrecision(OGRFieldDefnH hDefn)\n"
   18647                 :     "\n"
   18648                 :     "Get the formatting precision for this field. This should normally be\n"
   18649                 :     "zero for fields of types other than OFTReal.\n"
   18650                 :     "\n"
   18651                 :     "This function is the same as the CPP method\n"
   18652                 :     "OGRFieldDefn::GetPrecision().\n"
   18653                 :     "\n"
   18654                 :     "Parameters:\n"
   18655                 :     "-----------\n"
   18656                 :     "\n"
   18657                 :     "hDefn:  handle to the field definition to get precision from.\n"
   18658                 :     "\n"
   18659                 :     "the precision. \n"
   18660                 :     ""},
   18661                 :    { (char *)"FieldDefn_SetPrecision", _wrap_FieldDefn_SetPrecision, METH_VARARGS, (char *)"\n"
   18662                 :     "FieldDefn_SetPrecision(FieldDefn self, int precision)\n"
   18663                 :     "\n"
   18664                 :     "void\n"
   18665                 :     "OGR_Fld_SetPrecision(OGRFieldDefnH hDefn, int nPrecision)\n"
   18666                 :     "\n"
   18667                 :     "Set the formatting precision for this field in characters.\n"
   18668                 :     "\n"
   18669                 :     "This should normally be zero for fields of types other than OFTReal.\n"
   18670                 :     "\n"
   18671                 :     "This function is the same as the CPP method\n"
   18672                 :     "OGRFieldDefn::SetPrecision().\n"
   18673                 :     "\n"
   18674                 :     "Parameters:\n"
   18675                 :     "-----------\n"
   18676                 :     "\n"
   18677                 :     "hDefn:  handle to the field definition to set precision to.\n"
   18678                 :     "\n"
   18679                 :     "nPrecision:  the new precision. \n"
   18680                 :     ""},
   18681                 :    { (char *)"FieldDefn_GetTypeName", _wrap_FieldDefn_GetTypeName, METH_VARARGS, (char *)"FieldDefn_GetTypeName(FieldDefn self) -> char"},
   18682                 :    { (char *)"FieldDefn_GetFieldTypeName", _wrap_FieldDefn_GetFieldTypeName, METH_VARARGS, (char *)"FieldDefn_GetFieldTypeName(FieldDefn self, OGRFieldType type) -> char"},
   18683                 :    { (char *)"FieldDefn_IsIgnored", _wrap_FieldDefn_IsIgnored, METH_VARARGS, (char *)"\n"
   18684                 :     "FieldDefn_IsIgnored(FieldDefn self) -> int\n"
   18685                 :     "\n"
   18686                 :     "int OGR_Fld_IsIgnored(OGRFieldDefnH\n"
   18687                 :     "hDefn)\n"
   18688                 :     "\n"
   18689                 :     "Return whether this field should be omitted when fetching features.\n"
   18690                 :     "\n"
   18691                 :     "This method is the same as the C++ method OGRFieldDefn::IsIgnored().\n"
   18692                 :     "\n"
   18693                 :     "Parameters:\n"
   18694                 :     "-----------\n"
   18695                 :     "\n"
   18696                 :     "hDefn:  handle to the field definition\n"
   18697                 :     "\n"
   18698                 :     "ignore state \n"
   18699                 :     ""},
   18700                 :    { (char *)"FieldDefn_SetIgnored", _wrap_FieldDefn_SetIgnored, METH_VARARGS, (char *)"\n"
   18701                 :     "FieldDefn_SetIgnored(FieldDefn self, int bIgnored)\n"
   18702                 :     "\n"
   18703                 :     "void\n"
   18704                 :     "OGR_Fld_SetIgnored(OGRFieldDefnH hDefn, int ignore)\n"
   18705                 :     "\n"
   18706                 :     "Set whether this field should be omitted when fetching features.\n"
   18707                 :     "\n"
   18708                 :     "This method is the same as the C function OGRFieldDefn::SetIgnored().\n"
   18709                 :     "\n"
   18710                 :     "Parameters:\n"
   18711                 :     "-----------\n"
   18712                 :     "\n"
   18713                 :     "hDefn:  handle to the field definition\n"
   18714                 :     "\n"
   18715                 :     "ignore:  ignore state \n"
   18716                 :     ""},
   18717                 :    { (char *)"FieldDefn_swigregister", FieldDefn_swigregister, METH_VARARGS, NULL},
   18718                 :    { (char *)"CreateGeometryFromWkb", (PyCFunction) _wrap_CreateGeometryFromWkb, METH_VARARGS | METH_KEYWORDS, (char *)"CreateGeometryFromWkb(int len, SpatialReference reference = None) -> Geometry"},
   18719                 :    { (char *)"CreateGeometryFromWkt", (PyCFunction) _wrap_CreateGeometryFromWkt, METH_VARARGS | METH_KEYWORDS, (char *)"CreateGeometryFromWkt(char val, SpatialReference reference = None) -> Geometry"},
   18720                 :    { (char *)"CreateGeometryFromGML", _wrap_CreateGeometryFromGML, METH_VARARGS, (char *)"CreateGeometryFromGML(char input_string) -> Geometry"},
   18721                 :    { (char *)"CreateGeometryFromJson", _wrap_CreateGeometryFromJson, METH_VARARGS, (char *)"CreateGeometryFromJson(char input_string) -> Geometry"},
   18722                 :    { (char *)"BuildPolygonFromEdges", (PyCFunction) _wrap_BuildPolygonFromEdges, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   18723                 :     "BuildPolygonFromEdges(Geometry hLineCollection, int bBestEffort = 0, int bAutoClose = 0, \n"
   18724                 :     "    double dfTolerance = 0) -> Geometry\n"
   18725                 :     ""},
   18726                 :    { (char *)"ApproximateArcAngles", (PyCFunction) _wrap_ApproximateArcAngles, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   18727                 :     "ApproximateArcAngles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, \n"
   18728                 :     "    double dfSecondaryAxis, \n"
   18729                 :     "    double dfRotation, double dfStartAngle, double dfEndAngle, \n"
   18730                 :     "    double dfMaxAngleStepSizeDegrees) -> Geometry\n"
   18731                 :     ""},
   18732                 :    { (char *)"ForceToPolygon", _wrap_ForceToPolygon, METH_VARARGS, (char *)"ForceToPolygon(Geometry geom_in) -> Geometry"},
   18733                 :    { (char *)"ForceToMultiPolygon", _wrap_ForceToMultiPolygon, METH_VARARGS, (char *)"ForceToMultiPolygon(Geometry geom_in) -> Geometry"},
   18734                 :    { (char *)"ForceToMultiPoint", _wrap_ForceToMultiPoint, METH_VARARGS, (char *)"ForceToMultiPoint(Geometry geom_in) -> Geometry"},
   18735                 :    { (char *)"ForceToMultiLineString", _wrap_ForceToMultiLineString, METH_VARARGS, (char *)"ForceToMultiLineString(Geometry geom_in) -> Geometry"},
   18736                 :    { (char *)"delete_Geometry", _wrap_delete_Geometry, METH_VARARGS, (char *)"delete_Geometry(Geometry self)"},
   18737                 :    { (char *)"new_Geometry", (PyCFunction) _wrap_new_Geometry, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   18738                 :     "new_Geometry(OGRwkbGeometryType type = wkbUnknown, char wkt = None, \n"
   18739                 :     "    int wkb = 0, char gml = None) -> Geometry\n"
   18740                 :     ""},
   18741                 :    { (char *)"Geometry_ExportToWkt", _wrap_Geometry_ExportToWkt, METH_VARARGS, (char *)"\n"
   18742                 :     "Geometry_ExportToWkt(Geometry self) -> OGRErr\n"
   18743                 :     "\n"
   18744                 :     "OGRErr\n"
   18745                 :     "OGR_G_ExportToWkt(OGRGeometryH hGeom, char **ppszSrcText)\n"
   18746                 :     "\n"
   18747                 :     "Convert a geometry into well known text format.\n"
   18748                 :     "\n"
   18749                 :     "This function relates to the SFCOM IWks::ExportToWKT() method.\n"
   18750                 :     "\n"
   18751                 :     "This function is the same as the CPP method\n"
   18752                 :     "OGRGeometry::exportToWkt().\n"
   18753                 :     "\n"
   18754                 :     "Parameters:\n"
   18755                 :     "-----------\n"
   18756                 :     "\n"
   18757                 :     "hGeom:  handle on the geometry to convert to a text format from.\n"
   18758                 :     "\n"
   18759                 :     "ppszSrcText:  a text buffer is allocated by the program, and assigned\n"
   18760                 :     "to the passed pointer.\n"
   18761                 :     "\n"
   18762                 :     "Currently OGRERR_NONE is always returned. \n"
   18763                 :     ""},
   18764                 :    { (char *)"Geometry_ExportToWkb", (PyCFunction) _wrap_Geometry_ExportToWkb, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   18765                 :     "Geometry_ExportToWkb(Geometry self, OGRwkbByteOrder byte_order = wkbXDR) -> OGRErr\n"
   18766                 :     "\n"
   18767                 :     "OGRErr\n"
   18768                 :     "OGR_G_ExportToWkb(OGRGeometryH hGeom, OGRwkbByteOrder eOrder, unsigned\n"
   18769                 :     "char *pabyDstBuffer)\n"
   18770                 :     "\n"
   18771                 :     "Convert a geometry into well known binary format.\n"
   18772                 :     "\n"
   18773                 :     "This function relates to the SFCOM IWks::ExportToWKB() method.\n"
   18774                 :     "\n"
   18775                 :     "This function is the same as the CPP method\n"
   18776                 :     "OGRGeometry::exportToWkb().\n"
   18777                 :     "\n"
   18778                 :     "Parameters:\n"
   18779                 :     "-----------\n"
   18780                 :     "\n"
   18781                 :     "hGeom:  handle on the geometry to convert to a well know binary data\n"
   18782                 :     "from.\n"
   18783                 :     "\n"
   18784                 :     "eOrder:  One of wkbXDR or wkbNDR indicating MSB or LSB byte order\n"
   18785                 :     "respectively.\n"
   18786                 :     "\n"
   18787                 :     "pabyDstBuffer:  a buffer into which the binary representation is\n"
   18788                 :     "written. This buffer must be at least OGR_G_WkbSize() byte in size.\n"
   18789                 :     "\n"
   18790                 :     "Currently OGRERR_NONE is always returned. \n"
   18791                 :     ""},
   18792                 :    { (char *)"Geometry_ExportToGML", (PyCFunction) _wrap_Geometry_ExportToGML, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_ExportToGML(Geometry self, char options = None) -> retStringAndCPLFree"},
   18793                 :    { (char *)"Geometry_ExportToKML", _wrap_Geometry_ExportToKML, METH_VARARGS, (char *)"Geometry_ExportToKML(Geometry self, char altitude_mode = None) -> retStringAndCPLFree"},
   18794                 :    { (char *)"Geometry_ExportToJson", (PyCFunction) _wrap_Geometry_ExportToJson, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_ExportToJson(Geometry self, char options = None) -> retStringAndCPLFree"},
   18795                 :    { (char *)"Geometry_AddPoint", (PyCFunction) _wrap_Geometry_AddPoint, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_AddPoint(Geometry self, double x, double y, double z = 0)"},
   18796                 :    { (char *)"Geometry_AddPoint_2D", _wrap_Geometry_AddPoint_2D, METH_VARARGS, (char *)"Geometry_AddPoint_2D(Geometry self, double x, double y)"},
   18797                 :    { (char *)"Geometry_AddGeometryDirectly", _wrap_Geometry_AddGeometryDirectly, METH_VARARGS, (char *)"Geometry_AddGeometryDirectly(Geometry self, Geometry other_disown) -> OGRErr"},
   18798                 :    { (char *)"Geometry_AddGeometry", _wrap_Geometry_AddGeometry, METH_VARARGS, (char *)"Geometry_AddGeometry(Geometry self, Geometry other) -> OGRErr"},
   18799                 :    { (char *)"Geometry_Clone", _wrap_Geometry_Clone, METH_VARARGS, (char *)"\n"
   18800                 :     "Geometry_Clone(Geometry self) -> Geometry\n"
   18801                 :     "\n"
   18802                 :     "OGRGeometryH OGR_G_Clone(OGRGeometryH\n"
   18803                 :     "hGeom)\n"
   18804                 :     "\n"
   18805                 :     "Make a copy of this object.\n"
   18806                 :     "\n"
   18807                 :     "This function relates to the SFCOM IGeometry::clone() method.\n"
   18808                 :     "\n"
   18809                 :     "This function is the same as the CPP method OGRGeometry::clone().\n"
   18810                 :     "\n"
   18811                 :     "Parameters:\n"
   18812                 :     "-----------\n"
   18813                 :     "\n"
   18814                 :     "hGeom:  handle on the geometry to clone from.\n"
   18815                 :     "\n"
   18816                 :     "an handle on the copy of the geometry with the spatial reference\n"
   18817                 :     "system as the original. \n"
   18818                 :     ""},
   18819                 :    { (char *)"Geometry_GetGeometryType", _wrap_Geometry_GetGeometryType, METH_VARARGS, (char *)"\n"
   18820                 :     "Geometry_GetGeometryType(Geometry self) -> OGRwkbGeometryType\n"
   18821                 :     "\n"
   18822                 :     "OGRwkbGeometryType\n"
   18823                 :     "OGR_G_GetGeometryType(OGRGeometryH hGeom)\n"
   18824                 :     "\n"
   18825                 :     "Fetch geometry type.\n"
   18826                 :     "\n"
   18827                 :     "Note that the geometry type may include the 2.5D flag. To get a 2D\n"
   18828                 :     "flattened version of the geometry type apply the wkbFlatten() macro to\n"
   18829                 :     "the return result.\n"
   18830                 :     "\n"
   18831                 :     "This function is the same as the CPP method\n"
   18832                 :     "OGRGeometry::getGeometryType().\n"
   18833                 :     "\n"
   18834                 :     "Parameters:\n"
   18835                 :     "-----------\n"
   18836                 :     "\n"
   18837                 :     "hGeom:  handle on the geometry to get type from.\n"
   18838                 :     "\n"
   18839                 :     "the geometry type code. \n"
   18840                 :     ""},
   18841                 :    { (char *)"Geometry_GetGeometryName", _wrap_Geometry_GetGeometryName, METH_VARARGS, (char *)"\n"
   18842                 :     "Geometry_GetGeometryName(Geometry self) -> char\n"
   18843                 :     "\n"
   18844                 :     "const char*\n"
   18845                 :     "OGR_G_GetGeometryName(OGRGeometryH hGeom)\n"
   18846                 :     "\n"
   18847                 :     "Fetch WKT name for geometry type.\n"
   18848                 :     "\n"
   18849                 :     "There is no SFCOM analog to this function.\n"
   18850                 :     "\n"
   18851                 :     "This function is the same as the CPP method\n"
   18852                 :     "OGRGeometry::getGeometryName().\n"
   18853                 :     "\n"
   18854                 :     "Parameters:\n"
   18855                 :     "-----------\n"
   18856                 :     "\n"
   18857                 :     "hGeom:  handle on the geometry to get name from.\n"
   18858                 :     "\n"
   18859                 :     "name used for this geometry type in well known text format. \n"
   18860                 :     ""},
   18861                 :    { (char *)"Geometry_Length", _wrap_Geometry_Length, METH_VARARGS, (char *)"Geometry_Length(Geometry self) -> double"},
   18862                 :    { (char *)"Geometry_Area", _wrap_Geometry_Area, METH_VARARGS, (char *)"Geometry_Area(Geometry self) -> double"},
   18863                 :    { (char *)"Geometry_GetArea", _wrap_Geometry_GetArea, METH_VARARGS, (char *)"Geometry_GetArea(Geometry self) -> double"},
   18864                 :    { (char *)"Geometry_GetPointCount", _wrap_Geometry_GetPointCount, METH_VARARGS, (char *)"Geometry_GetPointCount(Geometry self) -> int"},
   18865                 :    { (char *)"Geometry_GetPoints", (PyCFunction) _wrap_Geometry_GetPoints, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetPoints(Geometry self, int nCoordDimension = 0)"},
   18866                 :    { (char *)"Geometry_GetX", (PyCFunction) _wrap_Geometry_GetX, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetX(Geometry self, int point = 0) -> double"},
   18867                 :    { (char *)"Geometry_GetY", (PyCFunction) _wrap_Geometry_GetY, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetY(Geometry self, int point = 0) -> double"},
   18868                 :    { (char *)"Geometry_GetZ", (PyCFunction) _wrap_Geometry_GetZ, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetZ(Geometry self, int point = 0) -> double"},
   18869                 :    { (char *)"Geometry_GetPoint", _wrap_Geometry_GetPoint, METH_VARARGS, (char *)"Geometry_GetPoint(Geometry self, int iPoint = 0)"},
   18870                 :    { (char *)"Geometry_GetPoint_2D", _wrap_Geometry_GetPoint_2D, METH_VARARGS, (char *)"Geometry_GetPoint_2D(Geometry self, int iPoint = 0)"},
   18871                 :    { (char *)"Geometry_GetGeometryCount", _wrap_Geometry_GetGeometryCount, METH_VARARGS, (char *)"Geometry_GetGeometryCount(Geometry self) -> int"},
   18872                 :    { (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)"},
   18873                 :    { (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)"},
   18874                 :    { (char *)"Geometry_GetGeometryRef", _wrap_Geometry_GetGeometryRef, METH_VARARGS, (char *)"Geometry_GetGeometryRef(Geometry self, int geom) -> Geometry"},
   18875                 :    { (char *)"Geometry_Simplify", _wrap_Geometry_Simplify, METH_VARARGS, (char *)"\n"
   18876                 :     "Geometry_Simplify(Geometry self, double tolerance) -> Geometry\n"
   18877                 :     "\n"
   18878                 :     "OGRGeometryH\n"
   18879                 :     "OGR_G_Simplify(OGRGeometryH hThis, double dTolerance)\n"
   18880                 :     "\n"
   18881                 :     "Compute a simplified geometry.\n"
   18882                 :     "\n"
   18883                 :     "This function is the same as the C++ method OGRGeometry::Simplify().\n"
   18884                 :     "\n"
   18885                 :     "This function is built on the GEOS library, check it for the\n"
   18886                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   18887                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   18888                 :     "error.\n"
   18889                 :     "\n"
   18890                 :     "Parameters:\n"
   18891                 :     "-----------\n"
   18892                 :     "\n"
   18893                 :     "hThis:  the geometry.\n"
   18894                 :     "\n"
   18895                 :     "dTolerance:  the distance tolerance for the simplification.\n"
   18896                 :     "\n"
   18897                 :     "the simplified geometry or NULL if an error occurs.\n"
   18898                 :     "\n"
   18899                 :     "OGR 1.8.0 \n"
   18900                 :     ""},
   18901                 :    { (char *)"Geometry_SimplifyPreserveTopology", _wrap_Geometry_SimplifyPreserveTopology, METH_VARARGS, (char *)"\n"
   18902                 :     "Geometry_SimplifyPreserveTopology(Geometry self, double tolerance) -> Geometry\n"
   18903                 :     "\n"
   18904                 :     "OGRGeometryH\n"
   18905                 :     "OGR_G_SimplifyPreserveTopology(OGRGeometryH hThis, double dTolerance)\n"
   18906                 :     "\n"
   18907                 :     "Compute a simplified geometry.\n"
   18908                 :     "\n"
   18909                 :     "This function is the same as the C++ method\n"
   18910                 :     "OGRGeometry::SimplifyPreserveTopology().\n"
   18911                 :     "\n"
   18912                 :     "This function is built on the GEOS library, check it for the\n"
   18913                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   18914                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   18915                 :     "error.\n"
   18916                 :     "\n"
   18917                 :     "Parameters:\n"
   18918                 :     "-----------\n"
   18919                 :     "\n"
   18920                 :     "hThis:  the geometry.\n"
   18921                 :     "\n"
   18922                 :     "dTolerance:  the distance tolerance for the simplification.\n"
   18923                 :     "\n"
   18924                 :     "the simplified geometry or NULL if an error occurs.\n"
   18925                 :     "\n"
   18926                 :     "OGR 1.9.0 \n"
   18927                 :     ""},
   18928                 :    { (char *)"Geometry_Boundary", _wrap_Geometry_Boundary, METH_VARARGS, (char *)"\n"
   18929                 :     "Geometry_Boundary(Geometry self) -> Geometry\n"
   18930                 :     "\n"
   18931                 :     "OGRGeometryH\n"
   18932                 :     "OGR_G_Boundary(OGRGeometryH hTarget)\n"
   18933                 :     "\n"
   18934                 :     "Compute boundary.\n"
   18935                 :     "\n"
   18936                 :     "A new geometry object is created and returned containing the boundary\n"
   18937                 :     "of the geometry on which the method is invoked.\n"
   18938                 :     "\n"
   18939                 :     "This function is the same as the C++ method OGR_G_Boundary().\n"
   18940                 :     "\n"
   18941                 :     "This function is built on the GEOS library, check it for the\n"
   18942                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   18943                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   18944                 :     "error.\n"
   18945                 :     "\n"
   18946                 :     "Parameters:\n"
   18947                 :     "-----------\n"
   18948                 :     "\n"
   18949                 :     "hTarget:  The Geometry to calculate the boundary of.\n"
   18950                 :     "\n"
   18951                 :     "a handle to a newly allocated geometry now owned by the caller, or\n"
   18952                 :     "NULL on failure.\n"
   18953                 :     "\n"
   18954                 :     "OGR 1.8.0 \n"
   18955                 :     ""},
   18956                 :    { (char *)"Geometry_GetBoundary", _wrap_Geometry_GetBoundary, METH_VARARGS, (char *)"\n"
   18957                 :     "Geometry_GetBoundary(Geometry self) -> Geometry\n"
   18958                 :     "\n"
   18959                 :     "OGRGeometryH\n"
   18960                 :     "OGR_G_GetBoundary(OGRGeometryH hTarget)\n"
   18961                 :     "\n"
   18962                 :     "Compute boundary (deprecated).\n"
   18963                 :     "\n"
   18964                 :     "Deprecated See:   OGR_G_Boundary() \n"
   18965                 :     ""},
   18966                 :    { (char *)"Geometry_ConvexHull", _wrap_Geometry_ConvexHull, METH_VARARGS, (char *)"\n"
   18967                 :     "Geometry_ConvexHull(Geometry self) -> Geometry\n"
   18968                 :     "\n"
   18969                 :     "OGRGeometryH\n"
   18970                 :     "OGR_G_ConvexHull(OGRGeometryH hTarget)\n"
   18971                 :     "\n"
   18972                 :     "Compute convex hull.\n"
   18973                 :     "\n"
   18974                 :     "A new geometry object is created and returned containing the convex\n"
   18975                 :     "hull of the geometry on which the method is invoked.\n"
   18976                 :     "\n"
   18977                 :     "This function is the same as the C++ method OGRGeometry::ConvexHull().\n"
   18978                 :     "\n"
   18979                 :     "This function is built on the GEOS library, check it for the\n"
   18980                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   18981                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   18982                 :     "error.\n"
   18983                 :     "\n"
   18984                 :     "Parameters:\n"
   18985                 :     "-----------\n"
   18986                 :     "\n"
   18987                 :     "hTarget:  The Geometry to calculate the convex hull of.\n"
   18988                 :     "\n"
   18989                 :     "a handle to a newly allocated geometry now owned by the caller, or\n"
   18990                 :     "NULL on failure. \n"
   18991                 :     ""},
   18992                 :    { (char *)"Geometry_Buffer", (PyCFunction) _wrap_Geometry_Buffer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   18993                 :     "Geometry_Buffer(Geometry self, double distance, int quadsecs = 30) -> Geometry\n"
   18994                 :     "\n"
   18995                 :     "OGRGeometryH OGR_G_Buffer(OGRGeometryH\n"
   18996                 :     "hTarget, double dfDist, int nQuadSegs)\n"
   18997                 :     "\n"
   18998                 :     "Compute buffer of geometry.\n"
   18999                 :     "\n"
   19000                 :     "Builds a new geometry containing the buffer region around the geometry\n"
   19001                 :     "on which it is invoked. The buffer is a polygon containing the region\n"
   19002                 :     "within the buffer distance of the original geometry.\n"
   19003                 :     "\n"
   19004                 :     "Some buffer sections are properly described as curves, but are\n"
   19005                 :     "converted to approximate polygons. The nQuadSegs parameter can be used\n"
   19006                 :     "to control how many segements should be used to define a 90 degree\n"
   19007                 :     "curve - a quadrant of a circle. A value of 30 is a reasonable default.\n"
   19008                 :     "Large values result in large numbers of vertices in the resulting\n"
   19009                 :     "buffer geometry while small numbers reduce the accuracy of the result.\n"
   19010                 :     "\n"
   19011                 :     "This function is the same as the C++ method OGRGeometry::Buffer().\n"
   19012                 :     "\n"
   19013                 :     "This function is built on the GEOS library, check it for the\n"
   19014                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19015                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19016                 :     "error.\n"
   19017                 :     "\n"
   19018                 :     "Parameters:\n"
   19019                 :     "-----------\n"
   19020                 :     "\n"
   19021                 :     "hTarget:  the geometry.\n"
   19022                 :     "\n"
   19023                 :     "dfDist:  the buffer distance to be applied.\n"
   19024                 :     "\n"
   19025                 :     "nQuadSegs:  the number of segments used to approximate a 90 degree\n"
   19026                 :     "(quadrant) of curvature.\n"
   19027                 :     "\n"
   19028                 :     "the newly created geometry, or NULL if an error occurs. \n"
   19029                 :     ""},
   19030                 :    { (char *)"Geometry_Intersection", _wrap_Geometry_Intersection, METH_VARARGS, (char *)"\n"
   19031                 :     "Geometry_Intersection(Geometry self, Geometry other) -> Geometry\n"
   19032                 :     "\n"
   19033                 :     "OGRGeometryH\n"
   19034                 :     "OGR_G_Intersection(OGRGeometryH hThis, OGRGeometryH hOther)\n"
   19035                 :     "\n"
   19036                 :     "Compute intersection.\n"
   19037                 :     "\n"
   19038                 :     "Generates a new geometry which is the region of intersection of the\n"
   19039                 :     "two geometries operated on. The OGR_G_Intersects() function can be\n"
   19040                 :     "used to test if two geometries intersect.\n"
   19041                 :     "\n"
   19042                 :     "This function is the same as the C++ method\n"
   19043                 :     "OGRGeometry::Intersection().\n"
   19044                 :     "\n"
   19045                 :     "This function is built on the GEOS library, check it for the\n"
   19046                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19047                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19048                 :     "error.\n"
   19049                 :     "\n"
   19050                 :     "Parameters:\n"
   19051                 :     "-----------\n"
   19052                 :     "\n"
   19053                 :     "hThis:  the geometry.\n"
   19054                 :     "\n"
   19055                 :     "hOther:  the other geometry.\n"
   19056                 :     "\n"
   19057                 :     "a new geometry representing the intersection or NULL if there is no\n"
   19058                 :     "intersection or an error occurs. \n"
   19059                 :     ""},
   19060                 :    { (char *)"Geometry_Union", _wrap_Geometry_Union, METH_VARARGS, (char *)"\n"
   19061                 :     "Geometry_Union(Geometry self, Geometry other) -> Geometry\n"
   19062                 :     "\n"
   19063                 :     "OGRGeometryH OGR_G_Union(OGRGeometryH\n"
   19064                 :     "hThis, OGRGeometryH hOther)\n"
   19065                 :     "\n"
   19066                 :     "Compute union.\n"
   19067                 :     "\n"
   19068                 :     "Generates a new geometry which is the region of union of the two\n"
   19069                 :     "geometries operated on.\n"
   19070                 :     "\n"
   19071                 :     "This function is the same as the C++ method OGRGeometry::Union().\n"
   19072                 :     "\n"
   19073                 :     "This function is built on the GEOS library, check it for the\n"
   19074                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19075                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19076                 :     "error.\n"
   19077                 :     "\n"
   19078                 :     "Parameters:\n"
   19079                 :     "-----------\n"
   19080                 :     "\n"
   19081                 :     "hThis:  the geometry.\n"
   19082                 :     "\n"
   19083                 :     "hOther:  the other geometry.\n"
   19084                 :     "\n"
   19085                 :     "a new geometry representing the union or NULL if an error occurs. \n"
   19086                 :     ""},
   19087                 :    { (char *)"Geometry_UnionCascaded", _wrap_Geometry_UnionCascaded, METH_VARARGS, (char *)"\n"
   19088                 :     "Geometry_UnionCascaded(Geometry self) -> Geometry\n"
   19089                 :     "\n"
   19090                 :     "OGRGeometryH\n"
   19091                 :     "OGR_G_UnionCascaded(OGRGeometryH hThis)\n"
   19092                 :     "\n"
   19093                 :     "Compute union using cascading.\n"
   19094                 :     "\n"
   19095                 :     "This function is the same as the C++ method\n"
   19096                 :     "OGRGeometry::UnionCascaded().\n"
   19097                 :     "\n"
   19098                 :     "This function is built on the GEOS library, check it for the\n"
   19099                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19100                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19101                 :     "error.\n"
   19102                 :     "\n"
   19103                 :     "Parameters:\n"
   19104                 :     "-----------\n"
   19105                 :     "\n"
   19106                 :     "hThis:  the geometry.\n"
   19107                 :     "\n"
   19108                 :     "a new geometry representing the union or NULL if an error occurs. \n"
   19109                 :     ""},
   19110                 :    { (char *)"Geometry_Difference", _wrap_Geometry_Difference, METH_VARARGS, (char *)"\n"
   19111                 :     "Geometry_Difference(Geometry self, Geometry other) -> Geometry\n"
   19112                 :     "\n"
   19113                 :     "OGRGeometryH\n"
   19114                 :     "OGR_G_Difference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
   19115                 :     "\n"
   19116                 :     "Compute difference.\n"
   19117                 :     "\n"
   19118                 :     "Generates a new geometry which is the region of this geometry with the\n"
   19119                 :     "region of the other geometry removed.\n"
   19120                 :     "\n"
   19121                 :     "This function is the same as the C++ method OGRGeometry::Difference().\n"
   19122                 :     "\n"
   19123                 :     "This function is built on the GEOS library, check it for the\n"
   19124                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19125                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19126                 :     "error.\n"
   19127                 :     "\n"
   19128                 :     "Parameters:\n"
   19129                 :     "-----------\n"
   19130                 :     "\n"
   19131                 :     "hThis:  the geometry.\n"
   19132                 :     "\n"
   19133                 :     "hOther:  the other geometry.\n"
   19134                 :     "\n"
   19135                 :     "a new geometry representing the difference or NULL if the difference\n"
   19136                 :     "is empty or an error occurs. \n"
   19137                 :     ""},
   19138                 :    { (char *)"Geometry_SymDifference", _wrap_Geometry_SymDifference, METH_VARARGS, (char *)"\n"
   19139                 :     "Geometry_SymDifference(Geometry self, Geometry other) -> Geometry\n"
   19140                 :     "\n"
   19141                 :     "OGRGeometryH\n"
   19142                 :     "OGR_G_SymDifference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
   19143                 :     "\n"
   19144                 :     "Compute symmetric difference.\n"
   19145                 :     "\n"
   19146                 :     "Generates a new geometry which is the symmetric difference of this\n"
   19147                 :     "geometry and the other geometry.\n"
   19148                 :     "\n"
   19149                 :     "This function is the same as the C++ method\n"
   19150                 :     "OGRGeometry::SymmetricDifference().\n"
   19151                 :     "\n"
   19152                 :     "This function is built on the GEOS library, check it for the\n"
   19153                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19154                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19155                 :     "error.\n"
   19156                 :     "\n"
   19157                 :     "Parameters:\n"
   19158                 :     "-----------\n"
   19159                 :     "\n"
   19160                 :     "hThis:  the geometry.\n"
   19161                 :     "\n"
   19162                 :     "hOther:  the other geometry.\n"
   19163                 :     "\n"
   19164                 :     "a new geometry representing the symmetric difference or NULL if the\n"
   19165                 :     "difference is empty or an error occurs.\n"
   19166                 :     "\n"
   19167                 :     "OGR 1.8.0 \n"
   19168                 :     ""},
   19169                 :    { (char *)"Geometry_SymmetricDifference", _wrap_Geometry_SymmetricDifference, METH_VARARGS, (char *)"\n"
   19170                 :     "Geometry_SymmetricDifference(Geometry self, Geometry other) -> Geometry\n"
   19171                 :     "\n"
   19172                 :     "OGRGeometryH\n"
   19173                 :     "OGR_G_SymmetricDifference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
   19174                 :     "\n"
   19175                 :     "Compute symmetric difference (deprecated).\n"
   19176                 :     "\n"
   19177                 :     "Deprecated See:   OGR_G_SymmetricDifference() \n"
   19178                 :     ""},
   19179                 :    { (char *)"Geometry_Distance", _wrap_Geometry_Distance, METH_VARARGS, (char *)"\n"
   19180                 :     "Geometry_Distance(Geometry self, Geometry other) -> double\n"
   19181                 :     "\n"
   19182                 :     "double OGR_G_Distance(OGRGeometryH\n"
   19183                 :     "hFirst, OGRGeometryH hOther)\n"
   19184                 :     "\n"
   19185                 :     "Compute distance between two geometries.\n"
   19186                 :     "\n"
   19187                 :     "Returns the shortest distance between the two geometries.\n"
   19188                 :     "\n"
   19189                 :     "This function is the same as the C++ method OGRGeometry::Distance().\n"
   19190                 :     "\n"
   19191                 :     "This function is built on the GEOS library, check it for the\n"
   19192                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19193                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19194                 :     "error.\n"
   19195                 :     "\n"
   19196                 :     "Parameters:\n"
   19197                 :     "-----------\n"
   19198                 :     "\n"
   19199                 :     "hFirst:  the first geometry to compare against.\n"
   19200                 :     "\n"
   19201                 :     "hOther:  the other geometry to compare against.\n"
   19202                 :     "\n"
   19203                 :     "the distance between the geometries or -1 if an error occurs. \n"
   19204                 :     ""},
   19205                 :    { (char *)"Geometry_Empty", _wrap_Geometry_Empty, METH_VARARGS, (char *)"\n"
   19206                 :     "Geometry_Empty(Geometry self)\n"
   19207                 :     "\n"
   19208                 :     "void OGR_G_Empty(OGRGeometryH hGeom)\n"
   19209                 :     "\n"
   19210                 :     "Clear geometry information. This restores the geometry to it's initial\n"
   19211                 :     "state after construction, and before assignment of actual geometry.\n"
   19212                 :     "\n"
   19213                 :     "This function relates to the SFCOM IGeometry::Empty() method.\n"
   19214                 :     "\n"
   19215                 :     "This function is the same as the CPP method OGRGeometry::empty().\n"
   19216                 :     "\n"
   19217                 :     "Parameters:\n"
   19218                 :     "-----------\n"
   19219                 :     "\n"
   19220                 :     "hGeom:  handle on the geometry to empty. \n"
   19221                 :     ""},
   19222                 :    { (char *)"Geometry_IsEmpty", _wrap_Geometry_IsEmpty, METH_VARARGS, (char *)"\n"
   19223                 :     "Geometry_IsEmpty(Geometry self) -> bool\n"
   19224                 :     "\n"
   19225                 :     "int OGR_G_IsEmpty(OGRGeometryH hGeom)\n"
   19226                 :     "\n"
   19227                 :     "Test if the geometry is empty.\n"
   19228                 :     "\n"
   19229                 :     "This method is the same as the CPP method OGRGeometry::IsEmpty().\n"
   19230                 :     "\n"
   19231                 :     "Parameters:\n"
   19232                 :     "-----------\n"
   19233                 :     "\n"
   19234                 :     "hGeom:  The Geometry to test.\n"
   19235                 :     "\n"
   19236                 :     "TRUE if the geometry has no points, otherwise FALSE. \n"
   19237                 :     ""},
   19238                 :    { (char *)"Geometry_IsValid", _wrap_Geometry_IsValid, METH_VARARGS, (char *)"\n"
   19239                 :     "Geometry_IsValid(Geometry self) -> bool\n"
   19240                 :     "\n"
   19241                 :     "int OGR_G_IsValid(OGRGeometryH hGeom)\n"
   19242                 :     "\n"
   19243                 :     "Test if the geometry is valid.\n"
   19244                 :     "\n"
   19245                 :     "This function is the same as the C++ method OGRGeometry::IsValid().\n"
   19246                 :     "\n"
   19247                 :     "This function is built on the GEOS library, check it for the\n"
   19248                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19249                 :     "library, this function will always return FALSE.\n"
   19250                 :     "\n"
   19251                 :     "Parameters:\n"
   19252                 :     "-----------\n"
   19253                 :     "\n"
   19254                 :     "hGeom:  The Geometry to test.\n"
   19255                 :     "\n"
   19256                 :     "TRUE if the geometry has no points, otherwise FALSE. \n"
   19257                 :     ""},
   19258                 :    { (char *)"Geometry_IsSimple", _wrap_Geometry_IsSimple, METH_VARARGS, (char *)"\n"
   19259                 :     "Geometry_IsSimple(Geometry self) -> bool\n"
   19260                 :     "\n"
   19261                 :     "int OGR_G_IsSimple(OGRGeometryH\n"
   19262                 :     "hGeom)\n"
   19263                 :     "\n"
   19264                 :     "Returns TRUE if the geometry is simple.\n"
   19265                 :     "\n"
   19266                 :     "Returns TRUE if the geometry has no anomalous geometric points, such\n"
   19267                 :     "as self intersection or self tangency. The description of each\n"
   19268                 :     "instantiable geometric class will include the specific conditions that\n"
   19269                 :     "cause an instance of that class to be classified as not simple.\n"
   19270                 :     "\n"
   19271                 :     "This function is the same as the c++ method OGRGeometry::IsSimple()\n"
   19272                 :     "method.\n"
   19273                 :     "\n"
   19274                 :     "If OGR is built without the GEOS library, this function will always\n"
   19275                 :     "return FALSE.\n"
   19276                 :     "\n"
   19277                 :     "Parameters:\n"
   19278                 :     "-----------\n"
   19279                 :     "\n"
   19280                 :     "hGeom:  The Geometry to test.\n"
   19281                 :     "\n"
   19282                 :     "TRUE if object is simple, otherwise FALSE. \n"
   19283                 :     ""},
   19284                 :    { (char *)"Geometry_IsRing", _wrap_Geometry_IsRing, METH_VARARGS, (char *)"\n"
   19285                 :     "Geometry_IsRing(Geometry self) -> bool\n"
   19286                 :     "\n"
   19287                 :     "int OGR_G_IsRing(OGRGeometryH hGeom)\n"
   19288                 :     "\n"
   19289                 :     "Test if the geometry is a ring.\n"
   19290                 :     "\n"
   19291                 :     "This function is the same as the C++ method OGRGeometry::IsRing().\n"
   19292                 :     "\n"
   19293                 :     "This function is built on the GEOS library, check it for the\n"
   19294                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19295                 :     "library, this function will always return FALSE.\n"
   19296                 :     "\n"
   19297                 :     "Parameters:\n"
   19298                 :     "-----------\n"
   19299                 :     "\n"
   19300                 :     "hGeom:  The Geometry to test.\n"
   19301                 :     "\n"
   19302                 :     "TRUE if the geometry has no points, otherwise FALSE. \n"
   19303                 :     ""},
   19304                 :    { (char *)"Geometry_Intersects", _wrap_Geometry_Intersects, METH_VARARGS, (char *)"\n"
   19305                 :     "Geometry_Intersects(Geometry self, Geometry other) -> bool\n"
   19306                 :     "\n"
   19307                 :     "int OGR_G_Intersects(OGRGeometryH\n"
   19308                 :     "hGeom, OGRGeometryH hOtherGeom)\n"
   19309                 :     "\n"
   19310                 :     "Do these features intersect?\n"
   19311                 :     "\n"
   19312                 :     "Currently this is not implemented in a rigerous fashion, and generally\n"
   19313                 :     "just tests whether the envelopes of the two features intersect.\n"
   19314                 :     "Eventually this will be made rigerous.\n"
   19315                 :     "\n"
   19316                 :     "This function is the same as the CPP method OGRGeometry::Intersects.\n"
   19317                 :     "\n"
   19318                 :     "Parameters:\n"
   19319                 :     "-----------\n"
   19320                 :     "\n"
   19321                 :     "hGeom:  handle on the first geometry.\n"
   19322                 :     "\n"
   19323                 :     "hOtherGeom:  handle on the other geometry to test against.\n"
   19324                 :     "\n"
   19325                 :     "TRUE if the geometries intersect, otherwise FALSE. \n"
   19326                 :     ""},
   19327                 :    { (char *)"Geometry_Intersect", _wrap_Geometry_Intersect, METH_VARARGS, (char *)"\n"
   19328                 :     "Geometry_Intersect(Geometry self, Geometry other) -> bool\n"
   19329                 :     "\n"
   19330                 :     "int OGR_G_Intersect(OGRGeometryH\n"
   19331                 :     "hGeom, OGRGeometryH hOtherGeom) \n"
   19332                 :     ""},
   19333                 :    { (char *)"Geometry_Equals", _wrap_Geometry_Equals, METH_VARARGS, (char *)"\n"
   19334                 :     "Geometry_Equals(Geometry self, Geometry other) -> bool\n"
   19335                 :     "\n"
   19336                 :     "int OGR_G_Equals(OGRGeometryH hGeom,\n"
   19337                 :     "OGRGeometryH hOther)\n"
   19338                 :     "\n"
   19339                 :     "Returns TRUE if two geometries are equivalent.\n"
   19340                 :     "\n"
   19341                 :     "This function is the same as the CPP method OGRGeometry::Equals()\n"
   19342                 :     "method.\n"
   19343                 :     "\n"
   19344                 :     "Parameters:\n"
   19345                 :     "-----------\n"
   19346                 :     "\n"
   19347                 :     "hGeom:  handle on the first geometry.\n"
   19348                 :     "\n"
   19349                 :     "hOther:  handle on the other geometry to test against.\n"
   19350                 :     "\n"
   19351                 :     "TRUE if equivalent or FALSE otherwise. \n"
   19352                 :     ""},
   19353                 :    { (char *)"Geometry_Equal", _wrap_Geometry_Equal, METH_VARARGS, (char *)"\n"
   19354                 :     "Geometry_Equal(Geometry self, Geometry other) -> bool\n"
   19355                 :     "\n"
   19356                 :     "int OGR_G_Equal(OGRGeometryH hGeom,\n"
   19357                 :     "OGRGeometryH hOther) \n"
   19358                 :     ""},
   19359                 :    { (char *)"Geometry_Disjoint", _wrap_Geometry_Disjoint, METH_VARARGS, (char *)"\n"
   19360                 :     "Geometry_Disjoint(Geometry self, Geometry other) -> bool\n"
   19361                 :     "\n"
   19362                 :     "int OGR_G_Disjoint(OGRGeometryH\n"
   19363                 :     "hThis, OGRGeometryH hOther)\n"
   19364                 :     "\n"
   19365                 :     "Test for disjointness.\n"
   19366                 :     "\n"
   19367                 :     "Tests if this geometry and the other geometry are disjoint.\n"
   19368                 :     "\n"
   19369                 :     "This function is the same as the C++ method OGRGeometry::Disjoint().\n"
   19370                 :     "\n"
   19371                 :     "This function is built on the GEOS library, check it for the\n"
   19372                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19373                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19374                 :     "error.\n"
   19375                 :     "\n"
   19376                 :     "Parameters:\n"
   19377                 :     "-----------\n"
   19378                 :     "\n"
   19379                 :     "hThis:  the geometry to compare.\n"
   19380                 :     "\n"
   19381                 :     "hOther:  the other geometry to compare.\n"
   19382                 :     "\n"
   19383                 :     "TRUE if they are disjoint, otherwise FALSE. \n"
   19384                 :     ""},
   19385                 :    { (char *)"Geometry_Touches", _wrap_Geometry_Touches, METH_VARARGS, (char *)"\n"
   19386                 :     "Geometry_Touches(Geometry self, Geometry other) -> bool\n"
   19387                 :     "\n"
   19388                 :     "int OGR_G_Touches(OGRGeometryH hThis,\n"
   19389                 :     "OGRGeometryH hOther)\n"
   19390                 :     "\n"
   19391                 :     "Test for touching.\n"
   19392                 :     "\n"
   19393                 :     "Tests if this geometry and the other geometry are touching.\n"
   19394                 :     "\n"
   19395                 :     "This function is the same as the C++ method OGRGeometry::Touches().\n"
   19396                 :     "\n"
   19397                 :     "This function is built on the GEOS library, check it for the\n"
   19398                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19399                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19400                 :     "error.\n"
   19401                 :     "\n"
   19402                 :     "Parameters:\n"
   19403                 :     "-----------\n"
   19404                 :     "\n"
   19405                 :     "hThis:  the geometry to compare.\n"
   19406                 :     "\n"
   19407                 :     "hOther:  the other geometry to compare.\n"
   19408                 :     "\n"
   19409                 :     "TRUE if they are touching, otherwise FALSE. \n"
   19410                 :     ""},
   19411                 :    { (char *)"Geometry_Crosses", _wrap_Geometry_Crosses, METH_VARARGS, (char *)"\n"
   19412                 :     "Geometry_Crosses(Geometry self, Geometry other) -> bool\n"
   19413                 :     "\n"
   19414                 :     "int OGR_G_Crosses(OGRGeometryH hThis,\n"
   19415                 :     "OGRGeometryH hOther)\n"
   19416                 :     "\n"
   19417                 :     "Test for crossing.\n"
   19418                 :     "\n"
   19419                 :     "Tests if this geometry and the other geometry are crossing.\n"
   19420                 :     "\n"
   19421                 :     "This function is the same as the C++ method OGRGeometry::Crosses().\n"
   19422                 :     "\n"
   19423                 :     "This function is built on the GEOS library, check it for the\n"
   19424                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19425                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19426                 :     "error.\n"
   19427                 :     "\n"
   19428                 :     "Parameters:\n"
   19429                 :     "-----------\n"
   19430                 :     "\n"
   19431                 :     "hThis:  the geometry to compare.\n"
   19432                 :     "\n"
   19433                 :     "hOther:  the other geometry to compare.\n"
   19434                 :     "\n"
   19435                 :     "TRUE if they are crossing, otherwise FALSE. \n"
   19436                 :     ""},
   19437                 :    { (char *)"Geometry_Within", _wrap_Geometry_Within, METH_VARARGS, (char *)"\n"
   19438                 :     "Geometry_Within(Geometry self, Geometry other) -> bool\n"
   19439                 :     "\n"
   19440                 :     "int OGR_G_Within(OGRGeometryH hThis,\n"
   19441                 :     "OGRGeometryH hOther)\n"
   19442                 :     "\n"
   19443                 :     "Test for containment.\n"
   19444                 :     "\n"
   19445                 :     "Tests if this geometry is within the other geometry.\n"
   19446                 :     "\n"
   19447                 :     "This function is the same as the C++ method OGRGeometry::Within().\n"
   19448                 :     "\n"
   19449                 :     "This function is built on the GEOS library, check it for the\n"
   19450                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19451                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19452                 :     "error.\n"
   19453                 :     "\n"
   19454                 :     "Parameters:\n"
   19455                 :     "-----------\n"
   19456                 :     "\n"
   19457                 :     "hThis:  the geometry to compare.\n"
   19458                 :     "\n"
   19459                 :     "hOther:  the other geometry to compare.\n"
   19460                 :     "\n"
   19461                 :     "TRUE if hThis is within hOther, otherwise FALSE. \n"
   19462                 :     ""},
   19463                 :    { (char *)"Geometry_Contains", _wrap_Geometry_Contains, METH_VARARGS, (char *)"\n"
   19464                 :     "Geometry_Contains(Geometry self, Geometry other) -> bool\n"
   19465                 :     "\n"
   19466                 :     "int OGR_G_Contains(OGRGeometryH\n"
   19467                 :     "hThis, OGRGeometryH hOther)\n"
   19468                 :     "\n"
   19469                 :     "Test for containment.\n"
   19470                 :     "\n"
   19471                 :     "Tests if this geometry contains the other geometry.\n"
   19472                 :     "\n"
   19473                 :     "This function is the same as the C++ method OGRGeometry::Contains().\n"
   19474                 :     "\n"
   19475                 :     "This function is built on the GEOS library, check it for the\n"
   19476                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19477                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19478                 :     "error.\n"
   19479                 :     "\n"
   19480                 :     "Parameters:\n"
   19481                 :     "-----------\n"
   19482                 :     "\n"
   19483                 :     "hThis:  the geometry to compare.\n"
   19484                 :     "\n"
   19485                 :     "hOther:  the other geometry to compare.\n"
   19486                 :     "\n"
   19487                 :     "TRUE if hThis contains hOther geometry, otherwise FALSE. \n"
   19488                 :     ""},
   19489                 :    { (char *)"Geometry_Overlaps", _wrap_Geometry_Overlaps, METH_VARARGS, (char *)"\n"
   19490                 :     "Geometry_Overlaps(Geometry self, Geometry other) -> bool\n"
   19491                 :     "\n"
   19492                 :     "int OGR_G_Overlaps(OGRGeometryH\n"
   19493                 :     "hThis, OGRGeometryH hOther)\n"
   19494                 :     "\n"
   19495                 :     "Test for overlap.\n"
   19496                 :     "\n"
   19497                 :     "Tests if this geometry and the other geometry overlap, that is their\n"
   19498                 :     "intersection has a non-zero area.\n"
   19499                 :     "\n"
   19500                 :     "This function is the same as the C++ method OGRGeometry::Overlaps().\n"
   19501                 :     "\n"
   19502                 :     "This function is built on the GEOS library, check it for the\n"
   19503                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19504                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19505                 :     "error.\n"
   19506                 :     "\n"
   19507                 :     "Parameters:\n"
   19508                 :     "-----------\n"
   19509                 :     "\n"
   19510                 :     "hThis:  the geometry to compare.\n"
   19511                 :     "\n"
   19512                 :     "hOther:  the other geometry to compare.\n"
   19513                 :     "\n"
   19514                 :     "TRUE if they are overlapping, otherwise FALSE. \n"
   19515                 :     ""},
   19516                 :    { (char *)"Geometry_TransformTo", _wrap_Geometry_TransformTo, METH_VARARGS, (char *)"\n"
   19517                 :     "Geometry_TransformTo(Geometry self, SpatialReference reference) -> OGRErr\n"
   19518                 :     "\n"
   19519                 :     "OGRErr\n"
   19520                 :     "OGR_G_TransformTo(OGRGeometryH hGeom, OGRSpatialReferenceH hSRS)\n"
   19521                 :     "\n"
   19522                 :     "Transform geometry to new spatial reference system.\n"
   19523                 :     "\n"
   19524                 :     "This function will transform the coordinates of a geometry from their\n"
   19525                 :     "current spatial reference system to a new target spatial reference\n"
   19526                 :     "system. Normally this means reprojecting the vectors, but it could\n"
   19527                 :     "include datum shifts, and changes of units.\n"
   19528                 :     "\n"
   19529                 :     "This function will only work if the geometry already has an assigned\n"
   19530                 :     "spatial reference system, and if it is transformable to the target\n"
   19531                 :     "coordinate system.\n"
   19532                 :     "\n"
   19533                 :     "Because this function requires internal creation and initialization of\n"
   19534                 :     "an OGRCoordinateTransformation object it is significantly more\n"
   19535                 :     "expensive to use this function to transform many geometries than it is\n"
   19536                 :     "to create the OGRCoordinateTransformation in advance, and call\n"
   19537                 :     "transform() with that transformation. This function exists primarily\n"
   19538                 :     "for convenience when only transforming a single geometry.\n"
   19539                 :     "\n"
   19540                 :     "This function is the same as the CPP method OGRGeometry::transformTo.\n"
   19541                 :     "\n"
   19542                 :     "Parameters:\n"
   19543                 :     "-----------\n"
   19544                 :     "\n"
   19545                 :     "hGeom:  handle on the geometry to apply the transform to.\n"
   19546                 :     "\n"
   19547                 :     "hSRS:  handle on the spatial reference system to apply.\n"
   19548                 :     "\n"
   19549                 :     "OGRERR_NONE on success, or an error code. \n"
   19550                 :     ""},
   19551                 :    { (char *)"Geometry_Transform", _wrap_Geometry_Transform, METH_VARARGS, (char *)"\n"
   19552                 :     "Geometry_Transform(Geometry self, CoordinateTransformation trans) -> OGRErr\n"
   19553                 :     "\n"
   19554                 :     "OGRErr OGR_G_Transform(OGRGeometryH\n"
   19555                 :     "hGeom, OGRCoordinateTransformationH hTransform)\n"
   19556                 :     "\n"
   19557                 :     "Apply arbitrary coordinate transformation to geometry.\n"
   19558                 :     "\n"
   19559                 :     "This function will transform the coordinates of a geometry from their\n"
   19560                 :     "current spatial reference system to a new target spatial reference\n"
   19561                 :     "system. Normally this means reprojecting the vectors, but it could\n"
   19562                 :     "include datum shifts, and changes of units.\n"
   19563                 :     "\n"
   19564                 :     "Note that this function does not require that the geometry already\n"
   19565                 :     "have a spatial reference system. It will be assumed that they can be\n"
   19566                 :     "treated as having the source spatial reference system of the\n"
   19567                 :     "OGRCoordinateTransformation object, and the actual SRS of the geometry\n"
   19568                 :     "will be ignored. On successful completion the output\n"
   19569                 :     "OGRSpatialReference of the OGRCoordinateTransformation will be\n"
   19570                 :     "assigned to the geometry.\n"
   19571                 :     "\n"
   19572                 :     "This function is the same as the CPP method OGRGeometry::transform.\n"
   19573                 :     "\n"
   19574                 :     "Parameters:\n"
   19575                 :     "-----------\n"
   19576                 :     "\n"
   19577                 :     "hGeom:  handle on the geometry to apply the transform to.\n"
   19578                 :     "\n"
   19579                 :     "hTransform:  handle on the transformation to apply.\n"
   19580                 :     "\n"
   19581                 :     "OGRERR_NONE on success or an error code. \n"
   19582                 :     ""},
   19583                 :    { (char *)"Geometry_GetSpatialReference", _wrap_Geometry_GetSpatialReference, METH_VARARGS, (char *)"\n"
   19584                 :     "Geometry_GetSpatialReference(Geometry self) -> SpatialReference\n"
   19585                 :     "\n"
   19586                 :     "OGRSpatialReferenceH\n"
   19587                 :     "OGR_G_GetSpatialReference(OGRGeometryH hGeom)\n"
   19588                 :     "\n"
   19589                 :     "Returns spatial reference system for geometry.\n"
   19590                 :     "\n"
   19591                 :     "This function relates to the SFCOM IGeometry::get_SpatialReference()\n"
   19592                 :     "method.\n"
   19593                 :     "\n"
   19594                 :     "This function is the same as the CPP method\n"
   19595                 :     "OGRGeometry::getSpatialReference().\n"
   19596                 :     "\n"
   19597                 :     "Parameters:\n"
   19598                 :     "-----------\n"
   19599                 :     "\n"
   19600                 :     "hGeom:  handle on the geometry to get spatial reference from.\n"
   19601                 :     "\n"
   19602                 :     "a reference to the spatial reference geometry. \n"
   19603                 :     ""},
   19604                 :    { (char *)"Geometry_AssignSpatialReference", _wrap_Geometry_AssignSpatialReference, METH_VARARGS, (char *)"\n"
   19605                 :     "Geometry_AssignSpatialReference(Geometry self, SpatialReference reference)\n"
   19606                 :     "\n"
   19607                 :     "void\n"
   19608                 :     "OGR_G_AssignSpatialReference(OGRGeometryH hGeom, OGRSpatialReferenceH\n"
   19609                 :     "hSRS)\n"
   19610                 :     "\n"
   19611                 :     "Assign spatial reference to this object.\n"
   19612                 :     "\n"
   19613                 :     "Any existing spatial reference is replaced, but under no circumstances\n"
   19614                 :     "does this result in the object being reprojected. It is just changing\n"
   19615                 :     "the interpretation of the existing geometry. Note that assigning a\n"
   19616                 :     "spatial reference increments the reference count on the\n"
   19617                 :     "OGRSpatialReference, but does not copy it.\n"
   19618                 :     "\n"
   19619                 :     "This is similar to the SFCOM IGeometry::put_SpatialReference() method.\n"
   19620                 :     "\n"
   19621                 :     "This function is the same as the CPP method\n"
   19622                 :     "OGRGeometry::assignSpatialReference.\n"
   19623                 :     "\n"
   19624                 :     "Parameters:\n"
   19625                 :     "-----------\n"
   19626                 :     "\n"
   19627                 :     "hGeom:  handle on the geometry to apply the new spatial reference\n"
   19628                 :     "system.\n"
   19629                 :     "\n"
   19630                 :     "hSRS:  handle on the new spatial reference system to apply. \n"
   19631                 :     ""},
   19632                 :    { (char *)"Geometry_CloseRings", _wrap_Geometry_CloseRings, METH_VARARGS, (char *)"\n"
   19633                 :     "Geometry_CloseRings(Geometry self)\n"
   19634                 :     "\n"
   19635                 :     "void OGR_G_CloseRings(OGRGeometryH\n"
   19636                 :     "hGeom)\n"
   19637                 :     "\n"
   19638                 :     "Force rings to be closed.\n"
   19639                 :     "\n"
   19640                 :     "If this geometry, or any contained geometries has polygon rings that\n"
   19641                 :     "are not closed, they will be closed by adding the starting point at\n"
   19642                 :     "the end.\n"
   19643                 :     "\n"
   19644                 :     "Parameters:\n"
   19645                 :     "-----------\n"
   19646                 :     "\n"
   19647                 :     "hGeom:  handle to the geometry. \n"
   19648                 :     ""},
   19649                 :    { (char *)"Geometry_FlattenTo2D", _wrap_Geometry_FlattenTo2D, METH_VARARGS, (char *)"\n"
   19650                 :     "Geometry_FlattenTo2D(Geometry self)\n"
   19651                 :     "\n"
   19652                 :     "void\n"
   19653                 :     "OGR_G_FlattenTo2D(OGRGeometryH hGeom)\n"
   19654                 :     "\n"
   19655                 :     "Convert geometry to strictly 2D. In a sense this converts all Z\n"
   19656                 :     "coordinates to 0.0.\n"
   19657                 :     "\n"
   19658                 :     "This function is the same as the CPP method\n"
   19659                 :     "OGRGeometry::flattenTo2D().\n"
   19660                 :     "\n"
   19661                 :     "Parameters:\n"
   19662                 :     "-----------\n"
   19663                 :     "\n"
   19664                 :     "hGeom:  handle on the geometry to convert. \n"
   19665                 :     ""},
   19666                 :    { (char *)"Geometry_Segmentize", _wrap_Geometry_Segmentize, METH_VARARGS, (char *)"\n"
   19667                 :     "Geometry_Segmentize(Geometry self, double dfMaxLength)\n"
   19668                 :     "\n"
   19669                 :     "void OGR_G_Segmentize(OGRGeometryH\n"
   19670                 :     "hGeom, double dfMaxLength)\n"
   19671                 :     "\n"
   19672                 :     "Modify the geometry such it has no segment longer then the given\n"
   19673                 :     "distance.\n"
   19674                 :     "\n"
   19675                 :     "Interpolated points will have Z and M values (if needed) set to 0.\n"
   19676                 :     "Distance computation is performed in 2d only\n"
   19677                 :     "\n"
   19678                 :     "This function is the same as the CPP method OGRGeometry::segmentize().\n"
   19679                 :     "\n"
   19680                 :     "Parameters:\n"
   19681                 :     "-----------\n"
   19682                 :     "\n"
   19683                 :     "hGeom:  handle on the geometry to segmentize\n"
   19684                 :     "\n"
   19685                 :     "dfMaxLength:  the maximum distance between 2 points after\n"
   19686                 :     "segmentization \n"
   19687                 :     ""},
   19688                 :    { (char *)"Geometry_GetEnvelope", _wrap_Geometry_GetEnvelope, METH_VARARGS, (char *)"\n"
   19689                 :     "Geometry_GetEnvelope(Geometry self)\n"
   19690                 :     "\n"
   19691                 :     "void\n"
   19692                 :     "OGR_G_GetEnvelope(OGRGeometryH hGeom, OGREnvelope *psEnvelope)\n"
   19693                 :     "\n"
   19694                 :     "Computes and returns the bounding envelope for this geometry in the\n"
   19695                 :     "passed psEnvelope structure.\n"
   19696                 :     "\n"
   19697                 :     "This function is the same as the CPP method\n"
   19698                 :     "OGRGeometry::getEnvelope().\n"
   19699                 :     "\n"
   19700                 :     "Parameters:\n"
   19701                 :     "-----------\n"
   19702                 :     "\n"
   19703                 :     "hGeom:  handle of the geometry to get envelope from.\n"
   19704                 :     "\n"
   19705                 :     "psEnvelope:  the structure in which to place the results. \n"
   19706                 :     ""},
   19707                 :    { (char *)"Geometry_GetEnvelope3D", _wrap_Geometry_GetEnvelope3D, METH_VARARGS, (char *)"\n"
   19708                 :     "Geometry_GetEnvelope3D(Geometry self)\n"
   19709                 :     "\n"
   19710                 :     "void\n"
   19711                 :     "OGR_G_GetEnvelope3D(OGRGeometryH hGeom, OGREnvelope3D *psEnvelope)\n"
   19712                 :     "\n"
   19713                 :     "Computes and returns the bounding envelope (3D) for this geometry in\n"
   19714                 :     "the passed psEnvelope structure.\n"
   19715                 :     "\n"
   19716                 :     "This function is the same as the CPP method\n"
   19717                 :     "OGRGeometry::getEnvelope().\n"
   19718                 :     "\n"
   19719                 :     "Parameters:\n"
   19720                 :     "-----------\n"
   19721                 :     "\n"
   19722                 :     "hGeom:  handle of the geometry to get envelope from.\n"
   19723                 :     "\n"
   19724                 :     "psEnvelope:  the structure in which to place the results.\n"
   19725                 :     "\n"
   19726                 :     "OGR 1.9.0 \n"
   19727                 :     ""},
   19728                 :    { (char *)"Geometry_Centroid", _wrap_Geometry_Centroid, METH_VARARGS, (char *)"\n"
   19729                 :     "Geometry_Centroid(Geometry self) -> Geometry\n"
   19730                 :     "\n"
   19731                 :     "int OGR_G_Centroid(OGRGeometryH\n"
   19732                 :     "hGeom, OGRGeometryH hCentroidPoint)\n"
   19733                 :     "\n"
   19734                 :     "Compute the geometry centroid.\n"
   19735                 :     "\n"
   19736                 :     "The centroid location is applied to the passed in OGRPoint object. The\n"
   19737                 :     "centroid is not necessarily within the geometry.\n"
   19738                 :     "\n"
   19739                 :     "This method relates to the SFCOM ISurface::get_Centroid() method\n"
   19740                 :     "however the current implementation based on GEOS can operate on other\n"
   19741                 :     "geometry types such as multipoint, linestring, geometrycollection such\n"
   19742                 :     "as multipolygons. OGC SF SQL 1.1 defines the operation for surfaces\n"
   19743                 :     "(polygons). SQL/MM-Part 3 defines the operation for surfaces and\n"
   19744                 :     "multisurfaces (multipolygons).\n"
   19745                 :     "\n"
   19746                 :     "This function is the same as the C++ method OGRGeometry::Centroid().\n"
   19747                 :     "\n"
   19748                 :     "This function is built on the GEOS library, check it for the\n"
   19749                 :     "definition of the geometry operation. If OGR is built without the GEOS\n"
   19750                 :     "library, this function will always fail, issuing a CPLE_NotSupported\n"
   19751                 :     "error.\n"
   19752                 :     "\n"
   19753                 :     "OGRERR_NONE on success or OGRERR_FAILURE on error. \n"
   19754                 :     ""},
   19755                 :    { (char *)"Geometry_WkbSize", _wrap_Geometry_WkbSize, METH_VARARGS, (char *)"\n"
   19756                 :     "Geometry_WkbSize(Geometry self) -> int\n"
   19757                 :     "\n"
   19758                 :     "int OGR_G_WkbSize(OGRGeometryH hGeom)\n"
   19759                 :     "\n"
   19760                 :     "Returns size of related binary representation.\n"
   19761                 :     "\n"
   19762                 :     "This function returns the exact number of bytes required to hold the\n"
   19763                 :     "well known binary representation of this geometry object. Its\n"
   19764                 :     "computation may be slightly expensive for complex geometries.\n"
   19765                 :     "\n"
   19766                 :     "This function relates to the SFCOM IWks::WkbSize() method.\n"
   19767                 :     "\n"
   19768                 :     "This function is the same as the CPP method OGRGeometry::WkbSize().\n"
   19769                 :     "\n"
   19770                 :     "Parameters:\n"
   19771                 :     "-----------\n"
   19772                 :     "\n"
   19773                 :     "hGeom:  handle on the geometry to get the binary size from.\n"
   19774                 :     "\n"
   19775                 :     "size of binary representation in bytes. \n"
   19776                 :     ""},
   19777                 :    { (char *)"Geometry_GetCoordinateDimension", _wrap_Geometry_GetCoordinateDimension, METH_VARARGS, (char *)"\n"
   19778                 :     "Geometry_GetCoordinateDimension(Geometry self) -> int\n"
   19779                 :     "\n"
   19780                 :     "int\n"
   19781                 :     "OGR_G_GetCoordinateDimension(OGRGeometryH hGeom)\n"
   19782                 :     "\n"
   19783                 :     "Get the dimension of the coordinates in this geometry.\n"
   19784                 :     "\n"
   19785                 :     "This function corresponds to the SFCOM IGeometry::GetDimension()\n"
   19786                 :     "method.\n"
   19787                 :     "\n"
   19788                 :     "This function is the same as the CPP method\n"
   19789                 :     "OGRGeometry::getCoordinateDimension().\n"
   19790                 :     "\n"
   19791                 :     "Parameters:\n"
   19792                 :     "-----------\n"
   19793                 :     "\n"
   19794                 :     "hGeom:  handle on the geometry to get the dimension of the coordinates\n"
   19795                 :     "from.\n"
   19796                 :     "\n"
   19797                 :     "in practice this will return 2 or 3. It can also return 0 in the case\n"
   19798                 :     "of an empty point. \n"
   19799                 :     ""},
   19800                 :    { (char *)"Geometry_SetCoordinateDimension", _wrap_Geometry_SetCoordinateDimension, METH_VARARGS, (char *)"\n"
   19801                 :     "Geometry_SetCoordinateDimension(Geometry self, int dimension)\n"
   19802                 :     "\n"
   19803                 :     "void\n"
   19804                 :     "OGR_G_SetCoordinateDimension(OGRGeometryH hGeom, int nNewDimension)\n"
   19805                 :     "\n"
   19806                 :     "Set the coordinate dimension.\n"
   19807                 :     "\n"
   19808                 :     "This method sets the explicit coordinate dimension. Setting the\n"
   19809                 :     "coordinate dimension of a geometry to 2 should zero out any existing Z\n"
   19810                 :     "values. Setting the dimension of a geometry collection will not\n"
   19811                 :     "necessarily affect the children geometries.\n"
   19812                 :     "\n"
   19813                 :     "Parameters:\n"
   19814                 :     "-----------\n"
   19815                 :     "\n"
   19816                 :     "hGeom:  handle on the geometry to set the dimension of the\n"
   19817                 :     "coordinates.\n"
   19818                 :     "\n"
   19819                 :     "nNewDimension:  New coordinate dimension value, either 2 or 3. \n"
   19820                 :     ""},
   19821                 :    { (char *)"Geometry_GetDimension", _wrap_Geometry_GetDimension, METH_VARARGS, (char *)"\n"
   19822                 :     "Geometry_GetDimension(Geometry self) -> int\n"
   19823                 :     "\n"
   19824                 :     "int\n"
   19825                 :     "OGR_G_GetDimension(OGRGeometryH hGeom)\n"
   19826                 :     "\n"
   19827                 :     "Get the dimension of this geometry.\n"
   19828                 :     "\n"
   19829                 :     "This function corresponds to the SFCOM IGeometry::GetDimension()\n"
   19830                 :     "method. It indicates the dimension of the geometry, but does not\n"
   19831                 :     "indicate the dimension of the underlying space (as indicated by\n"
   19832                 :     "OGR_G_GetCoordinateDimension() function).\n"
   19833                 :     "\n"
   19834                 :     "This function is the same as the CPP method\n"
   19835                 :     "OGRGeometry::getDimension().\n"
   19836                 :     "\n"
   19837                 :     "Parameters:\n"
   19838                 :     "-----------\n"
   19839                 :     "\n"
   19840                 :     "hGeom:  handle on the geometry to get the dimension from.\n"
   19841                 :     "\n"
   19842                 :     "0 for points, 1 for lines and 2 for surfaces. \n"
   19843                 :     ""},
   19844                 :    { (char *)"Geometry_swigregister", Geometry_swigregister, METH_VARARGS, NULL},
   19845                 :    { (char *)"GetDriverCount", _wrap_GetDriverCount, METH_VARARGS, (char *)"GetDriverCount() -> int"},
   19846                 :    { (char *)"GetOpenDSCount", _wrap_GetOpenDSCount, METH_VARARGS, (char *)"GetOpenDSCount() -> int"},
   19847                 :    { (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"},
   19848                 :    { (char *)"RegisterAll", _wrap_RegisterAll, METH_VARARGS, (char *)"RegisterAll()"},
   19849                 :    { (char *)"GeometryTypeToName", _wrap_GeometryTypeToName, METH_VARARGS, (char *)"GeometryTypeToName(OGRwkbGeometryType eType) -> char"},
   19850                 :    { (char *)"GetFieldTypeName", _wrap_GetFieldTypeName, METH_VARARGS, (char *)"GetFieldTypeName(OGRFieldType type) -> char"},
   19851                 :    { (char *)"GetOpenDS", _wrap_GetOpenDS, METH_VARARGS, (char *)"GetOpenDS(int ds_number) -> DataSource"},
   19852                 :    { (char *)"Open", (PyCFunction) _wrap_Open, METH_VARARGS | METH_KEYWORDS, (char *)"Open(char utf8_path, int update = 0) -> DataSource"},
   19853                 :    { (char *)"OpenShared", (PyCFunction) _wrap_OpenShared, METH_VARARGS | METH_KEYWORDS, (char *)"OpenShared(char utf8_path, int update = 0) -> DataSource"},
   19854                 :    { (char *)"GetDriverByName", _wrap_GetDriverByName, METH_VARARGS, (char *)"GetDriverByName(char name) -> Driver"},
   19855                 :    { (char *)"GetDriver", _wrap_GetDriver, METH_VARARGS, (char *)"GetDriver(int driver_number) -> Driver"},
   19856                 :    { (char *)"GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, (char *)"GeneralCmdLineProcessor(char papszArgv, int nOptions = 0) -> char"},
   19857                 :    { NULL, NULL, 0, NULL }
   19858                 : };
   19859                 : 
   19860                 : 
   19861                 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
   19862                 : 
   19863                 : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
   19864                 : static swig_type_info _swigt__p_OGRDataSourceShadow = {"_p_OGRDataSourceShadow", "OGRDataSourceShadow *", 0, 0, (void*)0, 0};
   19865                 : static swig_type_info _swigt__p_OGRDriverShadow = {"_p_OGRDriverShadow", "OGRDriverShadow *", 0, 0, (void*)0, 0};
   19866                 : static swig_type_info _swigt__p_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, (void*)0, 0};
   19867                 : static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
   19868                 : static swig_type_info _swigt__p_OGRFieldDefnShadow = {"_p_OGRFieldDefnShadow", "OGRFieldDefnShadow *", 0, 0, (void*)0, 0};
   19869                 : static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
   19870                 : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
   19871                 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
   19872                 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
   19873                 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
   19874                 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
   19875                 : static swig_type_info _swigt__p_int = {"_p_int", "OGRFieldType *|int *|OGRwkbGeometryType *|OGRJustification *|OGRwkbByteOrder *|OGRErr *", 0, 0, (void*)0, 0};
   19876                 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
   19877                 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
   19878                 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
   19879                 : 
   19880                 : static swig_type_info *swig_type_initial[] = {
   19881                 :   &_swigt__p_GIntBig,
   19882                 :   &_swigt__p_OGRDataSourceShadow,
   19883                 :   &_swigt__p_OGRDriverShadow,
   19884                 :   &_swigt__p_OGRFeatureDefnShadow,
   19885                 :   &_swigt__p_OGRFeatureShadow,
   19886                 :   &_swigt__p_OGRFieldDefnShadow,
   19887                 :   &_swigt__p_OGRGeometryShadow,
   19888                 :   &_swigt__p_OGRLayerShadow,
   19889                 :   &_swigt__p_OSRCoordinateTransformationShadow,
   19890                 :   &_swigt__p_OSRSpatialReferenceShadow,
   19891                 :   &_swigt__p_char,
   19892                 :   &_swigt__p_double,
   19893                 :   &_swigt__p_int,
   19894                 :   &_swigt__p_p_char,
   19895                 :   &_swigt__p_p_double,
   19896                 :   &_swigt__p_p_int,
   19897                 : };
   19898                 : 
   19899                 : static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
   19900                 : static swig_cast_info _swigc__p_OGRDataSourceShadow[] = {  {&_swigt__p_OGRDataSourceShadow, 0, 0, 0},{0, 0, 0, 0}};
   19901                 : static swig_cast_info _swigc__p_OGRDriverShadow[] = {  {&_swigt__p_OGRDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
   19902                 : static swig_cast_info _swigc__p_OGRFeatureDefnShadow[] = {  {&_swigt__p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
   19903                 : static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
   19904                 : static swig_cast_info _swigc__p_OGRFieldDefnShadow[] = {  {&_swigt__p_OGRFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
   19905                 : static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
   19906                 : static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   19907                 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = {  {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
   19908                 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   19909                 : static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
   19910                 : static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
   19911                 : static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
   19912                 : static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
   19913                 : static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
   19914                 : static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
   19915                 : 
   19916                 : static swig_cast_info *swig_cast_initial[] = {
   19917                 :   _swigc__p_GIntBig,
   19918                 :   _swigc__p_OGRDataSourceShadow,
   19919                 :   _swigc__p_OGRDriverShadow,
   19920                 :   _swigc__p_OGRFeatureDefnShadow,
   19921                 :   _swigc__p_OGRFeatureShadow,
   19922                 :   _swigc__p_OGRFieldDefnShadow,
   19923                 :   _swigc__p_OGRGeometryShadow,
   19924                 :   _swigc__p_OGRLayerShadow,
   19925                 :   _swigc__p_OSRCoordinateTransformationShadow,
   19926                 :   _swigc__p_OSRSpatialReferenceShadow,
   19927                 :   _swigc__p_char,
   19928                 :   _swigc__p_double,
   19929                 :   _swigc__p_int,
   19930                 :   _swigc__p_p_char,
   19931                 :   _swigc__p_p_double,
   19932                 :   _swigc__p_p_int,
   19933                 : };
   19934                 : 
   19935                 : 
   19936                 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
   19937                 : 
   19938                 : static swig_const_info swig_const_table[] = {
   19939                 : {0, 0, 0, 0.0, 0, 0}};
   19940                 : 
   19941                 : #ifdef __cplusplus
   19942                 : }
   19943                 : #endif
   19944                 : /* -----------------------------------------------------------------------------
   19945                 :  * Type initialization:
   19946                 :  * This problem is tough by the requirement that no dynamic 
   19947                 :  * memory is used. Also, since swig_type_info structures store pointers to 
   19948                 :  * swig_cast_info structures and swig_cast_info structures store pointers back
   19949                 :  * to swig_type_info structures, we need some lookup code at initialization. 
   19950                 :  * The idea is that swig generates all the structures that are needed. 
   19951                 :  * The runtime then collects these partially filled structures. 
   19952                 :  * The SWIG_InitializeModule function takes these initial arrays out of 
   19953                 :  * swig_module, and does all the lookup, filling in the swig_module.types
   19954                 :  * array with the correct data and linking the correct swig_cast_info
   19955                 :  * structures together.
   19956                 :  *
   19957                 :  * The generated swig_type_info structures are assigned staticly to an initial 
   19958                 :  * array. We just loop through that array, and handle each type individually.
   19959                 :  * First we lookup if this type has been already loaded, and if so, use the
   19960                 :  * loaded structure instead of the generated one. Then we have to fill in the
   19961                 :  * cast linked list. The cast data is initially stored in something like a
   19962                 :  * two-dimensional array. Each row corresponds to a type (there are the same
   19963                 :  * number of rows as there are in the swig_type_initial array). Each entry in
   19964                 :  * a column is one of the swig_cast_info structures for that type.
   19965                 :  * The cast_initial array is actually an array of arrays, because each row has
   19966                 :  * a variable number of columns. So to actually build the cast linked list,
   19967                 :  * we find the array of casts associated with the type, and loop through it 
   19968                 :  * adding the casts to the list. The one last trick we need to do is making
   19969                 :  * sure the type pointer in the swig_cast_info struct is correct.
   19970                 :  *
   19971                 :  * First off, we lookup the cast->type name to see if it is already loaded. 
   19972                 :  * There are three cases to handle:
   19973                 :  *  1) If the cast->type has already been loaded AND the type we are adding
   19974                 :  *     casting info to has not been loaded (it is in this module), THEN we
   19975                 :  *     replace the cast->type pointer with the type pointer that has already
   19976                 :  *     been loaded.
   19977                 :  *  2) If BOTH types (the one we are adding casting info to, and the 
   19978                 :  *     cast->type) are loaded, THEN the cast info has already been loaded by
   19979                 :  *     the previous module so we just ignore it.
   19980                 :  *  3) Finally, if cast->type has not already been loaded, then we add that
   19981                 :  *     swig_cast_info to the linked list (because the cast->type) pointer will
   19982                 :  *     be correct.
   19983                 :  * ----------------------------------------------------------------------------- */
   19984                 : 
   19985                 : #ifdef __cplusplus
   19986                 : extern "C" {
   19987                 : #if 0
   19988                 : } /* c-mode */
   19989                 : #endif
   19990                 : #endif
   19991                 : 
   19992                 : #if 0
   19993                 : #define SWIGRUNTIME_DEBUG
   19994                 : #endif
   19995                 : 
   19996                 : 
   19997                 : SWIGRUNTIME void
   19998               1 : SWIG_InitializeModule(void *clientdata) {
   19999                 :   size_t i;
   20000                 :   swig_module_info *module_head, *iter;
   20001                 :   int found, init;
   20002                 :   
   20003               1 :   clientdata = clientdata;
   20004                 :   
   20005                 :   /* check to see if the circular list has been setup, if not, set it up */
   20006               1 :   if (swig_module.next==0) {
   20007                 :     /* Initialize the swig_module */
   20008               1 :     swig_module.type_initial = swig_type_initial;
   20009               1 :     swig_module.cast_initial = swig_cast_initial;
   20010               1 :     swig_module.next = &swig_module;
   20011               1 :     init = 1;
   20012                 :   } else {
   20013               0 :     init = 0;
   20014                 :   }
   20015                 :   
   20016                 :   /* Try and load any already created modules */
   20017               1 :   module_head = SWIG_GetModule(clientdata);
   20018               1 :   if (!module_head) {
   20019                 :     /* This is the first module loaded for this interpreter */
   20020                 :     /* so set the swig module into the interpreter */
   20021                 :     SWIG_SetModule(clientdata, &swig_module);
   20022               0 :     module_head = &swig_module;
   20023                 :   } else {
   20024                 :     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
   20025               1 :     found=0;
   20026               1 :     iter=module_head;
   20027               3 :     do {
   20028               3 :       if (iter==&swig_module) {
   20029               0 :         found=1;
   20030               0 :         break;
   20031                 :       }
   20032               3 :       iter=iter->next;
   20033                 :     } while (iter!= module_head);
   20034                 :     
   20035                 :     /* if the is found in the list, then all is done and we may leave */
   20036               1 :     if (found) return;
   20037                 :     /* otherwise we must add out module into the list */
   20038               1 :     swig_module.next = module_head->next;
   20039               1 :     module_head->next = &swig_module;
   20040                 :   }
   20041                 :   
   20042                 :   /* When multiple interpeters are used, a module could have already been initialized in
   20043                 :        a different interpreter, but not yet have a pointer in this interpreter.
   20044                 :        In this case, we do not want to continue adding types... everything should be
   20045                 :        set up already */
   20046               1 :   if (init == 0) return;
   20047                 :   
   20048                 :   /* Now work on filling in swig_module.types */
   20049                 : #ifdef SWIGRUNTIME_DEBUG
   20050                 :   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
   20051                 : #endif
   20052              17 :   for (i = 0; i < swig_module.size; ++i) {
   20053              16 :     swig_type_info *type = 0;
   20054                 :     swig_type_info *ret;
   20055                 :     swig_cast_info *cast;
   20056                 :     
   20057                 : #ifdef SWIGRUNTIME_DEBUG
   20058                 :     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
   20059                 : #endif
   20060                 :     
   20061                 :     /* if there is another module already loaded */
   20062              16 :     if (swig_module.next != &swig_module) {
   20063              16 :       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
   20064                 :     }
   20065              16 :     if (type) {
   20066                 :       /* Overwrite clientdata field */
   20067                 : #ifdef SWIGRUNTIME_DEBUG
   20068                 :       printf("SWIG_InitializeModule: found type %s\n", type->name);
   20069                 : #endif
   20070              10 :       if (swig_module.type_initial[i]->clientdata) {
   20071               0 :         type->clientdata = swig_module.type_initial[i]->clientdata;
   20072                 : #ifdef SWIGRUNTIME_DEBUG
   20073                 :         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
   20074                 : #endif
   20075                 :       }
   20076                 :     } else {
   20077               6 :       type = swig_module.type_initial[i];
   20078                 :     }
   20079                 :     
   20080                 :     /* Insert casting types */
   20081              16 :     cast = swig_module.cast_initial[i];
   20082              48 :     while (cast->type) {
   20083                 :       /* Don't need to add information already in the list */
   20084              16 :       ret = 0;
   20085                 : #ifdef SWIGRUNTIME_DEBUG
   20086                 :       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
   20087                 : #endif
   20088              16 :       if (swig_module.next != &swig_module) {
   20089              16 :         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
   20090                 : #ifdef SWIGRUNTIME_DEBUG
   20091                 :         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
   20092                 : #endif
   20093                 :       }
   20094              16 :       if (ret) {
   20095              10 :         if (type == swig_module.type_initial[i]) {
   20096                 : #ifdef SWIGRUNTIME_DEBUG
   20097                 :           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
   20098                 : #endif
   20099               0 :           cast->type = ret;
   20100               0 :           ret = 0;
   20101                 :         } else {
   20102                 :           /* Check for casting already in the list */
   20103              10 :           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
   20104                 : #ifdef SWIGRUNTIME_DEBUG
   20105                 :           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
   20106                 : #endif
   20107              10 :           if (!ocast) ret = 0;
   20108                 :         }
   20109                 :       }
   20110                 :       
   20111              16 :       if (!ret) {
   20112                 : #ifdef SWIGRUNTIME_DEBUG
   20113                 :         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
   20114                 : #endif
   20115               6 :         if (type->cast) {
   20116               0 :           type->cast->prev = cast;
   20117               0 :           cast->next = type->cast;
   20118                 :         }
   20119               6 :         type->cast = cast;
   20120                 :       }
   20121              16 :       cast++;
   20122                 :     }
   20123                 :     /* Set entry in modules->types array equal to the type */
   20124              16 :     swig_module.types[i] = type;
   20125                 :   }
   20126               1 :   swig_module.types[i] = 0;
   20127                 :   
   20128                 : #ifdef SWIGRUNTIME_DEBUG
   20129                 :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   20130                 :   for (i = 0; i < swig_module.size; ++i) {
   20131                 :     int j = 0;
   20132                 :     swig_cast_info *cast = swig_module.cast_initial[i];
   20133                 :     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
   20134                 :     while (cast->type) {
   20135                 :       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
   20136                 :       cast++;
   20137                 :       ++j;
   20138                 :     }
   20139                 :     printf("---- Total casts: %d\n",j);
   20140                 :   }
   20141                 :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   20142                 : #endif
   20143                 : }
   20144                 : 
   20145                 : /* This function will propagate the clientdata field of type to
   20146                 : * any new swig_type_info structures that have been added into the list
   20147                 : * of equivalent types.  It is like calling
   20148                 : * SWIG_TypeClientData(type, clientdata) a second time.
   20149                 : */
   20150                 : SWIGRUNTIME void
   20151                 : SWIG_PropagateClientData(void) {
   20152                 :   size_t i;
   20153                 :   swig_cast_info *equiv;
   20154                 :   static int init_run = 0;
   20155                 :   
   20156                 :   if (init_run) return;
   20157                 :   init_run = 1;
   20158                 :   
   20159                 :   for (i = 0; i < swig_module.size; i++) {
   20160                 :     if (swig_module.types[i]->clientdata) {
   20161                 :       equiv = swig_module.types[i]->cast;
   20162                 :       while (equiv) {
   20163                 :         if (!equiv->converter) {
   20164                 :           if (equiv->type && !equiv->type->clientdata)
   20165                 :           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
   20166                 :         }
   20167                 :         equiv = equiv->next;
   20168                 :       }
   20169                 :     }
   20170                 :   }
   20171                 : }
   20172                 : 
   20173                 : #ifdef __cplusplus
   20174                 : #if 0
   20175                 : {
   20176                 :   /* c-mode */
   20177                 : #endif
   20178                 : }
   20179                 : #endif
   20180                 : 
   20181                 : 
   20182                 : 
   20183                 : #ifdef __cplusplus
   20184                 : extern "C" {
   20185                 : #endif
   20186                 :   
   20187                 :   /* Python-specific SWIG API */
   20188                 : #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
   20189                 : #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
   20190                 : #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
   20191                 :   
   20192                 :   /* -----------------------------------------------------------------------------
   20193                 :    * global variable support code.
   20194                 :    * ----------------------------------------------------------------------------- */
   20195                 :   
   20196                 :   typedef struct swig_globalvar {
   20197                 :     char       *name;                  /* Name of global variable */
   20198                 :     PyObject *(*get_attr)(void);       /* Return the current value */
   20199                 :     int       (*set_attr)(PyObject *); /* Set the value */
   20200                 :     struct swig_globalvar *next;
   20201                 :   } swig_globalvar;
   20202                 :   
   20203                 :   typedef struct swig_varlinkobject {
   20204                 :     PyObject_HEAD
   20205                 :     swig_globalvar *vars;
   20206                 :   } swig_varlinkobject;
   20207                 :   
   20208                 :   SWIGINTERN PyObject *
   20209                 :   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
   20210                 : #if PY_VERSION_HEX >= 0x03000000
   20211                 :     return PyUnicode_InternFromString("<Swig global variables>");
   20212                 : #else
   20213                 :     return PyString_FromString("<Swig global variables>");
   20214                 : #endif
   20215                 :   }
   20216                 :   
   20217                 :   SWIGINTERN PyObject *
   20218                 :   swig_varlink_str(swig_varlinkobject *v) {
   20219                 : #if PY_VERSION_HEX >= 0x03000000
   20220                 :     PyObject *str = PyUnicode_InternFromString("(");
   20221                 :     PyObject *tail;
   20222                 :     PyObject *joined;
   20223                 :     swig_globalvar *var;
   20224                 :     for (var = v->vars; var; var=var->next) {
   20225                 :       tail = PyUnicode_FromString(var->name);
   20226                 :       joined = PyUnicode_Concat(str, tail);
   20227                 :       Py_DecRef(str);
   20228                 :       Py_DecRef(tail);
   20229                 :       str = joined;
   20230                 :       if (var->next) {
   20231                 :         tail = PyUnicode_InternFromString(", ");
   20232                 :         joined = PyUnicode_Concat(str, tail);
   20233                 :         Py_DecRef(str);
   20234                 :         Py_DecRef(tail);
   20235                 :         str = joined;
   20236                 :       }
   20237                 :     }
   20238                 :     tail = PyUnicode_InternFromString(")");
   20239                 :     joined = PyUnicode_Concat(str, tail);
   20240                 :     Py_DecRef(str);
   20241                 :     Py_DecRef(tail);
   20242                 :     str = joined;
   20243                 : #else
   20244                 :     PyObject *str = PyString_FromString("(");
   20245                 :     swig_globalvar *var;
   20246                 :     for (var = v->vars; var; var=var->next) {
   20247                 :       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
   20248                 :       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
   20249                 :     }
   20250                 :     PyString_ConcatAndDel(&str,PyString_FromString(")"));
   20251                 : #endif
   20252                 :     return str;
   20253                 :   }
   20254                 :   
   20255                 :   SWIGINTERN int
   20256                 :   swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
   20257                 :     char *tmp;
   20258                 :     PyObject *str = swig_varlink_str(v);
   20259                 :     fprintf(fp,"Swig global variables ");
   20260                 :     fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
   20261                 :     SWIG_Python_str_DelForPy3(tmp);
   20262                 :     Py_DECREF(str);
   20263                 :     return 0;
   20264                 :   }
   20265                 :   
   20266                 :   SWIGINTERN void
   20267                 :   swig_varlink_dealloc(swig_varlinkobject *v) {
   20268                 :     swig_globalvar *var = v->vars;
   20269                 :     while (var) {
   20270                 :       swig_globalvar *n = var->next;
   20271                 :       free(var->name);
   20272                 :       free(var);
   20273                 :       var = n;
   20274                 :     }
   20275                 :   }
   20276                 :   
   20277                 :   SWIGINTERN PyObject *
   20278                 :   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
   20279                 :     PyObject *res = NULL;
   20280                 :     swig_globalvar *var = v->vars;
   20281                 :     while (var) {
   20282                 :       if (strcmp(var->name,n) == 0) {
   20283                 :         res = (*var->get_attr)();
   20284                 :         break;
   20285                 :       }
   20286                 :       var = var->next;
   20287                 :     }
   20288                 :     if (res == NULL && !PyErr_Occurred()) {
   20289                 :       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
   20290                 :     }
   20291                 :     return res;
   20292                 :   }
   20293                 :   
   20294                 :   SWIGINTERN int
   20295                 :   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
   20296                 :     int res = 1;
   20297                 :     swig_globalvar *var = v->vars;
   20298                 :     while (var) {
   20299                 :       if (strcmp(var->name,n) == 0) {
   20300                 :         res = (*var->set_attr)(p);
   20301                 :         break;
   20302                 :       }
   20303                 :       var = var->next;
   20304                 :     }
   20305                 :     if (res == 1 && !PyErr_Occurred()) {
   20306                 :       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
   20307                 :     }
   20308                 :     return res;
   20309                 :   }
   20310                 :   
   20311                 :   SWIGINTERN PyTypeObject*
   20312                 :   swig_varlink_type(void) {
   20313                 :     static char varlink__doc__[] = "Swig var link object";
   20314                 :     static PyTypeObject varlink_type;
   20315                 :     static int type_init = 0;  
   20316                 :     if (!type_init) {
   20317                 :       const PyTypeObject tmp
   20318                 :       = {
   20319                 :         /* PyObject header changed in Python 3 */
   20320                 : #if PY_VERSION_HEX >= 0x03000000
   20321                 :         PyVarObject_HEAD_INIT(&PyType_Type, 0)
   20322                 : #else
   20323                 :         PyObject_HEAD_INIT(NULL)
   20324                 :         0,                                  /* Number of items in variable part (ob_size) */
   20325                 : #endif
   20326                 :         (char *)"swigvarlink",              /* Type name (tp_name) */
   20327                 :         sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
   20328                 :         0,                                  /* Itemsize (tp_itemsize) */
   20329                 :         (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
   20330                 :         (printfunc) swig_varlink_print,     /* Print (tp_print) */
   20331                 :         (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
   20332                 :         (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
   20333                 :         0,                                  /* tp_compare */
   20334                 :         (reprfunc) swig_varlink_repr,       /* tp_repr */
   20335                 :         0,                                  /* tp_as_number */
   20336                 :         0,                                  /* tp_as_sequence */
   20337                 :         0,                                  /* tp_as_mapping */
   20338                 :         0,                                  /* tp_hash */
   20339                 :         0,                                  /* tp_call */
   20340                 :         (reprfunc) swig_varlink_str,        /* tp_str */
   20341                 :         0,                                  /* tp_getattro */
   20342                 :         0,                                  /* tp_setattro */
   20343                 :         0,                                  /* tp_as_buffer */
   20344                 :         0,                                  /* tp_flags */
   20345                 :         varlink__doc__,                     /* tp_doc */
   20346                 :         0,                                  /* tp_traverse */
   20347                 :         0,                                  /* tp_clear */
   20348                 :         0,                                  /* tp_richcompare */
   20349                 :         0,                                  /* tp_weaklistoffset */
   20350                 : #if PY_VERSION_HEX >= 0x02020000
   20351                 :         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
   20352                 : #endif
   20353                 : #if PY_VERSION_HEX >= 0x02030000
   20354                 :         0,                                  /* tp_del */
   20355                 : #endif
   20356                 : #ifdef COUNT_ALLOCS
   20357                 :         0,0,0,0                             /* tp_alloc -> tp_next */
   20358                 : #endif
   20359                 :       };
   20360                 :       varlink_type = tmp;
   20361                 :       /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
   20362                 : #if PY_VERSION_HEX < 0x03000000
   20363                 :       varlink_type.ob_type = &PyType_Type;
   20364                 : #endif
   20365                 :       type_init = 1;
   20366                 :     }
   20367                 :     return &varlink_type;
   20368                 :   }
   20369                 :   
   20370                 :   /* Create a variable linking object for use later */
   20371                 :   SWIGINTERN PyObject *
   20372                 :   SWIG_Python_newvarlink(void) {
   20373                 :     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
   20374                 :     if (result) {
   20375                 :       result->vars = 0;
   20376                 :     }
   20377                 :     return ((PyObject*) result);
   20378                 :   }
   20379                 :   
   20380                 :   SWIGINTERN void 
   20381                 :   SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
   20382                 :     swig_varlinkobject *v = (swig_varlinkobject *) p;
   20383                 :     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
   20384                 :     if (gv) {
   20385                 :       size_t size = strlen(name)+1;
   20386                 :       gv->name = (char *)malloc(size);
   20387                 :       if (gv->name) {
   20388                 :         strncpy(gv->name,name,size);
   20389                 :         gv->get_attr = get_attr;
   20390                 :         gv->set_attr = set_attr;
   20391                 :         gv->next = v->vars;
   20392                 :       }
   20393                 :     }
   20394                 :     v->vars = gv;
   20395                 :   }
   20396                 :   
   20397                 :   SWIGINTERN PyObject *
   20398                 :   SWIG_globals(void) {
   20399                 :     static PyObject *_SWIG_globals = 0; 
   20400                 :     if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
   20401                 :     return _SWIG_globals;
   20402                 :   }
   20403                 :   
   20404                 :   /* -----------------------------------------------------------------------------
   20405                 :    * constants/methods manipulation
   20406                 :    * ----------------------------------------------------------------------------- */
   20407                 :   
   20408                 :   /* Install Constants */
   20409                 :   SWIGINTERN void
   20410               1 :   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
   20411               1 :     PyObject *obj = 0;
   20412                 :     size_t i;
   20413               1 :     for (i = 0; constants[i].type; ++i) {
   20414               0 :       switch(constants[i].type) {
   20415                 :       case SWIG_PY_POINTER:
   20416               0 :         obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
   20417               0 :         break;
   20418                 :       case SWIG_PY_BINARY:
   20419               0 :         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
   20420               0 :         break;
   20421                 :       default:
   20422               0 :         obj = 0;
   20423                 :         break;
   20424                 :       }
   20425               0 :       if (obj) {
   20426               0 :         PyDict_SetItemString(d, constants[i].name, obj);
   20427               0 :         Py_DECREF(obj);
   20428                 :       }
   20429                 :     }
   20430               1 :   }
   20431                 :   
   20432                 :   /* -----------------------------------------------------------------------------*/
   20433                 :   /* Fix SwigMethods to carry the callback ptrs when needed */
   20434                 :   /* -----------------------------------------------------------------------------*/
   20435                 :   
   20436                 :   SWIGINTERN void
   20437               1 :   SWIG_Python_FixMethods(PyMethodDef *methods,
   20438                 :     swig_const_info *const_table,
   20439                 :     swig_type_info **types,
   20440                 :     swig_type_info **types_initial) {
   20441                 :     size_t i;
   20442             224 :     for (i = 0; methods[i].ml_name; ++i) {
   20443             223 :       const char *c = methods[i].ml_doc;
   20444             438 :       if (c && (c = strstr(c, "swig_ptr: "))) {
   20445                 :         int j;
   20446               0 :         swig_const_info *ci = 0;
   20447               0 :         const char *name = c + 10;
   20448               0 :         for (j = 0; const_table[j].type; ++j) {
   20449               0 :           if (strncmp(const_table[j].name, name, 
   20450               0 :               strlen(const_table[j].name)) == 0) {
   20451               0 :             ci = &(const_table[j]);
   20452               0 :             break;
   20453                 :           }
   20454                 :         }
   20455               0 :         if (ci) {
   20456               0 :           size_t shift = (ci->ptype) - types;
   20457               0 :           swig_type_info *ty = types_initial[shift];
   20458               0 :           size_t ldoc = (c - methods[i].ml_doc);
   20459               0 :           size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
   20460               0 :           char *ndoc = (char*)malloc(ldoc + lptr + 10);
   20461               0 :           if (ndoc) {
   20462               0 :             char *buff = ndoc;
   20463               0 :             void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
   20464               0 :             if (ptr) {
   20465               0 :               strncpy(buff, methods[i].ml_doc, ldoc);
   20466               0 :               buff += ldoc;
   20467                 :               strncpy(buff, "swig_ptr: ", 10);
   20468               0 :               buff += 10;
   20469               0 :               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
   20470               0 :               methods[i].ml_doc = ndoc;
   20471                 :             }
   20472                 :           }
   20473                 :         }
   20474                 :       }
   20475                 :     }
   20476               1 :   } 
   20477                 :   
   20478                 : #ifdef __cplusplus
   20479                 : }
   20480                 : #endif
   20481                 : 
   20482                 : /* -----------------------------------------------------------------------------*
   20483                 :  *  Partial Init method
   20484                 :  * -----------------------------------------------------------------------------*/
   20485                 : 
   20486                 : #ifdef __cplusplus
   20487                 : extern "C"
   20488                 : #endif
   20489                 : 
   20490                 : SWIGEXPORT 
   20491                 : #if PY_VERSION_HEX >= 0x03000000
   20492                 : PyObject*
   20493                 : #else
   20494                 : void
   20495                 : #endif
   20496               1 : SWIG_init(void) {
   20497                 :   PyObject *m, *d;  
   20498                 : #if PY_VERSION_HEX >= 0x03000000
   20499                 :   static struct PyModuleDef SWIG_module = {
   20500                 :     PyModuleDef_HEAD_INIT,
   20501                 :     (char *) SWIG_name,
   20502                 :     NULL,
   20503                 :     -1,
   20504                 :     SwigMethods,
   20505                 :     NULL,
   20506                 :     NULL,
   20507                 :     NULL,
   20508                 :     NULL
   20509                 :   };
   20510                 : #endif
   20511                 :   
   20512                 :   /* Fix SwigMethods to carry the callback ptrs when needed */
   20513               1 :   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   20514                 :   
   20515                 : #if PY_VERSION_HEX >= 0x03000000
   20516                 :   m = PyModule_Create(&SWIG_module);
   20517                 : #else
   20518               1 :   m = Py_InitModule((char *) SWIG_name, SwigMethods);
   20519                 : #endif
   20520               1 :   d = PyModule_GetDict(m);
   20521                 :   
   20522               1 :   SWIG_InitializeModule(0);
   20523               1 :   SWIG_InstallConstants(d,swig_const_table);
   20524                 :   
   20525                 :   
   20526               1 :   SWIG_Python_SetConstant(d, "wkb25DBit",SWIG_From_int(static_cast< int >(0x80000000)));
   20527               1 :   SWIG_Python_SetConstant(d, "wkb25Bit",SWIG_From_int(static_cast< int >(0x80000000)));
   20528               1 :   SWIG_Python_SetConstant(d, "wkbUnknown",SWIG_From_int(static_cast< int >(0)));
   20529               1 :   SWIG_Python_SetConstant(d, "wkbPoint",SWIG_From_int(static_cast< int >(1)));
   20530               1 :   SWIG_Python_SetConstant(d, "wkbLineString",SWIG_From_int(static_cast< int >(2)));
   20531               1 :   SWIG_Python_SetConstant(d, "wkbPolygon",SWIG_From_int(static_cast< int >(3)));
   20532               1 :   SWIG_Python_SetConstant(d, "wkbMultiPoint",SWIG_From_int(static_cast< int >(4)));
   20533               1 :   SWIG_Python_SetConstant(d, "wkbMultiLineString",SWIG_From_int(static_cast< int >(5)));
   20534               1 :   SWIG_Python_SetConstant(d, "wkbMultiPolygon",SWIG_From_int(static_cast< int >(6)));
   20535               1 :   SWIG_Python_SetConstant(d, "wkbGeometryCollection",SWIG_From_int(static_cast< int >(7)));
   20536               1 :   SWIG_Python_SetConstant(d, "wkbNone",SWIG_From_int(static_cast< int >(100)));
   20537               1 :   SWIG_Python_SetConstant(d, "wkbLinearRing",SWIG_From_int(static_cast< int >(101)));
   20538               1 :   SWIG_Python_SetConstant(d, "wkbPoint25D",SWIG_From_int(static_cast< int >(wkbPoint+wkb25DBit)));
   20539               1 :   SWIG_Python_SetConstant(d, "wkbLineString25D",SWIG_From_int(static_cast< int >(wkbLineString+wkb25DBit)));
   20540               1 :   SWIG_Python_SetConstant(d, "wkbPolygon25D",SWIG_From_int(static_cast< int >(wkbPolygon+wkb25DBit)));
   20541               1 :   SWIG_Python_SetConstant(d, "wkbMultiPoint25D",SWIG_From_int(static_cast< int >(wkbMultiPoint+wkb25DBit)));
   20542               1 :   SWIG_Python_SetConstant(d, "wkbMultiLineString25D",SWIG_From_int(static_cast< int >(wkbMultiLineString+wkb25DBit)));
   20543               1 :   SWIG_Python_SetConstant(d, "wkbMultiPolygon25D",SWIG_From_int(static_cast< int >(wkbMultiPolygon+wkb25DBit)));
   20544               1 :   SWIG_Python_SetConstant(d, "wkbGeometryCollection25D",SWIG_From_int(static_cast< int >(wkbGeometryCollection+wkb25DBit)));
   20545               1 :   SWIG_Python_SetConstant(d, "OFTInteger",SWIG_From_int(static_cast< int >(0)));
   20546               1 :   SWIG_Python_SetConstant(d, "OFTIntegerList",SWIG_From_int(static_cast< int >(1)));
   20547               1 :   SWIG_Python_SetConstant(d, "OFTReal",SWIG_From_int(static_cast< int >(2)));
   20548               1 :   SWIG_Python_SetConstant(d, "OFTRealList",SWIG_From_int(static_cast< int >(3)));
   20549               1 :   SWIG_Python_SetConstant(d, "OFTString",SWIG_From_int(static_cast< int >(4)));
   20550               1 :   SWIG_Python_SetConstant(d, "OFTStringList",SWIG_From_int(static_cast< int >(5)));
   20551               1 :   SWIG_Python_SetConstant(d, "OFTWideString",SWIG_From_int(static_cast< int >(6)));
   20552               1 :   SWIG_Python_SetConstant(d, "OFTWideStringList",SWIG_From_int(static_cast< int >(7)));
   20553               1 :   SWIG_Python_SetConstant(d, "OFTBinary",SWIG_From_int(static_cast< int >(8)));
   20554               1 :   SWIG_Python_SetConstant(d, "OFTDate",SWIG_From_int(static_cast< int >(9)));
   20555               1 :   SWIG_Python_SetConstant(d, "OFTTime",SWIG_From_int(static_cast< int >(10)));
   20556               1 :   SWIG_Python_SetConstant(d, "OFTDateTime",SWIG_From_int(static_cast< int >(11)));
   20557               1 :   SWIG_Python_SetConstant(d, "OJUndefined",SWIG_From_int(static_cast< int >(0)));
   20558               1 :   SWIG_Python_SetConstant(d, "OJLeft",SWIG_From_int(static_cast< int >(1)));
   20559               1 :   SWIG_Python_SetConstant(d, "OJRight",SWIG_From_int(static_cast< int >(2)));
   20560               1 :   SWIG_Python_SetConstant(d, "wkbXDR",SWIG_From_int(static_cast< int >(0)));
   20561               1 :   SWIG_Python_SetConstant(d, "wkbNDR",SWIG_From_int(static_cast< int >(1)));
   20562               1 :   SWIG_Python_SetConstant(d, "NullFID",SWIG_From_int(static_cast< int >(-1)));
   20563               1 :   SWIG_Python_SetConstant(d, "ALTER_NAME_FLAG",SWIG_From_int(static_cast< int >(1)));
   20564               1 :   SWIG_Python_SetConstant(d, "ALTER_TYPE_FLAG",SWIG_From_int(static_cast< int >(2)));
   20565               1 :   SWIG_Python_SetConstant(d, "ALTER_WIDTH_PRECISION_FLAG",SWIG_From_int(static_cast< int >(4)));
   20566               1 :   SWIG_Python_SetConstant(d, "ALTER_ALL_FLAG",SWIG_From_int(static_cast< int >(1+2+4)));
   20567               1 :   SWIG_Python_SetConstant(d, "OLCRandomRead",SWIG_FromCharPtr("RandomRead"));
   20568               1 :   SWIG_Python_SetConstant(d, "OLCSequentialWrite",SWIG_FromCharPtr("SequentialWrite"));
   20569               1 :   SWIG_Python_SetConstant(d, "OLCRandomWrite",SWIG_FromCharPtr("RandomWrite"));
   20570               1 :   SWIG_Python_SetConstant(d, "OLCFastSpatialFilter",SWIG_FromCharPtr("FastSpatialFilter"));
   20571               1 :   SWIG_Python_SetConstant(d, "OLCFastFeatureCount",SWIG_FromCharPtr("FastFeatureCount"));
   20572               1 :   SWIG_Python_SetConstant(d, "OLCFastGetExtent",SWIG_FromCharPtr("FastGetExtent"));
   20573               1 :   SWIG_Python_SetConstant(d, "OLCCreateField",SWIG_FromCharPtr("CreateField"));
   20574               1 :   SWIG_Python_SetConstant(d, "OLCDeleteField",SWIG_FromCharPtr("DeleteField"));
   20575               1 :   SWIG_Python_SetConstant(d, "OLCReorderFields",SWIG_FromCharPtr("ReorderFields"));
   20576               1 :   SWIG_Python_SetConstant(d, "OLCAlterFieldDefn",SWIG_FromCharPtr("AlterFieldDefn"));
   20577               1 :   SWIG_Python_SetConstant(d, "OLCTransactions",SWIG_FromCharPtr("Transactions"));
   20578               1 :   SWIG_Python_SetConstant(d, "OLCDeleteFeature",SWIG_FromCharPtr("DeleteFeature"));
   20579               1 :   SWIG_Python_SetConstant(d, "OLCFastSetNextByIndex",SWIG_FromCharPtr("FastSetNextByIndex"));
   20580               1 :   SWIG_Python_SetConstant(d, "OLCStringsAsUTF8",SWIG_FromCharPtr("StringsAsUTF8"));
   20581               1 :   SWIG_Python_SetConstant(d, "OLCIgnoreFields",SWIG_FromCharPtr("IgnoreFields"));
   20582               1 :   SWIG_Python_SetConstant(d, "ODsCCreateLayer",SWIG_FromCharPtr("CreateLayer"));
   20583               1 :   SWIG_Python_SetConstant(d, "ODsCDeleteLayer",SWIG_FromCharPtr("DeleteLayer"));
   20584               1 :   SWIG_Python_SetConstant(d, "ODrCCreateDataSource",SWIG_FromCharPtr("CreateDataSource"));
   20585               1 :   SWIG_Python_SetConstant(d, "ODrCDeleteDataSource",SWIG_FromCharPtr("DeleteDataSource"));
   20586                 :   
   20587                 :   
   20588               1 :   if ( OGRGetDriverCount() == 0 ) {
   20589               1 :     OGRRegisterAll();
   20590                 :   }
   20591                 :   
   20592                 :   
   20593                 : #if PY_VERSION_HEX >= 0x03000000
   20594                 :   return m;
   20595                 : #else
   20596                 :   return;
   20597                 : #endif
   20598               2 : }
   20599                 : 

Generated by: LCOV version 1.7